Errors on OpenAPI 3.1 type: [string, null] schemas
#2572
efe
started this conversation in
Bugs & Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Mintlify, 👋
We’re seeing local dev server errors when rendering API reference pages generated from an OpenAPI 3.1 spec that uses JSON Schema–style nullable union types (e.g. type:
[string, "null"]). The pages still render correctly, but the Mintlify local server logs repeated schema conversion errors.Environment
Steps to reproduce
3 Observe console output in the Mintlify local server logs.
Actual behavior
Mintlify logs errors like:
Despite these errors, the properties still appear to render correctly in the docs UI.
Expected behavior
Mintlify should accept OpenAPI 3.1 / JSON Schema union types such as:
…without logging schema conversion errors.
Workaround
If we downgrade the nullable syntax to the OpenAPI 3.0 style, the errors disappear:
However, this is not ideal because our spec is OpenAPI 3.1 and nullable: true is a legacy OpenAPI 3.0 construct.
Additional notes
This appears to be a compatibility issue in Mintlify’s schema conversion layer, which likely assumes type is always a string rather than allowing an array (valid in JSON Schema / OAS 3.1).
If you’d like, we can provide a minimal repro OpenAPI document containing one endpoint and a schema with
type: [string, "null"].Beta Was this translation helpful? Give feedback.
All reactions