Forum Discussion

saumikdandapat's avatar
saumikdandapat
New Contributor
3 years ago

Multiple endpoints. No fixed basepath.

We have apis like this:

http://dictionary-get-api.content.geodeservice.dev.us-east-1.aws.fdscloud.io/api/v1/dictionary  

http://dictionary-getbyid-api.content.geodeservice.dev.us-east-1.aws.fdscloud.io/api/v1/dictionary?id=1&kwd=PEVC  

http://dictionary-patch-api.content.geodeservice.dev.us-east-1.aws.fdscloud.io/api/v1/dictionary/3  

For dev and prod server we just need to change only the part of the endpoint in bold.

 

As you can see there are no fixed basepaths. All endpoints are different. So in swagger documentation, we cant have a specific server name due to that. So each endpoint should go at path level but we should have the endpoints at path level but path names should be like this '/api/v1/dictionary' starting with /.

 

How do i use swagger to document my APIs in this case. Please help me find a solution to my problem.

No RepliesBe the first to reply