Forum Discussion
Hi ponelat
I use the following libraries for the code:
Swashbuckle.AspNetCore.Annotations Version="5.6.3"
Swashbuckle.AspNetCore.SwaggerGen Version="5.6.3"
Swashbuckle.AspNetCore.SwaggerUI Version="5.6.3"
Swashbuckle.AspNetCore.Filters Version="6.0.0"
Microsoft.AspNetCore.Authorization;
Microsoft.AspNetCore.Mvc;
Microsoft.AspNetCore.Mvc.ModelBinding;
We don't use swagger files. The definition is made in the controllers, not in a swagger file.
Thanks for the supplied libraries.
Those libraries will, under the hood, create and read an OpenAPI definition file (ie: Swagger file).
Something like the following...
In order to figure out what's going wrong, we'd need that Swagger file.
If you can see Swagger UI, then you may be able to download the Swagger file, it can be found in the top text box and as a link under the APIs title, as shown here...
If the API is private, it may make sense to redact or copy out only the relevant info to see what the issue is.
Hope that helps! Alternatively, you can reach out to the maintainers of the Swashbuckle library (I believe this is the one: https://github.com/domaindrivendev/Swashbuckle.AspNetCore )
- gerardsoley5 years agoNew Contributor
Hi!
I have deleted the unnecessary code. Here is the swagger file.
Thanks for the help!- ponelat5 years ago
Staff
Ok, the definition looks correct. Which means the problem lies with the code generated for the Controller (routing code or model code).
Unfortunately that's outside of scope, your best bet is to create a ticket on https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/ . You can provide the definition you shared to rule out a few cases in Swashbuckle.
Hope you come right!