Support external $ref references in OpenAPI documents #5711
kyz9rus23
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.
-
Feature Request: Support External OpenAPI
$refReferencesSummary
Please add native support for external
$refreferences in OpenAPI documents usedby Mintlify's API reference and API playground.
Mintlify currently documents that
$refis supported for internal referencesonly within a single OpenAPI document, and that external references are not
supported:
https://www.mintlify.com/docs/api-playground/openapi-setup
OpenAPI itself supports splitting API descriptions into multiple connected
documents, including references to external files:
https://spec.openapis.org/oas/v3.1.0.html
Supporting external refs would let teams use Mintlify directly with their
canonical OpenAPI source files instead of requiring a custom pre-bundling step.
Problem
Many spec-first API teams keep OpenAPI definitions modular. A common structure
looks like this:
Each API spec can then reuse common components:
This keeps large API definitions maintainable and reduces drift between public,
internal, admin, and partner APIs.
Today, Mintlify cannot consume these source specs directly. Teams must first
bundle them into single-file OpenAPI documents, then point Mintlify to the
generated files. That workaround is functional, but it creates an extra
Mintlify-specific build artifact and another place where docs can drift from the
source of truth.
Why This Is Important
External OpenAPI refs are important because they support maintainable API
documentation at scale.
For small APIs, a single OpenAPI file is manageable. For larger products, one
file quickly becomes difficult to review, validate, and evolve. Shared schemas,
error models, pagination models, headers, request bodies, responses, examples,
and security schemes are often reused across several API surfaces.
Native external ref support would help teams:
SDK generation, and CI checks
This is especially valuable for teams that maintain multiple OpenAPI files in a
monorepo or documentation repository.
Requested Behavior
Mintlify should resolve external
$refreferences before rendering API referencepages and API playground schemas.
Minimum requested scope:
component
pointer cannot be resolved
Example refs:
Ideal full support:
components.schemascomponents.parameterscomponents.responsescomponents.headerscomponents.requestBodiescomponents.examplescomponents.securitySchemesmint dev,mint validate, preview deployments, andproduction deployments
Remote URL refs could be a separate later enhancement because they introduce
additional caching, network, and security considerations.
Acceptance Criteria
successfully in Mintlify.
the spec had been pre-bundled.
mint devandmint validatereport clear errors for missing files, invalidJSON pointers, unsupported ref targets, and circular refs.
duplicated definitions.
Beta Was this translation helpful? Give feedback.
All reactions