Words API · API Governance Rules
Words API API Rules
Spectral linting rules defining API design standards and conventions for Words API.
32 Rules
error 13
warn 18
info 1
Rule Categories
examples
http
info
openapi
operation
parameter
paths
response
schema
security
servers
tags
Rules
error
info-title-prefix
Spec info.title must begin with "Words API".
$.info.title
warn
info-description-required
Spec must include an info.description of at least 50 characters.
$.info
warn
info-contact-required
Spec must include contact information.
$.info
error
openapi-version-3
Spec must use OpenAPI 3.x.
$.openapi
error
servers-rapidapi-host
Words API servers must point at wordsapiv1.p.rapidapi.com.
$.servers[*].url
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
error
paths-words-prefix
Every operation path must live under /words.
$.paths
warn
paths-camel-case-segments
Path segments use camelCase (e.g. /words/{word}/hasTypes, /words/{word}/inCategory).
$.paths
warn
paths-word-param
Per-word resources must use the {word} path parameter.
$.paths
warn
paths-no-trailing-version
Do not version inside the path — versioning is handled by the host (wordsapiv1).
$.paths
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
error
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-words-prefix
Operation summaries should start with "Get" or "Search" and be readable.
$.paths[*][get,post,put,patch,delete].summary
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camel-case
operationId must be camelCase starting with a verb (get, search, list, create, update, delete).
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
operation-microcks-extension
Every operation must carry an x-microcks-operation block for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
warn
tags-global-array
Tags must be declared at the document level with descriptions.
$.tags
warn
tags-title-case
Tag names must be Title Case.
$.tags[*].name
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter must declare a schema.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
parameter-camel-case
Query parameter names use camelCase (lettersMin, soundsMax, partOfSpeech, hasDetails).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'query')].name
error
response-success-required
Every operation must define a 200 response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-404-on-word-lookup
Per-word lookups should document a 404 response.
$.paths[/words/{word},/words/{word}/definitions,/words/{word}/synonyms,/words/{word}/antonyms,/words/{word}/examples].get.responses
warn
response-json-content-type
Response bodies must be application/json.
$.paths[*][get,post,put,patch,delete].responses[*].content
warn
response-description-required
Every response must include a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
schema-property-camel-case
Schema property names use camelCase (matches Words API JSON — hasTypes, typeOf, perMillion, numSyllables).
$.components.schemas[*].properties.*~
warn
schema-description-required
Top-level schemas should have a description.
$.components.schemas[*]
error
security-rapidapi-key
Words API authentication uses the X-RapidAPI-Key header.
$.components.securitySchemes[*]
warn
security-global-defined
Global security must be defined at the document level.
$
error
http-get-only
Words API is read-only — only GET methods are allowed.
$.paths[*]
info
examples-encouraged
Parameters should include example values.
$.paths[*][get,post,put,patch,delete].parameters[*]