WanAPIs · API Governance Rules
WanAPIs API Rules
Spectral linting rules defining API design standards and conventions for WanAPIs.
7 Rules
error 3
warn 4
Rule Categories
wanapis
Rules
error
wanapis-server-base-url
Servers must use the documented WanAPIs OpenAI-compatible base URL.
$.servers[*]
error
wanapis-bearer-auth-required
Every operation must inherit bearer auth (global security or operation-level).
$
warn
wanapis-operation-id-camelcase
operationId should be camelCase (e.g. createChatCompletion).
$.paths[*][*].operationId
error
wanapis-tag-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
wanapis-response-schema-required
2xx responses must declare an application/json or audio schema.
$.paths[*][*].responses['200'].content
warn
wanapis-error-schema
4xx/5xx responses should reference the Error schema.
$.paths[*][*].responses[?(@property.match(/^(4|5)\\d{2}$/))]
warn
wanapis-model-parameter
Request bodies for inference endpoints must include a `model` field.
$.components.schemas[?(@property.match(/Request$/))]