-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AdditionalProperties has AdditionalPropertiesAllowed=false #1502
Comments
Actually it is a big issue. (for me at least) Microsofts autorest tool does not accept a boolean value for additionalProperties and crashes. As a workaround i implemented a DocumentFilter:
Oddly setting the AdditionalPropertiesAllowed removes the AdditionalProperties and in the startup:
Also mentioned in: |
This happens to me as well. I can't use Swashbuckle until it is fixed. |
More context: Azure/autorest#3497 |
@richardscholten73 your workaround didn't work for me unfortunately. I still get those properties. I don't get how it's different from your setup somehow. Could there be something else involved? |
Not that i know of. It's been awhile since i worked on that project. Maybe the workaround does not work anymore on newer versions? My project is on 5.5.1 |
@ffMathy the workaround works for me in latest Swashbuckle version 6.1.4. Make sure you register |
Worked like a charm, thank you! As the |
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
When JsonDictionaryHandler sets the OpenApiSchema.AdditionalProperties, that OpenApiSchema will have AdditionalPropertiesAllowed == false. This in turns will add "additionalProperties": false to every AdditionalProperties-entry in the generated swagger.
Probably not a big issue, but I think it is unnecessary.
The text was updated successfully, but these errors were encountered: