Skip to content
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

SwaggerRequestExample does not generate examples #222

Open
karygauss03 opened this issue Apr 4, 2023 · 1 comment
Open

SwaggerRequestExample does not generate examples #222

karygauss03 opened this issue Apr 4, 2023 · 1 comment

Comments

@karygauss03
Copy link

I am using [SwaggerRequestExample] from Swashbuckle.AspNetCore.Filters to generate examples to my schemas definition in the swagger file. But I got only a new field in each schema named additionalProperties: false and I don't know why I got this result instead of getting my examples.

I followed the tutorial provided in the documentation and I have tried the XML solution, but nothing works.

@mattfrear
Copy link
Owner

Hello
I don't use this filter on new projects myself any more, as using XML comments is usually adequate. Have you tried that?
https://mattfrear.com/2020/04/21/request-and-response-examples-in-swashbuckle-aspnetcore/

If you need to use the filter for some reason, then I can help you with that. Please post your example controller action method, your example, and your AddSwaggerGen method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants