Closed hpanchal18 closed 7 years ago
I tired following that solve my issue.
Removed all ShwashBuckle references from project. Added SwashBuckle to the project First. Recompile the project and i started seeing Routes that are defined using WebAPI controller.
Added SwashBuckle.oData to the project next. Added oDataSwaggerProvider to swagger.config as following
c.CustomProvider(defaultProvider => new ODataSwaggerProvider(defaultProvider, c, GlobalConfiguration.Configuration).Configure(odataConfig => { // Set this flag to include navigation properties in your entity swagger models // //odataConfig.IncludeNavigationProperties(); }));
Recompile project and was able to generated documentation for Routes that are defined using oDataController and WebAPI Controller both.
Thanks. The docs mention "SwaggerConfig", but it wasn't clear (to me atleast!) that there is an actual SwaggerConfig.cs
file in the project.
Still doesn't work for me, but at least I got Swagger docs for other non-OData controllers now.
Hello,
We have IIS Hosted WebAPI project that has routes generated for WebAPI controller as well as oData controller. we are trying to generate documentation for the WebAPI for both type of controller using swashbucle.oData. I have added reference to the nuGet Packges and compiling the code too. but i see following 2 problems.
i have following questions:
At what point of time Swagger.json will be geenrated? during compile time of project or when someone try to access documenation for the first time using route?
can we document both type of routes (web API ) and oData controller routes added through mapOdataRoutes method?
Any help resolving the issue will be appreciated.