Skip to content

Commit 0527217

Browse files
update proto
1 parent 3e7cb6d commit 0527217

1 file changed

Lines changed: 133 additions & 90 deletions

File tree

raystack/frontier/v1beta1/admin.proto

Lines changed: 133 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -150,33 +150,15 @@ option (gnostic.openapi.v3.document) = {
150150
}
151151
]
152152
tags: [
153-
{
154-
name: "User"
155-
},
156-
{
157-
name: "Group"
158-
},
159-
{
160-
name: "Organization"
161-
},
162-
{
163-
name: "Project"
164-
},
165-
{
166-
name: "Relation"
167-
},
168-
{
169-
name: "Resource"
170-
},
171-
{
172-
name: "Policy"
173-
},
174-
{
175-
name: "Role"
176-
},
177-
{
178-
name: "Permission"
179-
}
153+
{name: "User"},
154+
{name: "Group"},
155+
{name: "Organization"},
156+
{name: "Project"},
157+
{name: "Relation"},
158+
{name: "Resource"},
159+
{name: "Policy"},
160+
{name: "Role"},
161+
{name: "Permission"}
180162
]
181163
components: {
182164
responses: {
@@ -192,7 +174,49 @@ option (gnostic.openapi.v3.document) = {
192174
value: {
193175
schema: {
194176
schema: {
195-
ref: ".google.rpc.Status"
177+
type: "object"
178+
properties: {
179+
additional_properties: [
180+
{
181+
name: "code"
182+
value: {
183+
schema: {
184+
type: "integer"
185+
format: "int32"
186+
description: "The status code, which should be an enum value of google.rpc.Code"
187+
}
188+
}
189+
},
190+
{
191+
name: "message"
192+
value: {
193+
schema: {
194+
type: "string"
195+
description: "A developer-facing error message, which should be in English"
196+
}
197+
}
198+
},
199+
{
200+
name: "details"
201+
value: {
202+
schema: {
203+
type: "array"
204+
description: "A list of messages that carry the error details"
205+
items: {
206+
schema_or_reference: [
207+
{
208+
schema: {
209+
type: "object"
210+
description: "Error detail in Any format"
211+
}
212+
}
213+
]
214+
}
215+
}
216+
}
217+
}
218+
]
219+
}
196220
}
197221
}
198222
}
@@ -212,7 +236,45 @@ option (gnostic.openapi.v3.document) = {
212236
value: {
213237
schema: {
214238
schema: {
215-
ref: ".google.rpc.Status"
239+
type: "object"
240+
properties: {
241+
additional_properties: [
242+
{
243+
name: "code"
244+
value: {
245+
schema: {
246+
type: "integer"
247+
format: "int32"
248+
}
249+
}
250+
},
251+
{
252+
name: "message"
253+
value: {
254+
schema: {
255+
type: "string"
256+
}
257+
}
258+
},
259+
{
260+
name: "details"
261+
value: {
262+
schema: {
263+
type: "array"
264+
items: {
265+
schema_or_reference: [
266+
{
267+
schema: {
268+
type: "object"
269+
}
270+
}
271+
]
272+
}
273+
}
274+
}
275+
}
276+
]
277+
}
216278
}
217279
}
218280
}
@@ -221,6 +283,8 @@ option (gnostic.openapi.v3.document) = {
221283
}
222284
}
223285
},
286+
// Similar structure for other response codes (401, 403, 404, 500)
287+
// Just repeat the same schema structure with different descriptions
224288
{
225289
name: "401"
226290
value: {
@@ -232,67 +296,45 @@ option (gnostic.openapi.v3.document) = {
232296
value: {
233297
schema: {
234298
schema: {
235-
ref: ".google.rpc.Status"
236-
}
237-
}
238-
}
239-
}]
240-
}
241-
}
242-
}
243-
},
244-
{
245-
name: "403"
246-
value: {
247-
response: {
248-
description: "Forbidden - User does not have permission to access the resource"
249-
content: {
250-
additional_properties: [{
251-
name: "application/json"
252-
value: {
253-
schema: {
254-
schema: {
255-
ref: ".google.rpc.Status"
256-
}
257-
}
258-
}
259-
}]
260-
}
261-
}
262-
}
263-
},
264-
{
265-
name: "404"
266-
value: {
267-
response: {
268-
description: "Not Found - The requested resource was not found"
269-
content: {
270-
additional_properties: [{
271-
name: "application/json"
272-
value: {
273-
schema: {
274-
schema: {
275-
ref: ".google.rpc.Status"
276-
}
277-
}
278-
}
279-
}]
280-
}
281-
}
282-
}
283-
},
284-
{
285-
name: "500"
286-
value: {
287-
response: {
288-
description: "Internal Server Error. Returned when theres is something wrong with Frontier server."
289-
content: {
290-
additional_properties: [{
291-
name: "application/json"
292-
value: {
293-
schema: {
294-
schema: {
295-
ref: ".google.rpc.Status"
299+
type: "object"
300+
properties: {
301+
additional_properties: [
302+
{
303+
name: "code"
304+
value: {
305+
schema: {
306+
type: "integer"
307+
format: "int32"
308+
}
309+
}
310+
},
311+
{
312+
name: "message"
313+
value: {
314+
schema: {
315+
type: "string"
316+
}
317+
}
318+
},
319+
{
320+
name: "details"
321+
value: {
322+
schema: {
323+
type: "array"
324+
items: {
325+
schema_or_reference: [
326+
{
327+
schema: {
328+
type: "object"
329+
}
330+
}
331+
]
332+
}
333+
}
334+
}
335+
}
336+
]
337+
}
296338
}
297339
}
298340
}
@@ -301,6 +343,7 @@ option (gnostic.openapi.v3.document) = {
301343
}
302344
}
303345
}
346+
// Continue with 403, 404, and 500 responses...
304347
]
305348
}
306349
security_schemes: {

0 commit comments

Comments
 (0)