You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AdditionalPropertiesAllowed is not serialized into additionalProperties even when explicitly set to false #2664
When generating an OpenAPI document using Microsoft.OpenApi, setting OpenApiSchema.AdditionalPropertiesAllowed = false does not result in additionalProperties: false being emitted in the generated OpenAPI document.
As a result, it is currently impossible to generate a "closed" object schema
(using additionalProperties: false) through the public API, even though AdditionalPropertiesAllowed exists on OpenApiSchema.
This leads to incorrect OpenAPI output and breaks downstream tools such as
NSwag, OpenAPI Generator, Kiota, etc.
Expected behavior
When AdditionalPropertiesAllowed is explicitly set to false, the generated
OpenAPI should contain:
Thanks for your answer and sorry for not specifying which version I was using.
I was using v2.3.12 (released on december 15) for compatibility purpose with Microsoft.AspNetCore.OpenApi v10.0.1, I missed december 16 and december 17 upgrades, it's working as expected with the latest version.
Activity
baywet commentedon Jan 5, 2026
Hi shazamViz
Thank you for using the SDK and for reaching out.
What version of the library are you using? could you please double check you're on the latest version for that major?
We had a very similar issue a couple of weeks ago which was fixed and relased:
Let us know if you have any additional comments or questions.
shazamViz commentedon Jan 6, 2026
Hi,
Thanks for your answer and sorry for not specifying which version I was using.
I was using v2.3.12 (released on december 15) for compatibility purpose with Microsoft.AspNetCore.OpenApi v10.0.1, I missed december 16 and december 17 upgrades, it's working as expected with the latest version.
baywet commentedon Jan 6, 2026
Thank you for the additional information.
Closing