Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/go/schema"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [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 | } |