Forum Discussion

eric_bryan's avatar
eric_bryan
New Contributor
5 years ago

Does Swagger create routes or controllers while executing documentation for Rest Api (C#)

Hello everybody,
I am trying to set rights (according to my own database repository) to my C# Rest Api Swagger documentation.
In other words, I would like to decide who can display the Swagger documentation for my Rest Api.
I would like to know how does Swagger works.
Does it create controllers, routes when executing which I can catch by code to check the rights before displaying ?
What are the objects I can interact with ?
I would like to read the current routes to check in my database who can display documentation for this route.
Thank you very much in advance.
Eric.

2 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi Eric,

     

    Since you use C# you're most likely using Swashbuckle. Swashbuckle is not one our projects and we don't know the specifics of how it works. Your best bet is to go through the Swashbuckle documentaiton, and if you don't find answers to your questions, file a ticket with them for further support.

    • eric_bryan's avatar
      eric_bryan
      New Contributor

      Thank you for your answer Helen,

      I will post my question in the Swashbuckle tag.

      Eric.