api: fix invalid swagger schema
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
36c34e05f8
commit
21ea527623
|
@ -15,17 +15,12 @@ class ErrorResponseAutoSchema(SwaggerAutoSchema):
|
||||||
"Generic API Error",
|
"Generic API Error",
|
||||||
type=openapi.TYPE_OBJECT,
|
type=openapi.TYPE_OBJECT,
|
||||||
properties={
|
properties={
|
||||||
"errors": openapi.Schema(
|
"detail": openapi.Schema(
|
||||||
type=openapi.TYPE_OBJECT,
|
type=openapi.TYPE_STRING, description="Error details"
|
||||||
properties={
|
),
|
||||||
"detail": openapi.Schema(
|
"code": openapi.Schema(
|
||||||
type=openapi.TYPE_STRING, description="Error details"
|
type=openapi.TYPE_STRING, description="Error code"
|
||||||
),
|
),
|
||||||
"code": openapi.Schema(
|
|
||||||
type=openapi.TYPE_STRING, description="Error code"
|
|
||||||
),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
required=["detail"],
|
required=["detail"],
|
||||||
)
|
)
|
||||||
|
|
30
swagger.yaml
30
swagger.yaml
|
@ -14467,15 +14467,12 @@ definitions:
|
||||||
- detail
|
- detail
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
errors:
|
detail:
|
||||||
type: object
|
description: Error details
|
||||||
properties:
|
type: string
|
||||||
detail:
|
code:
|
||||||
description: Error details
|
description: Error code
|
||||||
type: string
|
type: string
|
||||||
code:
|
|
||||||
description: Error code
|
|
||||||
type: string
|
|
||||||
ValidationError:
|
ValidationError:
|
||||||
title: Validation Error
|
title: Validation Error
|
||||||
type: object
|
type: object
|
||||||
|
@ -14497,15 +14494,12 @@ definitions:
|
||||||
- detail
|
- detail
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
errors:
|
detail:
|
||||||
type: object
|
description: Error details
|
||||||
properties:
|
type: string
|
||||||
detail:
|
code:
|
||||||
description: Error details
|
description: Error code
|
||||||
type: string
|
type: string
|
||||||
code:
|
|
||||||
description: Error code
|
|
||||||
type: string
|
|
||||||
Coordinate:
|
Coordinate:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Reference in New Issue