Skip to content

Quote HTTP response status keys in the generated OpenAPI YAML #89

Description

@verdie-g

defs/asana_oas.yaml emits HTTP response status keys as unquoted YAML numbers:

responses:
  200:
  400:
  401:

YAML parsers decode these keys as integers, but OpenAPI Response Object status-code keys are strings. Strict parsers such as openapi-pydantic reject the document; the current specification produces 1,542 validation errors for this reason.

Could the generator quote these keys?

responses:
  "200":
  "400":
  "401":

Stringifying the keys before validation makes the document pass.

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