Fix: Make swagger doc compliant to OpenAPI (#3394)
This fixes issues in the swagger.json file. The motivation to do so is to be able to generate API clients using https://openapi-generator.tech Doing so will require further changes to the api spec, but this seems like a good first step since it is now "valid" according to editor.swagger.io and openapi-generator validate. Fixes #2806
This commit is contained in:
@@ -11,21 +11,22 @@ parameters:
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- email
|
||||
- role
|
||||
properties:
|
||||
name:
|
||||
name:
|
||||
type: string
|
||||
description: Full Name of the agent
|
||||
required: true
|
||||
email:
|
||||
type: string
|
||||
description: Email of the Agent
|
||||
required: true
|
||||
role:
|
||||
role:
|
||||
type: string
|
||||
enum: ['agent', 'administrator']
|
||||
description: Whether its administrator or agent
|
||||
required: true
|
||||
availability_status:
|
||||
availability_status:
|
||||
type: string
|
||||
enum: ['available', 'busy', 'offline']
|
||||
description: The availability setting of the agent.
|
||||
|
||||
@@ -8,8 +8,7 @@ security:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the agent to be deleted
|
||||
responses:
|
||||
|
||||
@@ -8,8 +8,7 @@ security:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the agent to be updated.
|
||||
- name: data
|
||||
@@ -17,13 +16,14 @@ parameters:
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- role
|
||||
properties:
|
||||
role:
|
||||
role:
|
||||
type: string
|
||||
enum: ['agent', 'administrator']
|
||||
description: Whether its administrator or agent
|
||||
required: true
|
||||
availability:
|
||||
availability:
|
||||
type: string
|
||||
enum: ['available', 'busy', 'offline']
|
||||
description: The availability setting of the agent.
|
||||
@@ -39,4 +39,4 @@ responses:
|
||||
404:
|
||||
description: Agent not found
|
||||
403:
|
||||
description: Access denied
|
||||
description: Access denied
|
||||
|
||||
Reference in New Issue
Block a user