cancel
Showing results for 
Search instead for 
Did you mean: 

Header templating in swagger yml

Highlighted
New Member

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. 

New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2
Top Kudoed Authors