-
Notifications
You must be signed in to change notification settings - Fork 281
Open
Description
Describe the bug
After switching to OpenAPI 3.1 I am seeing "Additional properties false" added to every root/nested object in schema
OpenApi File To Reproduce
{
"openapi": "3.1.1",
"info": {
"title": "API",
"version": "1"
},
"paths": {
"/": {
"get": {
"parameters": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BooleanModelResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"BooleanModel": {
"type": "object",
"properties": {
"showBanner": {
"type": "boolean"
}
},
"additionalProperties": false
},
"BooleanModelResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/BooleanModel"
}
},
"additionalProperties": false
}
},
"securitySchemes": {}
},
"security": [],
"tags": []
}
Expected behavior
Additional properties false property not part of schema in UI
Actual behavior
Additional properties false property part of schema in UI
Additional context
Pasting provided sample swagger.json file into (I believe) official generator yields exact same behavior. ( Changing version to "openapi": "3.0.6" hides Additional proerties forbidden field).
Is there any way to prevent "additionalProperties": false from being added to generated swagger.json?
Or is that the correct and expected behavior?
Metadata
Metadata
Assignees
Labels
No labels