Khen Nursimulu | aaac7ee | 2016-12-11 22:03:52 -0500 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | package schema; |
| 4 | |
| 5 | import "google/protobuf/empty.proto"; |
| 6 | |
| 7 | // Contains the name and content of a *.proto file |
| 8 | message ProtoFile { |
| 9 | string file_name = 1; // name of proto file |
| 10 | string proto = 2; // content of proto file |
| 11 | bytes descriptor = 3; // compiled descriptor for proto (zlib compressed) |
| 12 | } |
| 13 | |
| 14 | // Proto files and compiled descriptors for this interface |
| 15 | message Schemas { |
| 16 | |
| 17 | // Proto files |
| 18 | repeated ProtoFile protos = 1; |
| 19 | |
| 20 | // Name of proto file to generae swagger.json from |
| 21 | string swagger_from = 2; |
| 22 | |
| 23 | // Prefix of proto files which would require a yang file generated for it |
| 24 | string yang_from = 3; |
| 25 | |
| 26 | } |
| 27 | |
| 28 | // Schema services |
| 29 | service SchemaService { |
| 30 | |
| 31 | // Return active grpc schemas |
| 32 | rpc GetSchema(google.protobuf.Empty) returns (Schemas) {} |
| 33 | |
| 34 | } |