Khen Nursimulu | aaac7ee | 2016-12-11 22:03:52 -0500 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | package schema; |
| 4 | |
| 5 | import "google/api/annotations.proto"; |
| 6 | import "google/protobuf/empty.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 | } |
| 25 | |
| 26 | // Schema services |
| 27 | service SchemaService { |
| 28 | |
| 29 | // Return active grpc schemas |
| 30 | rpc GetSchema(google.protobuf.Empty) returns (Schemas) { |
| 31 | option (google.api.http) = { |
| 32 | get: "/schema" |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | } |