khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/go/schema"; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 4 | |
| 5 | package schema; |
| 6 | |
| 7 | import "google/api/annotations.proto"; |
| 8 | import "google/protobuf/empty.proto"; |
| 9 | |
| 10 | // Contains the name and content of a *.proto file |
| 11 | message ProtoFile { |
| 12 | string file_name = 1; // name of proto file |
| 13 | string proto = 2; // content of proto file |
| 14 | bytes descriptor = 3; // compiled descriptor for proto (zlib compressed) |
| 15 | } |
| 16 | |
| 17 | // Proto files and compiled descriptors for this interface |
| 18 | message Schemas { |
| 19 | |
| 20 | // Proto files |
| 21 | repeated ProtoFile protos = 1; |
| 22 | |
| 23 | // Proto file name from which swagger.json shall be generated |
| 24 | string swagger_from = 2; |
| 25 | |
| 26 | // Proto file name from which yang schemas shall be generated |
| 27 | string yang_from = 3; |
| 28 | } |
| 29 | |
| 30 | // Schema services |
| 31 | service SchemaService { |
| 32 | |
| 33 | // Return active grpc schemas |
| 34 | rpc GetSchema(google.protobuf.Empty) returns (Schemas) { |
| 35 | option (google.api.http) = { |
| 36 | get: "/schema" |
| 37 | }; |
| 38 | } |
| 39 | |
| 40 | } |