Forum Discussion

saisrikarmutya's avatar
saisrikarmutya
New Member
6 years ago

Header templating in swagger yml

I have a header param version and an API with GET and POST methods.

 

If the version is 1.0, then it is for GET API and If the version is 1.2, then it is for POST.

 

@RequestMapping(method = RequestMethod.GET, headers = { "version=1" })
@RequestMapping(method = RequestMethod.POST, headers = { "version=2" })

I am unable to find a way to put this in swagger file documentation yml. 

No RepliesBe the first to reply