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