redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

no-unresolved-refs should be case-sensitive

Open CidTori opened this issue 9 months ago • 3 comments

$ref values are URI and URI are case-sensitive, therefore, no-unresolved-refs should be case-sensitive.

It seems to vary with the OS at the moment (case-insensitive on Windows).

CidTori avatar Nov 12 '23 00:11 CidTori

Hi @CidTori! The rule itself relies on resolving refs on the current filesystem. As far as I'm aware, the Windows system is case-insensitive, so the refs are getting resolved successfully. Could you elaborate on your case? What's the issue?

tatomyr avatar Nov 13 '23 14:11 tatomyr

My problem is that a working openapi file on my (Windows) dev system can break on the CI or in production (with Linux machines). Linters like Redocly are the only way to know that there is a case mismatch locally (when using Windows), before pushing. And since the spec says it's case-sensitive, it can't hurt.

CidTori avatar Nov 13 '23 14:11 CidTori

That makes sense. Thanks for sharing.

tatomyr avatar Nov 13 '23 15:11 tatomyr