Skip to content

OAS 3.1: description in Server Variable Object rejected as unevaluated property #293

Open

Description

@mmjohansson

SwaggerParser.validate() rejects valid OpenAPI 3.1 documents where a Server Variable Object has a description, which is allowed by the spec (https://spec.openapis.org/oas/v3.1.0#server-variable-object). Reproduced with 12.1.0 and 13.1.0.

openapi: 3.1.0
info: { title: t, version: '1' }
paths: {}
servers:
  - url: https://{host}/v1
    variables:
      host:
        default: example.com
        description: Host name
Swagger schema validation failed.
  #/servers/0/variables/host must NOT have unevaluated properties

@apidevtools/openapi-schemas@2.1.0 bundles the OAS 3.1 schema from 2021-04-15, where the property is misspelled as descriptions. It was fixed upstream in OAI/OpenAPI-Specification@a8bd1a5, but never released in openapi-schemas (see APIDevTools/openapi-schemas#4).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions