How to specify request headers in the Blueprint API

I am trying to define an API project for a resource that uses request headers to figure out what type of content will be returned.

## Offer [/offers/{offerCode}] + Parameters + offerCode: summer2015 (required, string) - alphanumeric offer code ### View an Offer Detail [GET] + Response 200 (application/vnd.v0.1.0+json) { ........ } 

I want my query to be as follows: -

 GET /offers/summer2015 HTTP/1.1 Host: my.api.com Accept: application/vnd.v0.1.0+json 

How can I document this using the Blueprint API?

+5
source share
1 answer

I'm not sure if I understand what you want to achieve, but I would say that you want to specify a title for the request, and you can do this by specifying the request in the same way as the answer.

 ## Offer [/offers/{offerCode}] + Parameters + offerCode: summer2015 (required, string) - alphanumeric offer code ### View an Offer Detail [GET] + Request + Headers Accept: application/vnd.v0.1.0+json + Response 200 (application/vnd.v0.1.0+json) { ........ } 
+13
source

All Articles