Allow labeling oneOf/anyOf variants in nested polymorphic schemas (currently always "Option 1 / Option 2")
#6026
rcalejan
started this conversation in
Feature Requests
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.
-
Allow labeling
oneOf/anyOfvariants in nested polymorphic schemas (currently always "Option 1 / Option 2")Mintlify renders polymorphic schema variants with meaningful labels (the
$refschema name) when the union sits at the top level of a response or request body. This works correctly:But when the same pattern is nested inside an array's
items(or any deeper position), tabs collapse to "Option 1", "Option 2", … with no override:Where
Itemis aoneOfofVariantA/VariantB. Mintlify renders this with tabs literally labeled "Option 1" and "Option 2", regardless of:$refschema names of the branchesdiscriminator.mappingblock keyed by the discriminator valuetitleon each inline branch{ "title": "...", "allOf": [{ "$ref": "..." }] }wrapper patternoneOf→anyOfThis is a common shape for batch endpoints where each item in the array can be one of N variant types, and there's currently no way to label them.
Requested: Have the renderer use the
$refschema name (or honordiscriminator.mappingkeys, or atitlekeyword) foroneOf/anyOfvariants regardless of nesting depth — not just at the top-level schema position.Alternative if behavior change is risky: an
x-mintextension on the union or on each branch that explicitly sets the tab label, e.g.:Happy to provide a minimal repro repo if useful.
Beta Was this translation helpful? Give feedback.
All reactions