-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
This can be seen for example in NSwag.Sample.NETCore22 (unmodified):
Operation /pet/{petId}:
Definition:
"/pet/{petId}": {
"get": {
"tags": [
"Pet"
],
"operationId": "Pet_FindById",
"parameters": [
{
"name": "petId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/Pet"
}
]
}
}
}
},
The schemas for the other responses are visible because they are array types. But the problem exists for all single object return types.
The only workaround I found is
config.DefaultReferenceTypeNullHandling = ReferenceTypeNullHandling.NotNull;
But that doesn't seem to be a good solution...
Metadata
Metadata
Assignees
Labels
No labels