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

Linter is missing non existing enums in the default #1402

Closed
savage-alex opened this issue Nov 9, 2020 · 2 comments · Fixed by #1429
Closed

Linter is missing non existing enums in the default #1402

savage-alex opened this issue Nov 9, 2020 · 2 comments · Fixed by #1429
Assignees
Labels
OpenAPI Issues related to the OpenAPI ruleset t/bug Something isn't working v6 Scheduled to be released in v6
Milestone

Comments

@savage-alex
Copy link

savage-alex commented Nov 9, 2020

Spectral 5.6.0

Given the following schema property

property:
          type: string
          enum: [s, b, a, c]
          description: 'example schema for bug report'
          default: ''
          example: 'a'

Note that the validation on examples works great but no validation happens on default so I can leave it empty or put anything inside without spectral noticing.

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

P0lip commented Dec 29, 2020

Hey!
I'm on it. I'm not sure yet whether a new rule will be introduced for this one or not, but regardless of the choice, Spectral will be able to validate some of the patterns you mentioned.

@P0lip
Copy link
Contributor

P0lip commented Dec 29, 2020

The PR is up.

@P0lip P0lip added the OpenAPI Issues related to the OpenAPI ruleset label Dec 30, 2020
@P0lip P0lip added the v6 Scheduled to be released in v6 label Jan 4, 2021
@P0lip P0lip added this to the 2020-12-15 milestone Jan 6, 2021
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 v6 Scheduled to be released in v6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants