Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

False positive: #/servers/0/variables/someParameter must NOT have unevaluated properties #83

Open
berzi opened this issue Oct 13, 2022 · 0 comments

Comments

@berzi
Copy link

berzi commented Oct 13, 2022

Given the following spec:

openapi: 3.1.0
info:
  title: Test
  version: 1.0.0

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

paths: {}

swagger-cli reports:

Swagger schema validation failed.
#/servers/0/variables/someParameter must NOT have unevaluated properties

The error goes away if I remove the description property.

The error message is rather arcane (what is an unevaluated property? What does it mean for a property to be "unevaluated"? What can I do to fix this?), but besides that, the error is, as far as I can tell, a false positive, because the specification for openapi 3.1.0 allows this schema and the description property.

This only occurs for 3.1.0: if I change the first line to openapi: 3.0.3 the schema validates correctly. Note that the description property is allowed on both the mentioned versions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant