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

Minor: unnecessary check for specLike on machines running Windows OS #125

Open
Nedgeva opened this issue Aug 26, 2020 · 0 comments
Open

Comments

@Nedgeva
Copy link
Collaborator

Nedgeva commented Aug 26, 2020

There is a chance forisRoot false negative result due to specific filepath "normalizing" in "json-schema-ref-parser" lib: https://github.com/APIDevTools/json-schema-ref-parser/blob/0980b0a89b7181655129e4e6be7da78dd10d6a4c/lib/util/url.js#L231
So check for root (

const isRoot = fullPath === spec;
) will fail in some cases:
spec path resolved by node: 'd:\somefolder\somefile'
same path "normalized" by json-schema-ref-parser: 'D:\somefolder\somefile'
See attached pic.
2020-08-26_14h08_13

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

No branches or pull requests

1 participant