Skip to content

Make schema.pathURI() produce specification-compliant URIs from Windows paths #16

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

Merged
merged 1 commit into from
Nov 6, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 6, 2020

The path in a file URI must always start with /, but Windows paths do not.

The current JSON schema validation package has code to handle the missing slash, but the package that will be transitioned requires the correct format.

I did quite a bit of searching for a canonical Golang way of doing this and was surprised to find nothing.

Reference:
https://docs.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows#proper-syntax

@per1234 per1234 requested a review from silvanocerza November 6, 2020 07:21
…ws paths

The path in a `file` URI must always start with `/`, but Windows paths do not.
@per1234 per1234 force-pushed the per1234/valid-windows-file-uri branch from 8f2da0e to c7241eb Compare November 6, 2020 08:11
@per1234 per1234 merged commit ab420b8 into main Nov 6, 2020
@per1234 per1234 deleted the per1234/valid-windows-file-uri branch November 6, 2020 20:56
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants