Wordnik · API Governance Rules
Wordnik API Rules
Spectral linting rules defining API design standards and conventions for Wordnik.
45 Rules
error 9
warn 30
info 6
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
external
http
info
no
openapi
operation
parameter
paths
request
response
schema
security
servers
tag
tags
Rules
error
info-title-required
Info block must define a title.
$
warn
info-title-wordnik-prefix
API title should start with "Wordnik".
$.info.title
warn
info-description-required
Info block must include a description of at least 40 characters.
$.info
error
info-version-required
API version must be declared.
$.info
warn
info-contact-required
Info block should expose contact details (Wordnik publishes apiteam@wordnik.com).
$.info
info
info-external-docs-required
An externalDocs link to the Wordnik developer portal should be present.
$
warn
openapi-version-3
Wordnik specs should be OpenAPI 3.x.
$.openapi
error
servers-required
At least one server entry must be defined.
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-wordnik-host
Servers should point at api.wordnik.com.
$.servers[*].url
warn
paths-lower-camel-json-suffix
Wordnik resource segments follow `lowerCamel.json` (e.g. /word.json, /words.json, /wordList.json).
$.paths.*~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
error
paths-no-query-string
Paths must not embed query strings.
$.paths.*~
error
operation-operation-id-required
Every operation must declare an operationId.
$.paths[*][get,post,put,delete,patch]
warn
operation-operation-id-camel-case
operationId must be camelCase (e.g. getDefinitions, getRandomWord, authenticatePost).
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-operation-id-verb-prefix
operationId should start with a recognised verb prefix.
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-summary-required
Every operation must include a summary.
$.paths[*][get,post,put,delete,patch]
warn
operation-summary-title-case
Operation summaries must be Title Case.
$.paths[*][get,post,put,delete,patch].summary
warn
operation-description-required
Every operation must include a description.
$.paths[*][get,post,put,delete,patch]
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,delete,patch]
info
operation-microcks-extension
Operations should expose an x-microcks-operation block so Microcks can mock them.
$.paths[*][get,post,put,delete,patch]
warn
tags-global-required
A global tags array must be defined.
$
warn
tag-title-case
Tag names must be Title Case (Word, Words, Word List, Word Lists, Account).
$.tags[*].name
warn
tag-description-required
Each global tag must have a description.
$.tags[*]
warn
parameter-description-required
Every parameter must include a description.
$.paths[*][*].parameters[*]
warn
parameter-name-camel-case
Parameter names must be camelCase (api_key and auth_token are the only documented exceptions).
$.paths[*][*].parameters[*].name
warn
parameter-schema-type-required
Every parameter must declare a schema type.
$.paths[*][*].parameters[*].schema
warn
parameter-api-key-in-query
Wordnik's api_key parameter must remain in the query string.
$.paths[*][*].parameters[?(@.name == "api_key")]
info
parameter-pagination-skip-limit
Pagination parameters should use skip + limit (the Wordnik convention).
$.paths[*][*].parameters[*].name
warn
request-body-content-required
Request bodies must declare a content map.
$.paths[*][post,put,patch].requestBody
error
response-success-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,delete,patch].responses
warn
response-description-required
Each response must include a description.
$.paths[*][*].responses[*]
warn
response-json-content
Successful 2xx responses should declare an application/json content type.
$.paths[*][*].responses[?(@property.match(/^2/))].content
warn
schema-name-pascal-case
Component schema names must be PascalCase (WordObject, FrequencySummary, AuthenticationToken).
$.components.schemas.*~
warn
schema-property-camel-case
Schema property names must be camelCase.
$.components.schemas[*].properties.*~
warn
schema-type-required
Every schema must declare a type.
$.components.schemas[*]
info
schema-property-id-int64
id properties on Wordnik domain objects are int64.
$.components.schemas[*].properties.id
warn
security-global-required
A global security requirement should be declared.
$
warn
security-schemes-required
components.securitySchemes must declare both api_key and auth_token.
$.components.securitySchemes
warn
security-scheme-api-key-shape
api_key security scheme must be apiKey-in-query.
$.components.securitySchemes.api_key
error
http-get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
http-delete-no-request-body
DELETE operations must not declare a request body.
$.paths[*].delete
info
http-write-204-or-200
PUT / DELETE writes should return 200 or 204.
$.paths[*][put,delete].responses
warn
no-empty-descriptions
Description fields must not be empty.
$..description
info
external-docs-encouraged
An externalDocs link helps consumers find Wordnik's developer portal.
$
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.