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

@ -13,9 +13,6 @@ class ErrorResponseAutoSchema(SwaggerAutoSchema):
"""Get a generic error schema"""
return openapi.Schema(
"Generic API Error",
type=openapi.TYPE_OBJECT,
properties={
"errors": openapi.Schema(
type=openapi.TYPE_OBJECT,
properties={
"detail": openapi.Schema(
@ -25,8 +22,6 @@ class ErrorResponseAutoSchema(SwaggerAutoSchema):
type=openapi.TYPE_STRING, description="Error code"
),
},
)
},
required=["detail"],
)

View File

@ -14466,9 +14466,6 @@ definitions:
required:
- detail
type: object
properties:
errors:
type: object
properties:
detail:
description: Error details
@ -14496,9 +14493,6 @@ definitions:
required:
- detail
type: object
properties:
errors:
type: object
properties:
detail:
description: Error details