Skip to content

NPE in Oas*ExamplesMutualExclusivityRule for single example #682

Open
@tjuerge

Description

@tjuerge

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions