swagger-api / swagger-parser

Swagger Spec to Java POJOs
http://swagger.io
Apache License 2.0
778 stars 525 forks source link

Response header references are not resolved #1037

Open chris-prop opened 5 years ago

chris-prop commented 5 years ago

We have our responses set up as follows:

  /users/{userId}:
    get:
      description: Returns details for an individual user
      operationId: getUserById
      tags:
        - user
      parameters:
        - $ref: '#/components/parameters/userId'
        responses:
        '200':
          description: Success
          headers:
            content-language:
              $ref: '#/components/headers/contentLanguage'
            api-request-id:
              $ref: '#/components/headers/apiRequestId'

It looks to me like the parser is not resolving the references in the header. Should it? Or should this be handled further downstream?

chris-prop commented 5 years ago

After spending more time looking at this, it seems the references should not be resolved in the parser, but in the generator.