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

update paths to watch for handling multi-file OpenAPI docs #219

Merged
merged 3 commits into from
Jul 9, 2022

Conversation

mauris
Copy link
Contributor

@mauris mauris commented Jul 4, 2022

Implements #213

The bundle function in @redocly/openapi-core package provides the property fileDependencies, where it can be used to provide to Docusaurus through getPathsToWatch() a list of files to watch for changes because they are referenced from the main OpenAPI file through $ref references.

However changes to the list of files watched does not get updated by Docusaurus while running.

Test case:

  1. Run the example site in dev using yarn dev
  2. make changes in website/openapi/multi-file/components/pets.yaml
  3. hot reload occurs and changes show up on example site

@changeset-bot
Copy link

changeset-bot bot commented Jul 4, 2022

🦋 Changeset detected

Latest commit: 5d64e44

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
docusaurus-plugin-redoc Patch
redocusaurus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 4, 2022

Someone is attempting to deploy a commit to a Personal Account owned by @rohit-gohri on Vercel.

@rohit-gohri first needs to authorize it.

@vercel
Copy link

vercel bot commented Jul 9, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
redocusaurus ✅ Ready (Inspect) Visit Preview Jul 9, 2022 at 4:40PM (UTC)

@rohit-gohri
Copy link
Owner

However changes to the list of files watched does not get updated by Docusaurus while running.

That was easy enough to fix, I just added the spec file too. Thanks for the PR

@rohit-gohri rohit-gohri merged commit 70d14f9 into rohit-gohri:main Jul 9, 2022
@github-actions github-actions bot mentioned this pull request Jul 9, 2022
@mauris mauris deleted the feature/hot-reload-refs branch July 12, 2022 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants