cancel
Showing results for 
Search instead for 
Did you mean: 

Route with same path but different URL

New Member

Route with same path but different URL

Hello,

 

I want to make my APIs  documentations with Swagger. I have a micro services architectures but I want the documentation of every APIs to be on the same page. I sometimes have the same path for 2 APIs, like /book for a "library" MS and a "media" MS, one is to store the metadata of a book (like the author) whereas the other is to store the actual book. Those MS have different URLs (https://media.domain.com and https://library.domain.com).

 

I wrote the documentation directly on the .yml format

 

Is there a way to write the documentation of those 2 routes with the same page on the same swagger ?

1 REPLY 1
Occasional Visitor

Re: Route with same path but different URL

That doesn’t make much sense since a parameter can be anything how would the router know the difference? The way router works out the paths is with paths, not parameters. Why don’t you include an additional element on your path like homes/detail/?

Tags (2)
New Here?
Join us and watch the welcome video:
Announcements