Zsolt Haraszti | a9a12dc | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | package schema; |
| 4 | |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 5 | import "google/protobuf/empty.proto"; |
| 6 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 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 | } |
Zsolt Haraszti | a9a12dc | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 13 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 14 | // Proto files and compiled descriptors for this interface |
| 15 | message Schemas { |
Zsolt Haraszti | a9a12dc | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 16 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 17 | // Proto files |
| 18 | repeated ProtoFile protos = 1; |
Zsolt Haraszti | a9a12dc | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 19 | |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame] | 20 | // Name of proto file to generae swagger.json from |
| 21 | string swagger_from = 2; |
| 22 | |
Zsolt Haraszti | a9a12dc | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 23 | } |
| 24 | |
Zsolt Haraszti | a9a12dc | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 25 | // Schema services |
| 26 | service SchemaService { |
| 27 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 28 | // Return active grpc schemas |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 29 | rpc GetSchema(google.protobuf.Empty) returns (Schemas) {} |
Zsolt Haraszti | a9a12dc | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 30 | |
| 31 | } |