Swagger-ui renders a the API definition as it receives it. Theoretically, if 
you’d want to have an individual instance per resource, you’d need to have a 
separate file for each.

 

That said, you can check out the `filter` parameter of swagger-ui, more details 
at 
https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md.
 This may answer your needs.

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Ryan Brown 
<ryankbr...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, March 6, 2018 at 16:19
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Swagger-ui for multiple resources

 

Hi everyone. I'm putting together a swagger-ui route for an api that has 18 
resources. I would like to have a parent swagger-ui for the entire API 
(http://my.api.com/swagger-ui.html) and individual ones for each resource. Is 
it considered good practice is such cases to hand the swagger-ui off of each 
resource in this case? say like http://my.api.com/users/swagger-ui.html and  
http://my.api.com/orders/swagger-ui.html ? For some reson I am not quite sure 
how to handle this as I have always just had a parent route that exposed all of 
the resources in the API. However, we have a requirement to expose individual 
resources with a swagger-iu endpoint as well. Any guidance is great appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to