Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hot reload for referenced files #213

Closed
mauris opened this issue Jun 21, 2022 · 3 comments
Closed

hot reload for referenced files #213

mauris opened this issue Jun 21, 2022 · 3 comments
Labels
builds enhancement New feature or request

Comments

@mauris
Copy link
Contributor

mauris commented Jun 21, 2022

Please correct me if I'm wrong:

OpenAPI 3.0 supports breaking down the main spec file into smaller files through the use of $ref. In fact, Redoc supports the use of $ref: ./intro.md to import Markdown content into description fields.

Docusaurus provides hot-reload through Webpack. In redocusaurus, this is implemented through docusaurus-plugin-redoc where getPathsToWatch() returns the absolute pathname to the spec file.

However, this only provides hot-reload to the main spec file, and not other referenced files.

I propose that we scan the refs and include them in the getPathsToWatch() so that hot reload can be properly implemented for referenced files loaded in Docusaurus.

@rohit-gohri rohit-gohri added enhancement New feature or request builds labels Jun 21, 2022
@rohit-gohri
Copy link
Owner

Sounds like a good idea

@mauris
Copy link
Contributor Author

mauris commented Jul 4, 2022

instead of scanning the $ref tags, we could use the fileDependencies result from the bundle() function. neat.

@mauris mauris closed this as completed Jul 12, 2022
@rohit-gohri
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants