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

False positive: "someParameter" property must not have unevaluated properties #2739

Open
ostrolucky opened this issue Nov 15, 2024 · 0 comments

Comments

@ostrolucky
Copy link

Describe the bug
Getting a weird error on schemas generated by API Platform. This is same as reported at APIDevTools/swagger-cli#83 with addition of allowEmptyValue. Without it, it doesn't reproduce.

To Reproduce

Run spectral lint with spectral:oas ruleset on following schema

openapi: 3.1.0
info:
    title: Test
    version: 1.0.0

servers:
    - url: "https://example.com/{someParameter}"
      variables:
          someParameter:
              default: sometest123
              description: Some description!
              allowEmptyValue: false

paths: {}

will get you

 9:25    error  oas3-schema            "someParameter" property must not have unevaluated properties.  servers[0].variables.someParamete

Expected behavior
No errors

Environment (remove any that are not applicable):

  • Library version: 6.14.1
  • OS: MacOS 15.1

Additional context

Apparently, this issue doesn't happen if you either change version from 3.1.0 to 3.0.0, or remove allowEmptyValue

@ostrolucky ostrolucky changed the title False positive: "0" property must not have unevaluated properties. False positive: "someParameter" property must not have unevaluated properties Nov 15, 2024
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