Azure / api-center

Provide feedback, request features, and report issues for Azure API Center.
MIT License
27 stars 4 forks source link

API Analysis - Stoplight package support #54

Open juliajuju93 opened 5 days ago

juliajuju93 commented 5 days ago

Description

API Analysis supports spectral as our linting engine.

The following example style guides don't work as we don't support downloading stoplight packages.

How can I get the following example rulesets to work:

extends:

juliajuju93 commented 14 hours ago

This is a known issue from VS Code Spectral Extension: https://github.com/stoplightio/vscode-spectral/issues/214

As a workaround, please try updating the 'extends' property to point to remote URL or local dist JS file:

extends: - "https://unpkg.com/@stoplight/spectral-owasp-ruleset/dist/ruleset.mjs" - "https://unpkg.com/@stoplight/spectral-url-versioning/dist/ruleset.mjs"

or

extends: - "node_modules/@stoplight/spectral-owasp-ruleset/dist/ruleset.js" - "node_modules/@stoplight/spectral-url-versioning/dist/ruleset.js"