Zsolt Haraszti | 5cd6470 | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | package schema; |
| 4 | |
Zsolt Haraszti | 7eeb2b3 | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 5 | import "google/protobuf/empty.proto"; |
| 6 | |
Zsolt Haraszti | 2bdb6b3 | 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 | 5cd6470 | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 13 | |
Zsolt Haraszti | 2bdb6b3 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 14 | // Proto files and compiled descriptors for this interface |
| 15 | message Schemas { |
Zsolt Haraszti | 5cd6470 | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 16 | |
Zsolt Haraszti | 2bdb6b3 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 17 | // Proto files |
| 18 | repeated ProtoFile protos = 1; |
Zsolt Haraszti | 5cd6470 | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 19 | |
Zsolt Haraszti | 1edb828 | 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 | 5cd6470 | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 23 | } |
| 24 | |
Zsolt Haraszti | 5cd6470 | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 25 | // Schema services |
| 26 | service SchemaService { |
| 27 | |
Zsolt Haraszti | 2bdb6b3 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 28 | // Return active grpc schemas |
Zsolt Haraszti | 7eeb2b3 | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 29 | rpc GetSchema(google.protobuf.Empty) returns (Schemas) {} |
Zsolt Haraszti | 5cd6470 | 2016-09-27 13:48:35 -0700 | [diff] [blame] | 30 | |
| 31 | } |