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

Regression: 2.1.26 fails on any header with a style property #2167

Open
Mahoney opened this issue Mar 26, 2025 · 2 comments
Open

Regression: 2.1.26 fails on any header with a style property #2167

Mahoney opened this issue Mar 26, 2025 · 2 comments

Comments

@Mahoney
Copy link

Mahoney commented Mar 26, 2025

Regression, worked in 2.1.25.

The following OpenAPI:

openapi: 3.1.0
info:
  title: Example
  version: 1.0.0

servers:
  - url: https://api.example.com

paths:
  /foo:
    get:
      description: Demonstrate the issue
      responses:
        "204":
          description: Demonstrate the issue
          headers:
            RateLimit:
              style: simple

Fails when passed to the following code:

SwaggerParseResult swaggerParseResult = new OpenAPIV3Parser()
    .readContents(
        "",
        null,
        new ParseOptions(),
        null
    );
assert swaggerParseResult.getOpenAPI() != null;
assert swaggerParseResult.getMessages().isEmpty();

swaggerParseResult.getOpenAPI() returns null and swaggerParseResult.getMessages() returns one element, Cannot invoke "String.equals(Object)" because "value" is null.

@Mahoney
Copy link
Author

Mahoney commented Mar 26, 2025

Suspect #2164 is the cause of the problem

@alexisnouvel
Copy link

We have the same issue, it should be fixed by that PR: #2166

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

2 participants