You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spectral doesn't seem to cope well with backslashes in paths on Windows.
To Reproduce
Given this OpenAPI document '...'
lib.yaml
openapi: 3.0.0paths: 17components:
schema:
Test:
type: number
Run this CLI command '....'
Powershell (Take 1)
PS C:> yarn spectral lint .\repro\lib.yaml
No results with a severity of 'hint' or higher found!
Done in1.52s.
Bash
$ C:\node_modules\.bin\spectral lint ./repro/lib.yaml
OpenAPI 3.x detected
c:/repro/lib.yaml
1:1 warning api-servers OpenAPI `servers` must be present and non-empty array.
1:1 error oas3-schema should have required property 'info'
1:1 warning info-contact Info object should contain `contact` object.
1:1 warning info-description OpenAPI object info `description` must be present and non-empty string.
✖ 4 problems (1 error, 3 warnings, 0 infos, 0 hints)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Powershell (Take 2typing the full path, using forward slashes and fighting to not rely on shell auto completion (which would revert every slashes to backward ones))
PS C:\> yarn spectral lint ./repro/lib.yaml
yarn run v1.15.2
$ C:\node_modules\.bin\spectral lint ./repro/lib.yaml
OpenAPI 3.x detected
c:/repro/lib.yaml
1:1 warning api-servers OpenAPI `servers` must be present and non-empty array.
1:1 error oas3-schema should have required property 'info'1:1 warning info-contact Info object should contain `contact` object.
1:1 warning info-description OpenAPI object info `description` must be present and non-empty
string.
✖ 4 problems (1 error,3 warnings,0 infos,0 hints)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Expected behavior
Current default Spectral user experience for a guy working on a Windows computer is pretty poor (not everyone use bash as his/her default shell on Windows).
Spectral should properly parse paths, even the ones that look weird to a *nix user 😉
Although the issue is shown with Powershell, standard Windows cmd also exposes the same behavior.
Environment (remove any that are not applicable):
Library version: 4.2.0
OS: Windows 7
The text was updated successfully, but these errors were encountered:
Describe the bug
Spectral doesn't seem to cope well with backslashes in paths on Windows.
To Reproduce
lib.yaml
Powershell (Take 1)
Bash
Powershell (Take 2 typing the full path, using forward slashes and fighting to not rely on shell auto completion (which would revert every slashes to backward ones) )
Expected behavior
Current default Spectral user experience for a guy working on a Windows computer is pretty poor (not everyone use
bash
as his/her default shell on Windows).Spectral should properly parse paths, even the ones that look weird to a *nix user 😉
Although the issue is shown with Powershell, standard Windows cmd also exposes the same behavior.
Environment (remove any that are not applicable):
The text was updated successfully, but these errors were encountered: