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

NPE in Oas*ExamplesMutualExclusivityRule for single example #682

Open
tjuerge opened this issue Sep 12, 2023 · 0 comments
Open

NPE in Oas*ExamplesMutualExclusivityRule for single example #682

tjuerge opened this issue Sep 12, 2023 · 0 comments

Comments

@tjuerge
Copy link

tjuerge commented Sep 12, 2023

With activated global validity rule (Full) uploading an OpenAPI artifact using a single example (instead of multiple examples) an NPE is thrown and following error is shown:

image

Example artifact:

openapi: 3.0.3

info:
  title: Test
  version: 1.0.0

paths:
  /v1/test:
    get:
      operationId: test
      parameters:
        - name: PARAM
          in: header
          schema:
            type: string
          example: "myparam"   # <- culprit
      responses:
        '200':
          description: OK 

Searching for getExamples().size() shows where possibly a null check is missing:

image
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

1 participant