devexperts / devexperts/swagger-codegen-ts
Minor: unnecessary check for specLike on machines running Windows OS
- Dominant language
- TypeScript
- Stars
- 80
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
There is a chance for`isRoot` 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 ( https://github.com/devexperts/swagger-codegen-ts/blob/a1ef03aa4b3c586aa9987499917a9781eb49605b/src/index.ts#L50 ) 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.

Contributor guide
No contributing guide indexed for this repository
Research direction
Start at src/index.ts line 50 and compare its root check with the path normalization described in json-schema-ref-parser's lib/util/url.js line 231. Reproduce the differing drive-letter casing on Windows, then verify that the root check handles the normalized path consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100