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:
For Backend to Backend OpenAPI spec:
spectral lint --ruleset .spectral.backend.yaml <path to the openapi.yaml file>
For Backend For Frontend OpenAPI spec:
spectral lint --ruleset .spectral.frontend.yaml <path to the openapi.yaml file>
You can also run the PowerShell Core script test.ps1
to run all tests.