sinclairnick / webroute

🕸️ Web APIs, from the route up
https://webroute.vercel.app/docs
MIT License
55 stars 2 forks source link

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

Closed sinclairnick closed 3 months ago

sinclairnick commented 6 months ago

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 commented 5 months ago

Need to migrate to @anatine/zod-openapi instead