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
additionalProperties not set in schema for OpenApi V2 documents since v2.3.11, loss of information in things that return dictionaries #2719
We have some C# code with a schema that returns an IDictionary, where the value is a C# object, e.g.
publicclassTestItemResult{publicboolIsMatched{get;set;}publicstring?Reason{get;set;}}[HttpGet("test-items")]publicasyncTask<IDictionary<string,TestItemResult>>TestItem(...){// returns a dictionary of test item name to test result}
Our OpenApi generation is configured to set.
OpenApiVersion=OpenApiSpecVersion.OpenApi2_0;
We are using OpenApi indirectly via Swashbuckle.AspNetCore, we picked up the change transitively with an upgrade from Swashbuckle.AspNetCore version 10.1.0 to 10.1.2, which changes the referenced version of Microsoft.OpenApi from 2.3.9 to 2.4.2
I looked at the OpenApi release history / changelog, and noted that the change starts with Issue 2619, wherein a user observes "Additional properties false" is incorrectly added to every object in shcema when switching to OpenAPI 3.1
It was then marked fixed in
PR 2630 - fix: additional properties serialization should not emit a schema in v2 fix: additional properties serialization should not emit booleans in v3.1+
Looking at the discussion in the issue and PR's, it looks as though the fix was intended to prevent spurious additionalProperties: false in v3.
It has also removed information from a v2 schema, which doesn't seem to fit with the intent of the bug fix.
If we pick up the new version, our customers will experience this as loss of information/functionality in the swagger document.
Was this loss of information intentional, and if so would it be possible to help us understand why, and/or if there are any changes we can make our our end to work around the issue?
changed the title [-]additionalProperties not set in schema for OpenApi V2 documents since v2.3.11, breaking dictionary types[/-][+]additionalProperties not set in schema for OpenApi V2 documents since v2.3.11, loss of information in things that return dictionaries[/+]on Feb 8, 2026
Activity
[-]additionalProperties not set in schema for OpenApi V2 documents since v2.3.11, breaking dictionary types[/-][+]additionalProperties not set in schema for OpenApi V2 documents since v2.3.11, loss of information in things that return dictionaries[/+]baywet commentedon Feb 17, 2026
Hi Orion Edwards (@borland),
Thank you for using the SDK and for reaching out.
Yes, the additionalProperties keyword should be serialized the same way across all versions since it's present since OpenAPI v2.0 and defined as a schema or boolean since JSON schema draft 04:
As for deserialization:
Is this something you'd like to submit a pull request for provided some guidance?
Related #2727 #2716