Closed metsaleht closed 1 week ago
It seems that Redocusaurus can more or less do this. Would this be possible with this plugin as well? https://redocusaurus.vercel.app/docs/guides/schema-imports
Hi @metsaleht, this is certainly possible today for *.schema.mdx
files:
For example:
import PartialExample from './petstore/schemas/pet.schema.mdx';
import BrowserWindow from '@site/src/components/BrowserWindow';
## Here's my Pet Schema!
<BrowserWindow bodyStyle={{height: 300, overflow: "auto"}}>
<PartialExample />
</BrowserWindow>
...results in:
Note that I copied the
BrowserWindow
component used in the docusaurus.io website
However. this doesn't work as nicely for *.api.mdx
partials, for a couple of reasons:
ApiExplorer
panel.api
front matter would need to be copied into the target docHi @metsaleht, I went ahead and added a doc covering this use case: https://docusaurus-openapi-36b86--pr945-w54smjhg.web.app/advanced#importing-mdx
Hi,
I am well aware of the functionality of importing one MDX file into another in docusaurus, and that works great; however, I can't get it to work with the openapi mdx files. The usecase why I am trying to do it is because we have two different openapi specifications and it would be great if I could import components from two different specifications into a markdown file where I write and add additional information and then for context add the component. Is this a fantasy, or would it be possible?
This is a very crude visualization, what I mean.