webroute icon indicating copy to clipboard operation
webroute copied to clipboard

OpenAPI: Some nullable types are appearing incorrectly in the open api schema

Open sinclairnick opened this issue 2 years ago • 1 comments

Example:

          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    draftId:
                      type: string
                    title:
                      type:
                        - string
                        - 'null'

Causes error:

should be equal to one of the allowed values
allowedValues: array, boolean, integer, number, object, string

sinclairnick avatar Mar 14 '24 08:03 sinclairnick

Need to migrate to @anatine/zod-openapi instead

sinclairnick avatar Apr 02 '24 07:04 sinclairnick