-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix: JSON Schema Docgen doesn't work on Windows OS #66414
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a windows setup to test, but this makes sense to me 👍
Co-authored-by: Jon Surrell <sirreal@users.noreply.github.com>
* Fix: JSON Schema Docgen doesn't work on Windows OS * Update bin/api-docs/gen-theme-reference.mjs Co-authored-by: Jon Surrell <sirreal@users.noreply.github.com> * Lint --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
* Fix: JSON Schema Docgen doesn't work on Windows OS * Update bin/api-docs/gen-theme-reference.mjs Co-authored-by: Jon Surrell <sirreal@users.noreply.github.com> * Lint --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Related to #63868
Reported in this comment on Slack
Original report
What?
This PR fixes the
docs:theme-ref
command so that it works on Windows OS.Why?
When running the
docs:theme-ref
command on Windows OS, the following error occurs:When we investigated this issue, we found that
THEME_JSON_SCHEMA_URL.pathname
has an invalid path like the following:I found a similar report about this path in the node project: nodejs/node#37845
How?
According to the comment, this path is a valid URL, but it seems that the URL needs to be converted to a path:
Testing Instructions
schemas/json/theme.json
file.npm run docs:theme-ref
.theme-json-living.md
file should be updated.