Follow the instructions on this link for installing spectral to install Spectral. Once that installation completes, you may test the Spectral ruleset through the terminal with the command:
spectral lint --ruleset .spectral.yaml <path to the openapi.yaml file>
You can also run the PowerShell Core script test.ps1
to run all tests.