-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Expand file tree
/
Copy pathdata.proto
More file actions
169 lines (98 loc) · 2.01 KB
/
data.proto
File metadata and controls
169 lines (98 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/*
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package petstore;
import public "google/protobuf/struct.proto";
message ApiResponse {
int32 code = 1;
string type = 2;
string message = 3;
}
message Cat {
bool hunts = 1;
int32 age = 2;
}
message Category {
int64 id = 1;
string name = 2;
}
message Dog {
bool bark = 1;
enum Breed {
UNSPECIFIED = 0;
DINGO = 1;
HUSKY = 2;
RETRIEVER = 3;
SHEPHERD = 4;
}
Breed breed = 2;
}
message Error {
// Error code.
int32 code = 1;
// Detailed error message.
string message = 2;
}
message Order {
int64 id = 1;
int64 pet_id = 2 [json_name="petId"];
int32 quantity = 3;
string ship_date = 4 [json_name="shipDate"];
// Order Status
enum Status {
UNSPECIFIED = 0;
PLACED = 1;
APPROVED = 2;
DELIVERED = 3;
}
Status status = 5;
bool complete = 6;
google.protobuf.Struct meta = 7;
}
message OtherTest {
repeated string set_test = 1;
}
message Pet {
int64 id = 1;
Category category = 2;
string name = 3;
repeated string photo_urls = 4 [json_name="photoUrls"];
repeated Tag tags = 5;
// pet status in the store
enum Status {
UNSPECIFIED = 0;
AVAILABLE = 1;
PENDING = 2;
SOLD = 3;
}
Status status = 6;
}
message PetsGetRequest {
oneof pets_get_request {
Cat cat = 1;
Dog dog = 2;
}
}
message PetsPostRequest {
Cat cat = 1;
Dog dog = 2;
}
message Tag {
int64 id = 1;
string name = 2;
}
message User {
int64 id = 1;
string username = 2;
string first_name = 3 [json_name="firstName"];
string last_name = 4 [json_name="lastName"];
string email = 5;
string password = 6;
string phone = 7;
// User Status
int32 user_status = 8 [json_name="userStatus"];
}