feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374)

This commit is contained in:
Daniel Jimenez
2025-05-22 19:26:44 +12:00
committed by GitHub
parent 8697a30dc5
commit 4b417ce9e7
189 changed files with 10098 additions and 5847 deletions

View File

@@ -5,37 +5,33 @@ summary: Create an Account User
description: Create an Account User
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- user_id
- role
properties:
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/account_user_create_update_payload'
responses:
200:
'200':
description: Success
schema:
properties:
account_id:
type: integer
description: The ID of the user
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
401:
content:
application/json:
schema:
type: object
properties:
account_id:
type: integer
description: The ID of the account
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -5,23 +5,18 @@ summary: Delete an Account User
description: Delete an Account User
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- user_id
properties:
user_id:
type: integer
description: The ID of the user
responses:
200:
'200':
description: Success
401:
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The account does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,23 +6,15 @@ description: List all account users
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
schema:
type: array
description: 'Array of account users'
items:
type: object
properties:
account_id:
type: integer
description: The ID of the user
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
401:
content:
application/json:
schema:
$ref: '#/components/schemas/account_user'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -5,16 +5,22 @@ summary: Create an Account
description: Create an Account
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/account_create_update_payload'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/account_create_update_payload'
responses:
200:
description: Success
schema:
$ref: '#/definitions/platform_account'
content:
application/json:
schema:
$ref: '#/components/schemas/platform_account'
401:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,9 +6,17 @@ description: Delete an Account
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
401:
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The account does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,11 +6,21 @@ description: Get the details of an account
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
schema:
$ref: '#/definitions/platform_account'
401:
content:
application/json:
schema:
$ref: '#/components/schemas/platform_account'
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The given account does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -5,16 +5,22 @@ summary: Update an account
description: Update an account's attributes
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/account_create_update_payload'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/account_create_update_payload'
responses:
200:
description: Success
schema:
$ref: '#/definitions/platform_account'
content:
application/json:
schema:
$ref: '#/components/schemas/platform_account'
401:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -5,16 +5,22 @@ summary: Create an Agent Bot
description: Create an agent bot
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/agent_bot_create_update_payload'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/platform_agent_bot_create_update_payload'
responses:
200:
'200':
description: Success
schema:
$ref: '#/definitions/agent_bot'
401:
content:
application/json:
schema:
$ref: '#/components/schemas/agent_bot'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,9 +6,17 @@ description: Delete an AgentBot
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
401:
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The agent bot does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,12 +6,18 @@ description: List all agent bots available
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
schema:
type: array
description: 'Array of agent bots'
items:
$ref: '#/definitions/agent_bot'
401:
content:
application/json:
schema:
type: array
description: 'Array of agent bots'
items:
$ref: '#/components/schemas/agent_bot'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,11 +6,21 @@ description: Get the details of an agent bot
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
schema:
$ref: '#/definitions/agent_bot'
401:
content:
application/json:
schema:
$ref: '#/components/schemas/agent_bot'
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The given agent bot ID does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -5,16 +5,22 @@ summary: Update an agent bot
description: Update an agent bot's attributes
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/agent_bot_create_update_payload'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/platform_agent_bot_create_update_payload'
responses:
200:
'200':
description: Success
schema:
$ref: '#/definitions/agent_bot'
401:
content:
application/json:
schema:
$ref: '#/components/schemas/agent_bot'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -5,16 +5,22 @@ summary: Create a User
description: Create a User
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/user_create_update_payload'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/user_create_update_payload'
responses:
200:
'200':
description: Success
schema:
$ref: '#/definitions/user'
401:
content:
application/json:
schema:
$ref: '#/components/schemas/user'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,9 +6,17 @@ description: Delete a User
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
401:
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The user does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,15 +6,25 @@ description: Get the sso link of a user
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
schema:
type: object
properties:
url:
type: string
description: SSO url to autenticate the user
401:
content:
application/json:
schema:
type: object
properties:
url:
type: string
description: SSO url to autenticate the user
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The given user does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -6,11 +6,21 @@ description: Get the details of an user
security:
- platformAppApiKey: []
responses:
200:
'200':
description: Success
schema:
$ref: '#/definitions/user'
401:
content:
application/json:
schema:
$ref: '#/components/schemas/user'
'401':
description: Unauthorized
404:
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
'404':
description: The given user does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -5,16 +5,22 @@ summary: Update a user
description: Update a user's attributes
security:
- platformAppApiKey: []
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/user_create_update_payload'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/user_create_update_payload'
responses:
200:
'200':
description: Success
schema:
$ref: '#/definitions/user'
401:
content:
application/json:
schema:
$ref: '#/components/schemas/user'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'