Skip to content

Commit 741a2c6

Browse files
update proto
1 parent 5ad8079 commit 741a2c6

1 file changed

Lines changed: 213 additions & 3 deletions

File tree

raystack/frontier/v1beta1/admin.proto

Lines changed: 213 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,154 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
126126
security_requirement: {key: "Bearer"}
127127
}
128128
};
129+
130+
option (gnostic.openapi.v3.document) = {
131+
openapi: "3.0.0"
132+
info: {
133+
title: "Frontier Administration API"
134+
version: "0.2.0"
135+
description: "The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows."
136+
contact: {
137+
name: "Raystack Foundation"
138+
url: "https://raystack.org/"
139+
email: "hello@raystack.org"
140+
}
141+
license: {
142+
name: "Apache 2.0"
143+
url: "https://github.com/raystack/frontier/blob/main/LICENSE"
144+
}
145+
}
146+
servers: [
147+
{
148+
url: "http://127.0.0.1:7400"
149+
description: "Local development server"
150+
}
151+
]
152+
tags: [
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"}
162+
]
163+
components: {
164+
security_schemes: {
165+
additional_properties: [
166+
{
167+
name: "Basic"
168+
value: {
169+
security_scheme: {
170+
type: "http"
171+
scheme: "basic"
172+
description: "use Client ID as username and Client Secret as password"
173+
}
174+
}
175+
},
176+
{
177+
name: "Bearer"
178+
value: {
179+
security_scheme: {
180+
type: "http"
181+
scheme: "bearer"
182+
description: "Access token or JWT token, prefixed by Bearer: Bearer <token>"
183+
}
184+
}
185+
}
186+
]
187+
}
188+
responses: {
189+
additional_properties: [
190+
{
191+
name: "Error"
192+
value: {
193+
response: {
194+
description: "Error response"
195+
content: {
196+
additional_properties: [
197+
{
198+
name: "application/json"
199+
value: {
200+
schema: {
201+
schema: {
202+
type: "object"
203+
properties: {
204+
additional_properties: [
205+
{
206+
name: "code"
207+
value: {
208+
schema: {
209+
type: "integer"
210+
format: "int32"
211+
}
212+
}
213+
},
214+
{
215+
name: "message"
216+
value: {
217+
schema: {
218+
type: "string"
219+
}
220+
}
221+
},
222+
{
223+
name: "details"
224+
value: {
225+
schema: {
226+
type: "array"
227+
items: {
228+
schema_or_reference: [
229+
{
230+
schema: {
231+
type: "object"
232+
}
233+
}
234+
]
235+
}
236+
}
237+
}
238+
}
239+
]
240+
}
241+
}
242+
}
243+
}
244+
}
245+
]
246+
}
247+
}
248+
}
249+
}
250+
]
251+
}
252+
}
253+
security: [
254+
{
255+
additional_properties: [
256+
{
257+
name: "Basic"
258+
value: {
259+
value: []
260+
}
261+
}
262+
]
263+
},
264+
{
265+
additional_properties: [
266+
{
267+
name: "Bearer"
268+
value: {
269+
value: []
270+
}
271+
}
272+
]
273+
}
274+
]
275+
};
276+
129277
service AdminService {
130278
// Users
131279
rpc ListAllUsers(ListAllUsersRequest) returns (ListAllUsersResponse) {
@@ -248,7 +396,7 @@ service AdminService {
248396

249397
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
250398
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
251-
rpc ExportOrganizations(ExportOrganizationsRequest) returns (stream google.api.HttpBody) {
399+
rpc ExportOrganizations(ExportOrganizationsRequest) returns (stream google.api.HttpBody) {
252400
option (google.api.http) = {
253401
get: "/v1beta1/admin/organizations/export"
254402
};
@@ -262,13 +410,75 @@ service AdminService {
262410
tags: ["Organization"];
263411
summary: "Export organizations";
264412
description: "Export organization with demographic properties and billing plan details";
413+
operation_id: "AdminService_ExportOrganizations";
265414
responses: {
415+
default: {
416+
response: {
417+
description: "Error response",
418+
content: {
419+
additional_properties: [
420+
{
421+
name: "application/json",
422+
value: {
423+
schema: {
424+
schema: {
425+
type: "object",
426+
properties: {
427+
additional_properties: [
428+
{
429+
name: "code",
430+
value: {
431+
schema: {
432+
type: "integer",
433+
format: "int32",
434+
description: "Error code"
435+
}
436+
}
437+
},
438+
{
439+
name: "message",
440+
value: {
441+
schema: {
442+
type: "string",
443+
description: "Error message"
444+
}
445+
}
446+
},
447+
{
448+
name: "details",
449+
value: {
450+
schema: {
451+
type: "array",
452+
description: "Error details",
453+
items: {
454+
schema_or_reference: [
455+
{
456+
schema: {
457+
type: "object",
458+
description: "Any protobuf message"
459+
}
460+
}
461+
]
462+
}
463+
}
464+
}
465+
}
466+
]
467+
}
468+
}
469+
}
470+
}
471+
}
472+
]
473+
}
474+
}
475+
},
266476
response_or_reference: [
267477
{
268478
name: "200",
269479
value: {
270480
response: {
271-
description: "Successful organization export in CSV format",
481+
description: "Successful CSV export",
272482
content: {
273483
additional_properties: [
274484
{
@@ -290,7 +500,7 @@ service AdminService {
290500
]
291501
}
292502
};
293-
}
503+
}
294504

295505
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
296506
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE

0 commit comments

Comments
 (0)