Skip to content

Missing Response Header Validation checks except for 'Content-Type' #201

@Ventrosky

Description

@Ventrosky

openapi3filter.ValidateResponse checks only the"Content-Type"header, not performing controls on other header specified in the schema

For example:

info:
  version: 1.0.0
  title: Test schema
paths:
  /:
    get:
      responses:
        '200':
          description: A json response
          headers:
            x-version:
              schema:
                type: string
          content:
            application/json:    
              schema:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                required:
                  - id

Should we consider not valid a response missing the "X-Version" header? At the moment is considered valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions