mirror of https://github.com/zulip/zulip.git
docs: Create JsonSuccess and JsonError definitions.
This commit is contained in:
parent
e5d4e0f0eb
commit
d56ec79dd9
|
@ -412,22 +412,11 @@ paths:
|
||||||
'200':
|
'200':
|
||||||
description: Success
|
description: Success
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: '#/definitions/JsonSuccess'
|
||||||
required:
|
|
||||||
- msg
|
|
||||||
- result
|
|
||||||
properties:
|
|
||||||
msg:
|
|
||||||
type: string
|
|
||||||
result:
|
|
||||||
type: string
|
|
||||||
'400':
|
'400':
|
||||||
description: Bad request.
|
description: Bad request.
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: '#/definitions/JsonError'
|
||||||
required:
|
|
||||||
- msg
|
|
||||||
- result
|
|
||||||
properties:
|
properties:
|
||||||
msg:
|
msg:
|
||||||
type: string
|
type: string
|
||||||
|
@ -459,6 +448,29 @@ securityDefinitions:
|
||||||
####################
|
####################
|
||||||
# Shared definitions
|
# Shared definitions
|
||||||
definitions:
|
definitions:
|
||||||
|
JsonResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
msg:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
result:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
JsonSuccess:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/JsonResponse'
|
||||||
|
properties:
|
||||||
|
msg:
|
||||||
|
default: success
|
||||||
|
|
||||||
|
JsonError:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/JsonResponse'
|
||||||
|
properties:
|
||||||
|
msg:
|
||||||
|
default: error
|
||||||
|
|
||||||
# /messages
|
# /messages
|
||||||
MessageResponse:
|
MessageResponse:
|
||||||
|
|
Loading…
Reference in New Issue