You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some REST APIs like to respond with non-2XX status codes, and sometimes they have important details you need in the response headers (two separate issues, but related when you get 30X + Location header, e.g.)
Proposal:
For all properties in the responses object in a swagger operation entry, set min/maxStatusCode properties in the fetch to support them; this is gofer-specific behavior, and overly broad, but should be an adequate workaround for now
For all responses that have defined response headers, make the headers, conforming to their defined schemae, available in one enclosing response dictionary-style object, keyed by the lowercase header names, under...some unique version of the word "headers"(?)
e.g.:
paths:
'/go/{id}':
get:
responses:
301:
description: redirect to page for idheaders:
Location:
type: stringformat: uri
and then in your GraphQL query you should be able to ask for { headers { location } } - the only question is how to choose the name headers so it doesn't conflict with something in the body schema, potentially.
The text was updated successfully, but these errors were encountered:
Some REST APIs like to respond with non-2XX status codes, and sometimes they have important details you need in the response headers (two separate issues, but related when you get 30X + Location header, e.g.)
Proposal:
responses
object in a swagger operation entry, set min/maxStatusCode properties in the fetch to support them; this is gofer-specific behavior, and overly broad, but should be an adequate workaround for nowe.g.:
and then in your GraphQL query you should be able to ask for
{ headers { location } }
- the only question is how to choose the nameheaders
so it doesn't conflict with something in the body schema, potentially.The text was updated successfully, but these errors were encountered: