I'm trying to do Inheritance of properties and extending of them on another schema by using allOf, but instead of the object, the null is shown
I even tried it with the example, but still got the same result
example: https://swagger.io/docs/specification/v3_0/data-models/inheritance-and-polymorphism/#model-composition
^ null should be the
{
"message": "string",
"code": 0,
"rootCause": "string"
}
my schema
## Same as in example
BasicErrorModel:
type: object
required:
- message
- code
properties:
message:
type: string
code:
type: integer
minimum: 100
maximum: 600
ExtendedErrorModel:
allOf: # Combines the BasicErrorModel and the inline model
- $ref: "#/components/schemas/BasicErrorModel"
- type: object
required:
- rootCause
properties:
rootCause:
type: string
## I'm trying to use it
## BasicErrorModel is working as expected, but ExtendedErrorModel is not
ICommentReleasePagedResponse:
type: object
properties:
code:
"$ref": "#/components/schemas/DefaultResult"
content:
type: array
items:
"$ref": "#/components/schemas/ExtendedErrorModel"
total_count:
type: integer
example: 0
total_page_count:
type: integer
example: 0
current_page:
type: integer
example: 0
I'm trying to do Inheritance of properties and extending of them on another schema by using allOf, but instead of the object, the
nullis shownI even tried it with the example, but still got the same result
example: https://swagger.io/docs/specification/v3_0/data-models/inheritance-and-polymorphism/#model-composition
^
nullshould be the{ "message": "string", "code": 0, "rootCause": "string" }my schema