Support for advanced OpenAPI features
oneOf
, anyOf
, allOf
oneOf
, anyOf
, and allOf
keywords, allowing you to combine schemas in certain ways. You can read more about these keywords in the Swagger documentation, but essentially:
oneOf
functions like an “exclusive-or” operatoranyOf
functions like an “or” operatorallOf
functions like an “and” operatoroneOf
and anyOf
keywords the same. We have found that, when people use oneOf
, they often mean anyOf
- and there is often no meaningful difference to the user.not
keyword.allOf
allOf
, Mintlify combines the properties of both into a single object. This becomes especially useful when leveraging OpenAPI’s reusable components
.
oneOf
and anyOf
oneOf
or anyOf
, Mintlify displays the options in a tabbed container. To give your options helpful names, make sure to give each subschema a title
field. For example, here’s how you might display two different types of delivery addresses:
x-codeSamples
x-codeSamples
extension. This property can be added within any request method, and has the following schema: