cancel
Showing results for 
Search instead for 
Did you mean: 

Rest application with only one path.

Highlighted
Occasional Visitor

Rest application with only one path.

Hi,

 

I am working on a REST application project (go language), which has only a single path to access different services (/alpha). The 'Accept header' actually contains the information to identify and call a specific service.

For example:

 

/alpha

Accept Header: aplha.v1+json

Retruns: Object x

 

/alpha

Accept Header: alpha.v2+json

Returns: Object y

 

I don't know how to use swagger API to document the REST APIs in this case. I tried giving the same path (/alpha) in the annotation section (go-swagger) of two rest functions, but the generated output only contains one api information (the last annotated api in the go file).

 

Is there any workaround to this problem? Kindly help.

New Here?
Join us and watch the welcome video:
Watch the New Interview
7Mistakes
Join our online event
SeptemberHubBub
Join the September Hub-bub to show off, learn and win