western-digital · API Governance Rules

western-digital API Rules

Spectral linting rules defining API design standards and conventions for western-digital.

7 Rules error 1 warn 6
View Rules File View on GitHub

Rule Categories

wd

Rules

warn
wd-operation-id-kebab-case
Operation IDs must use camelCase.
$.paths.*.*.operationId
warn
wd-path-version-prefix
All paths should include a version prefix (e.g. /v1/, /v2/, /sdk/v2/).
$.paths[*]~
warn
wd-bearer-auth-required
All device-tier paths must declare bearerAuth security.
$.paths[?(!(/authorize|/oauth|/config))].*.security
warn
wd-response-200-content-type
Successful responses should return application/json.
$.paths.*.*.responses.200.content
error
wd-no-trailing-slash
Paths must not have a trailing slash.
$.paths[*]~
warn
wd-tags-defined
Each operation must include at least one tag.
$.paths.*.*.tags
warn
wd-description-required
Each operation must have a description.
$.paths.*.*.description

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  wd-operation-id-kebab-case:
    description: Operation IDs must use camelCase.
    message: "Operation ID '{{value}}' should use camelCase."
    severity: warn
    given: "$.paths.*.*.operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  wd-path-version-prefix:
    description: All paths should include a version prefix (e.g. /v1/, /v2/, /sdk/v2/).
    message: "Path '{{path}}' should include a version prefix (/v1/, /v2/, /sdk/v2/)."
    severity: warn
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^/(v[0-9]+|sdk/v[0-9]+|authservice/v[0-9]+|device/v[0-9]+|config/v[0-9]+)/"

  wd-bearer-auth-required:
    description: All device-tier paths must declare bearerAuth security.
    message: "Operation '{{path}}' must include bearerAuth security."
    severity: warn
    given: "$.paths[?(!(/authorize|/oauth|/config))].*.security"
    then:
      function: truthy

  wd-response-200-content-type:
    description: Successful responses should return application/json.
    message: "Response 200 at '{{path}}' should define application/json content."
    severity: warn
    given: "$.paths.*.*.responses.200.content"
    then:
      function: truthy

  wd-no-trailing-slash:
    description: Paths must not have a trailing slash.
    message: "Path '{{value}}' must not end with a trailing slash."
    severity: error
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        notMatch: "/$"

  wd-tags-defined:
    description: Each operation must include at least one tag.
    message: "Operation at '{{path}}' must include at least one tag."
    severity: warn
    given: "$.paths.*.*.tags"
    then:
      function: truthy

  wd-description-required:
    description: Each operation must have a description.
    message: "Operation at '{{path}}' is missing a description."
    severity: warn
    given: "$.paths.*.*.description"
    then:
      function: truthy

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/western-digital-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.