You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: @encode on a nullable property emits a schema that rejects null in OpenAPI 3.1 and 3.2 #12015
With openapi-versions: ["3.1.0"], @encode on a nullable property writes the encoded type and format next to the anyOf, not inside it. That top level type always rejects null. When the encoding changes the type, like unixTimestamp, seconds or @encode(string) on a number, it can't match the anyOf either, so every value fails. When the type stays a string, like rfc7231 on utcDateTime, only null fails. 3.2.0 does the same. 3.0.0 is fine, and so is the property without | null. Happy to send a PR.
Activity
fix(openapi3): apply `@encode` to the inner type of nullable properti…