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

bug(openapi): false positive - wrongly required items for string type #7020

Open
UncleGoogle opened this issue Apr 22, 2024 · 0 comments
Open
Labels
bug Something isn't working community Community contribution openapi OpenAPI query query New query feature

Comments

@UncleGoogle
Copy link

UncleGoogle commented Apr 22, 2024

In the openapi v2 docs we can see this

Required if type is "array"

so in this example parameters are valid (talking about "inner" itemes"):

openapi: 3.0.3
paths:
  /v1/sourceTypes:
    delete:
      description: 'XXX'
      tags:
      - data_sources
      - v1
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - name: ids
        in: query
        required: true
        type: array
        items:
          type: string
        description: ''
      responses:
        200:
          description: Successful Response
          schema:
            type: string
          headers: {}

Expected Behavior

No error

Actual Behavior

error 5e5ecb9d-04b5-4e4f-b5a5-6ee04279b275 is raised with descriprtion:

            "name": "OpenAPI Object should contain all of its required fields",
            "description": "items is missing required fields",

Specifications

  • Version: GitLab kics analyzer v4.1.13
@UncleGoogle UncleGoogle added bug Something isn't working community Community contribution labels Apr 22, 2024
@github-actions github-actions bot added query New query feature openapi OpenAPI query labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Community contribution openapi OpenAPI query query New query feature
Projects
None yet
Development

No branches or pull requests

1 participant