added api docs
This commit is contained in:
28
interface/api/organizations/get.yaml
Normal file
28
interface/api/organizations/get.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
get:
|
||||
tags: [Organizations]
|
||||
summary: Get organization by reference
|
||||
operationId: organizationsGet
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
|
||||
responses:
|
||||
'200':
|
||||
description: Organization details
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/organization.yaml#/components/schemas/OrganizationsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
15
interface/api/organizations/response/organization.yaml
Normal file
15
interface/api/organizations/response/organization.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
components:
|
||||
schemas:
|
||||
OrganizationsAuthData:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
- organizations
|
||||
properties:
|
||||
accessToken:
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
organizations:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../models/organization/organization.yaml#/components/schemas/Organization
|
||||
26
interface/api/organizations/root.yaml
Normal file
26
interface/api/organizations/root.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
get:
|
||||
tags: [Organizations]
|
||||
summary: List organizations of current account
|
||||
operationId: organizationsList
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Organizations list
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/organization.yaml#/components/schemas/OrganizationsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
Reference in New Issue
Block a user