Skip to content

feat: add Remote Resources: Authentication + Custom Spectral Rulesets #1319

Description

@ivangsa

Remote Resources: Authentication + Custom Spectral Rulesets

Add support for authenticated remote $refs and custom Spectral governance rules.

Auth for remote resources

  • Per-host auth headers config (Bearer, API key, Basic) stored in localStorage via settings
  • Applied to all remote fetch() calls: $ref resolution and ruleset loading
  • New "Remote Access" tab in Settings modal

Custom Spectral rulesets

  • New SpectralService runs alongside the parser and merges diagnostics into the existing Problems tab
  • Rulesets configured by URL in settings (enable/disable per ruleset)
  • Two loading modes:
    • prebuilt: user runs spectral bundle locally, hosts the ESM output, provides URL — loaded via dynamic import()
    • server: Next.js API route fetches CJS rule files (with auth), bundles via esbuild + @stoplight/spectral-ruleset-bundler, returns ESM to browser

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status
Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions