Open Closed

How to implement SwaggerUI in Application Module #61


0
angela created

Is it possible to get SwaggerUI/Swashbuckle to correctly list my application services. So far I have had no success. Is there any plans to integrate documentation tools in the future?


5 Answer(s)
  • 0
    angela created

    Let me be a bit more specific. I was able to get swaggerUI into my project. However I am unable to get the methods from Application Services. It just lists AbpServiceProxies And ServiceProxies. I saw something in a previous post about using the DynamicApiControllerManager.GetAll() static method. But I cannot get it to work either.

  • 0
    cosmic created

    Hi, maybe this will help you:

    http://bitoftech.net/2014/08/25/asp-net ... g-swagger/ http://www.strathweb.com/2014/04/opt-op ... help-page/

    I followed these manuals and the Swagger is fully functional for my Web API. It should work for you too.

  • 0
    hikalkan created

    Hi cosmic. Could you work swagger with dynamically created web api layer for application services? I did not use swagger before but as I read the docs it investigates static web API classes. Isn't it? If you could do, please share here. Thanks.

  • 0
    cosmic created

    Actually it works with my static Web API, as I wrote before. With dynamically created Web API, Swagger only generate following docs:

    GET - /api/AbpServiceProxies
    POST - /api/AbpServiceProxies
    
    GET - /api/ServiceProxies
    POST - /api/ServiceProxies
    

    I spent many time with configuration of Swagger, but I was unsuccessful with dynamic Web API. Maybe someone will figure it out with help of tutorials I posted before.

  • 0
    hikalkan created

    Thanks. I think Swagger can not discover dynamic web api controllers since they are created on runtime. It's only possible if we can provide an interface to Swagger to include it to documentation.