Open
Description
Describe the bug
In the following example, the reference for def-a
(or def-b
) is not printed but only inlined.
Expected behavior
I would expect to see a reference towards the definition
Minimal reproducible OpenAPI snippet(if possible)
{
"openapi": "3.0.3",
"info": {
"title": "Example",
"version": "0.1"
},
"paths": {
"/api/configuration": {
"get": {
"summary": "Get the configuration",
"description": "Get the current configuration",
"parameters": [],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"enum": [null],
},
{
"required": [
"one"
],
"type": "object",
"properties": {
"one": {
"allOf": [
{
"$ref": "#/components/schemas/def-a"
},
{
"required": [
"two"
],
"type": "object",
"properties": {
"two": {
"allOf": [
{
"$ref": "#/components/schemas/def-b"
},
{
}
]
}
}
}
]
}
}
}
]
}
}
}
}
}
}
},
},
"components": {
"schemas": {
"def-a": {
"required": [
"y"
],
"type": "object",
"properties": {
"z": {
"default": 5,
"type": "integer"
},
"y": {
"enum": [null],
"description": "Unit"
}
}
},
"title-int": {
"type": "integer"
},
"def-b": {
"required": [
"w"
],
"type": "object",
"properties": {
"w": {
"type": "string"
}
}
}
}
}
}
Screenshots
I would expect to see a reference to def-a
and def-b
in the output of /api/configuration
Additional context