I need to generate an API with apipie-rails, but I want to generate the documentation for the headers like this one "X-User-Email" or "X-User-Token".
I have this resource description:
resource_description do
short 'Cars'
formats ['json']
param 'X-User-Email <X-User-Email>', String, :desc => "HEADER param: Email must correspond to TOKEN owner", :required => false
param 'X-User-Token <X-User-Token>', String, :desc => "HEADER param: Token must correspond to EMAIL owner", :required => false
error :code => 401, :desc => "Unauthorized - Returned when authentication can't be achieved via login or missing/expired api token"
end
But, the argument param
doesn't help me in this case.
Is this possible?
You can do something like:
header 'X-User-Email', '...expected value...'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With