api: fix invalid swagger schema

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-29 22:34:24 +02:00
parent 36c34e05f8
commit 21ea527623
2 changed files with 18 additions and 29 deletions

View File

@ -15,17 +15,12 @@ class ErrorResponseAutoSchema(SwaggerAutoSchema):
"Generic API Error",
type=openapi.TYPE_OBJECT,
properties={
"errors": openapi.Schema(
type=openapi.TYPE_OBJECT,
properties={
"detail": openapi.Schema(
type=openapi.TYPE_STRING, description="Error details"
),
"code": openapi.Schema(
type=openapi.TYPE_STRING, description="Error code"
),
},
)
"detail": openapi.Schema(
type=openapi.TYPE_STRING, description="Error details"
),
"code": openapi.Schema(
type=openapi.TYPE_STRING, description="Error code"
),
},
required=["detail"],
)

View File

@ -14467,15 +14467,12 @@ definitions:
- detail
type: object
properties:
errors:
type: object
properties:
detail:
description: Error details
type: string
code:
description: Error code
type: string
detail:
description: Error details
type: string
code:
description: Error code
type: string
ValidationError:
title: Validation Error
type: object
@ -14497,15 +14494,12 @@ definitions:
- detail
type: object
properties:
errors:
type: object
properties:
detail:
description: Error details
type: string
code:
description: Error code
type: string
detail:
description: Error details
type: string
code:
description: Error code
type: string
Coordinate:
type: object
properties: