Skip to content

Get data from response header #230

@myrho

Description

@myrho

In an OpenAPI we can define response data in headers. Is it supported to get these in?

Example spec:

....
paths:
  /xyz:
    get:
      operationId: get_xyz
      responses:
        "200":
          description: OK
          headers:
            X-Ratelimit:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/xyz'
      summary: Get XYZ

So with this spec I would expect the generator to generate request function where I can pass a callback which would not only process the response body but also a type holding the values from the response header, eg. a record like {xRatelimit : Int}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions