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

Missing validation of child parameter child properties #1400

Closed
savage-alex opened this issue Nov 9, 2020 · 1 comment · Fixed by #1430
Closed

Missing validation of child parameter child properties #1400

savage-alex opened this issue Nov 9, 2020 · 1 comment · Fixed by #1430
Assignees
Labels
OpenAPI Issues related to the OpenAPI ruleset t/bug Something isn't working
Milestone

Comments

@savage-alex
Copy link

savage-alex commented Nov 9, 2020

Spectral VScode version 0.2.4 and spectral 5.6.0

Is not flagging an issue when a designer forgets to include a schema for a path parameter and enters type directly:

/required-actions/{actionId}:
  put:
    description: 'The description'
    operationId: updateRequiredActionById
    tags:
      - Required-Actions
    parameters:
      - name: alias
        in: path
        type: string
        required: true
        example: 'VERIFY_EMAIL'
      - name: default
        in: path
        type: boolean
        required: true
        example: false 

To Reproduce

Given the above OAS, lint the definition and no error will be raised

Expected behaviour
type is flagged as an invalid additional property

Additional context
SwaggerHub is now able to notice this but spectral was not :-(

@savage-alex savage-alex added the t/bug Something isn't working label Nov 9, 2020
@P0lip
Copy link
Contributor

P0lip commented Dec 30, 2020

Hey!
I'm sorry for keeping you waiting. Happy to inform that the PR addressing the issue has just been opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenAPI Issues related to the OpenAPI ruleset t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants