Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI response validation returns internal server error if declared response header is not present #1119

Closed
comrt opened this issue Jun 6, 2024 · 4 comments

Comments

@comrt
Copy link

comrt commented Jun 6, 2024

If an OpenAPI document declares a response header with validateResponses set to true in the proxies.xml and the backend service does not return this header, the validation fails with:

"message": "Cannot invoke \"java.lang.Boolean.booleanValue()\" because the return value of \"io.swagger.v3.oas.models.headers.Header.getRequired()\" is null"

@predic8
Copy link
Member

predic8 commented Jun 7, 2024

Hi @comrt,
thanks for reporting. We fixed this in version 5.5.2. If you experience that behaviour still in 5.5.2 please tell us.

@predic8 predic8 closed this as completed Jun 7, 2024
@rrayst
Copy link
Contributor

rrayst commented Jun 7, 2024

@predic8 The next release is 5.5.3.

@comrt
Copy link
Author

comrt commented Jun 7, 2024

@predic8 the behaviour still occurs in version 5.5.2, if the attribute required is missing.

responses:
  200:
    description: No Content
    headers:
      X-Custom-Header:
       #required: false
        description: Custom Response Header
        schema:
          type: string

Does closing this issue mean, it will be fixed in 5.5.3 ?

@predic8
Copy link
Member

predic8 commented Jun 7, 2024

@comrt you are right. We created a pr for that:

#1120

In the next release 5.5.3 it will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants