Commit e4aef4e5 authored by Muhammad Hamza's avatar Muhammad Hamza
Browse files

update README files for proto3

parent c6fea83d
Loading
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ Below are some usage examples for Go and Ruby. For other languages, please refer
        $ python -m grpc_tools.protoc -I./AppSupport/proto3 --python_out=./python-stubs ./AppSupport/proto3/models/*
        ```
    
        The above command will generate .py files for all the data models in the ./models directory
        The above command will generate .py files for all the data models in the ./python-stubs/models directory

   - Services:

@@ -41,9 +41,7 @@ Below are some usage examples for Go and Ruby. For other languages, please refer
        $ python -m grpc_tools.protoc -I./AppSupport/proto3 --python_out=./python-stubs --grpc_python_out=./python-stubs ./AppSupport/proto3/services/*
        ```

        The above command will generate two files for the each Application Support services:
        - _app_confirm_ready_service_pb2.py_: containing the python data models used in the Application Support service file
        - _app_confirm_ready_service_pb2_grpc.py_: containing all the classes and functions needed for the supported HTTP methods in the Application Support API
        The above command will generate .py files for all the services in the ./python-stubs/services directory

### Go

@@ -84,7 +82,7 @@ Below are some usage examples for Go and Ruby. For other languages, please refer
    $ protoc --go_out=./go-stubs ./AppSupport/proto3/services/* --go-grpc_out=go-stubs -I./AppSupport/proto3
    ```
    > The generated `<data_model>.pb.go` files will contain all the protocol buffer code to populate, serialize, and retrieve request and response message types defined in the `models` folder.
    > And the `app_confirm_ready_service_grpc.pb.go` will contain the stubs for the methods defined in the `app_confirm_ready_service.proto` file.
    > And the `<*_service_grpc>.pb.go` will contain the stubs for the methods defined in the `./AppSupport/proto3/services/*` folder.

### Ruby

@@ -99,12 +97,12 @@ Below are some usage examples for Go and Ruby. For other languages, please refer
    $ mkdir ruby-stubs
    ```
    
    Run the following command to create Ruby modules for all the data models defined in the proto files.
    Run the following command to create Ruby modules for all the data models defined in the `./AppSupport/proto3/models/*` folder.

    ```sh
    $ grpc_tools_ruby_protoc -I./proto3 --ruby_out=ruby-stubs ./proto3/models/*
    ```
    Run the following command to generate `app_confirm_ready_service_pb.rb` and `app_confirm_ready_service_pb.rb` files, containing stub and service classes for the endpoints and methods defined in MEC011 App Enablement service.
    Run the following command to generate `<*_service_pb>.rb` files, containing stub and service classes for the endpoints and methods defined in MEC011 App Enablement service.

    ```sh
    $ grpc_tools_ruby_protoc -I./AppSupport/proto3 --ruby_out=ruby-stubs --grpc_out=ruby-stubs ./AppSupport/proto3/services/*
+7 −9
Original line number Diff line number Diff line
@@ -30,20 +30,18 @@ Below are some usage examples for Go and Ruby. For other languages, please refer
   - Models:
  
        ```sh
        $ python3 -m grpc_tools.protoc -I./ServiceMgmt/proto3 --python_out=./python-stubs ./ServiceMgmt/proto3/models/*
        $ python -m grpc_tools.protoc -I./ServiceMgmt/proto3 --python_out=./python-stubs ./ServiceMgmt/proto3/models/*
        ```
    
        The above command will generate .py files for all the data models in the ./models directory
        The above command will generate .py files for all the data models in the ./python-stubs/models directory

   - Services:

        ```sh
        $ python3 -m grpc_tools.protoc -I./ServiceMgmt/proto3 --python_out=./python-stubs --grpc_python_out=./python-stubs .ServiceMgmt/proto3/services/*
        $ python -m grpc_tools.protoc -I./ServiceMgmt/proto3 --python_out=./python-stubs --grpc_python_out=./python-stubs ./ServiceMgmt/proto3/services/*
        ```

        The above command will generate two files for the each Application Support services:
        - _app_confirm_ready_service_pb2.py_: containing the python data models used in the Application Support service file
        - _app_confirm_ready_service_pb2_grpc.py_: containing all the classes and functions needed for the supported HTTP methods in the Application Support API
        The above command will generate .py files for all the services in the ./python-stubs/services directory

### Go

@@ -84,7 +82,7 @@ Below are some usage examples for Go and Ruby. For other languages, please refer
    $ protoc --go_out=./go-stubs ./ServiceMgmt/proto3/services/* --go-grpc_out=go-stubs -I./ServiceMgmt/proto3
    ```
    > The generated `<data_model>.pb.go` files will contain all the protocol buffer code to populate, serialize, and retrieve request and response message types defined in the `models` folder.
    > And the `app_confirm_ready_service_grpc.pb.go` will contain the stubs for the methods defined in the `app_confirm_ready_service.proto` file.
    > And the `<*_service_grpc>.pb.go` will contain the stubs for the methods defined in the `./ServiceMgmt/proto3/services/*` folder.

### Ruby

@@ -99,12 +97,12 @@ Below are some usage examples for Go and Ruby. For other languages, please refer
    $ mkdir ruby-stubs
    ```
    
    Run the following command to create Ruby modules for all the data models defined in the proto files.
    Run the following command to create Ruby modules for all the data models defined in the `./ServiceMgmt/proto3/models/*` folder.

    ```sh
    $ grpc_tools_ruby_protoc -I./proto3 --ruby_out=ruby-stubs ./proto3/models/*
    ```
    Run the following command to generate `app_confirm_ready_service_pb.rb` and `app_confirm_ready_service_pb.rb` files, containing stub and service classes for the endpoints and methods defined in MEC011 App Enablement service.
    Run the following command to generate `<*_service_pb>.rb` files, containing stub and service classes for the endpoints and methods defined in MEC011 App Enablement service.

    ```sh
    $ grpc_tools_ruby_protoc -I./ServiceMgmt/proto3 --ruby_out=ruby-stubs --grpc_out=ruby-stubs ./ServiceMgmt/proto3/services/*
+9 −9
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@

Below are some code generation examples for Python, Go and Ruby. For other languages, please refer to https://grpc.io/docs/quickstart/.

>**NOTE:** In the below example commands we are generating proto3 descriptions for AppSupport API.

### Python

1. Install the grpcio-tools package
@@ -50,20 +52,18 @@ Below are some code generation examples for Python, Go and Ruby. For other langu
   - Models:
  
        ```sh
        $ python3 -m grpc_tools.protoc -I./AppSupport/proto3 --python_out=./python-stubs ./AppSupport/proto3/models/*
        $ python -m grpc_tools.protoc -I./AppSupport/proto3 --python_out=./python-stubs ./AppSupport/proto3/models/*
        ```
    
        The above command will generate .py files for all the data models in the ./models directory
        The above command will generate .py files for all the data models in the ./python-stubs/models directory

   - Services:

        ```sh
        $ python3 -m grpc_tools.protoc -I./AppSupport/proto3 --python_out=./python-stubs --grpc_python_out=./python-stubs .AppSupport/proto3/services/*
        $ python -m grpc_tools.protoc -I./AppSupport/proto3 --python_out=./python-stubs --grpc_python_out=./python-stubs ./AppSupport/proto3/services/*
        ```

        The above command will generate two files for the each Application Support services:
        - _app_confirm_ready_service_pb2.py_: containing the python data models used in the Application Support service file
        - _app_confirm_ready_service_pb2_grpc.py_: containing all the classes and functions needed for the supported HTTP methods in the Application Support API
        The above command will generate .py files for all the services in the ./python-stubs/services directory

### Go

@@ -104,7 +104,7 @@ Below are some code generation examples for Python, Go and Ruby. For other langu
    $ protoc --go_out=./go-stubs ./AppSupport/proto3/services/* --go-grpc_out=go-stubs -I./AppSupport/proto3
    ```
    > The generated `<data_model>.pb.go` files will contain all the protocol buffer code to populate, serialize, and retrieve request and response message types defined in the `models` folder.
    > And the `app_confirm_ready_service_grpc.pb.go` will contain the stubs for the methods defined in the `app_confirm_ready_service.proto` file.
    > And the `<*_service_grpc>.pb.go` will contain the stubs for the methods defined in the `./AppSupport/proto3/services/*` folder.

### Ruby

@@ -119,12 +119,12 @@ Below are some code generation examples for Python, Go and Ruby. For other langu
    $ mkdir ruby-stubs
    ```
    
    Run the following command to create Ruby modules for all the data models defined in the proto files.
    Run the following command to create Ruby modules for all the data models defined in the `./AppSupport/proto3/models/*` folder.

    ```sh
    $ grpc_tools_ruby_protoc -I./proto3 --ruby_out=ruby-stubs ./proto3/models/*
    ```
    Run the following command to generate `app_confirm_ready_service_pb.rb` and `app_confirm_ready_service_pb.rb` files, containing stub and service classes for the endpoints and methods defined in MEC011 App Enablement service.
    Run the following command to generate `<*_service_pb>.rb` files, containing stub and service classes for the endpoints and methods defined in MEC011 App Enablement service.

    ```sh
    $ grpc_tools_ruby_protoc -I./AppSupport/proto3 --ruby_out=ruby-stubs --grpc_out=ruby-stubs ./AppSupport/proto3/services/*