I have simple ASP.Net WebApi that use Swagger, added it using Swashbuckle. I need to show Swagger documentation as a HTML page from my ASP.Net app.
I don't know where to start, any suggestion or link would be great.
Thanks!
When you activate Swagger you can see the docu online at
https://yourpath/swagger/index.html (or something like that).
Related
I'm using swagger to make a documentation to my API in ASP.NET Core.
And, I would like to use the shared layout to get the same menu on the top of the documentation page.
I would love to do it without re-creating a custom css file, like the documentation says.
I just hope that someone though the same as me, and I was wondering how.
Thanks in advance,
Hi I'm using swagger ui in my web api project. It's very good but i am facing some ui issue in page.
this is the snapshot
How can I fix this issue by adding custom css. if i have to add custom css then where i have to add. in project file or in swagger ui project then i have to import. I am also using swashbuckle to show respone message.
Please suggest me.
In swashbuckle there is an option:
InjectStylesheet
that should do exactly what you need.
That is located in the SwaggerConfig.cs and is relatively simple to integrate.
See my example here:
https://github.com/heldersepu/SwashbuckleTest/blob/master/Swagger_Test/App_Start/SwaggerConfig.cs#L238
I have created a new application using the ASPNetBoilerplate MVC 5x template. I have integrated Swagger UI according to the link:
https://aspnetboilerplate.com/Pages/Documents/Swagger-UI-Integration
Again using the MVC 5x version
When I run the app and use http://localhost:/swagger to access the API and try to run any of the GetAll methods, I get a 400 error.
I have modified the .cs file and created the .js files by cutting the code directly from the documentation and made the required changes.
What am I missing?
Thanks
I hope you are not navigating to http://localhost:/swagger because there's a typo error. Correct url is http://localhost/swagger
There's no official support for bearer token for Swagger UI Api calls. But you can checkout the link below. A developer achieves what you want
https://github.com/aspnetboilerplate/module-zero-core-template/pull/87
I have created a new WEB API project integrating Swashbuckle and Swagger UI.
I am able to access Swagger web page via http://localhost:port/swagger/ui/index#/
However, where is the view/index.html/index.cshtml for this page?
I am a newbie to MVC, please help.
The swagger-ui is served by the swashbuckle assembly. The source is not available in your project. You can, however, retrieve the source from github and inject it in swashbuckle as described in the swashbuckle documentation
On the KendoUI site, I've found a working example of a KendoUI grid with MVC wrappers.
I don't use those wrappers.
Is there already support for json(p) for WebApi?
I've tried with the JsonPMediaTypeFormatter, with no decent result.
I can only read for the ApiController, but the put, post and delete don't work.
any examples?
You cannot do POST over JSONP.
Yes, there is an example on github.com site look at this :
https://github.com/telerik/kendo-examples-asp-net/
or
https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-webapi-crud
this is web api and you can download it az zip file then add web-api assembly to it, it works with web-api very nice.
you can search about what exactly you need on this :
https://github.com/telerik/kendo-examples-asp-net/commit/b6d70769fc226340e16a7fdb6da4329331f7927b