EmailRep · API Governance Rules
EmailRep API Rules
Spectral linting rules defining API design standards and conventions for EmailRep.
43 Rules
error 17
warn 23
info 3
Rule Categories
delete
examples
get
info
no
openapi
operation
parameter
paths
post
request
response
schema
security
servers
tag
tags
Rules
error
info-title-prefix
The info.title must start with "EmailRep".
$.info.title
error
info-description-required
The info.description is required and must be at least 80 characters.
$.info
error
info-version-required
The info.version is required.
$.info
warn
info-contact-required
The info.contact block must be present with url or email.
$.info
warn
info-license-required
The info.license block must be present.
$.info
error
openapi-version-3
OpenAPI version must be 3.0.x or higher.
$.openapi
error
servers-defined
At least one server URL must be defined.
$.servers
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-emailrep-host
EmailRep API server host must be https://emailrep.io.
$.servers[*].url
warn
paths-kebab-case
Path segments must be lowercase kebab-case or path templates.
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
paths-no-query-string
Paths must not include query strings — declare parameters instead.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Operation summaries must start with "EmailRep".
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description of at least 30 characters.
$.paths[*][get,post,put,patch,delete]
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 lowercase verb.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-extension
Operations should include an x-microcks-operation extension for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
warn
tags-global-defined
A global tags array must be defined.
$.tags
warn
tag-description-required
Each tag must have a description.
$.tags[*]
warn
tag-title-case
Tag names must be Title Case (e.g., "Reputation", "Reports").
$.tags[*].name
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][*].parameters[*]
info
parameter-snake-case
Parameter names must use snake_case or be email path tokens.
$.paths[*][*].parameters[*].name
error
parameter-no-apikey-in-query
API keys must be passed in the `Key` header, not in query parameters.
$.paths[*][*].parameters[?(@.in=="query")].name
error
request-body-json-only
Request bodies must be application/json.
$.paths[*][post,put,patch].requestBody.content
warn
request-body-description
Request bodies should have a description.
$.paths[*][post,put,patch].requestBody
error
response-success-required
Every operation must define a 2xx success response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-error-401-required
Operations should document a 401 Unauthorized response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-error-429-required
Operations should document a 429 rate-limit response (EmailRep enforces quotas).
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Every response must have a description.
$.paths[*][*].responses[*]
error
response-json-content
2xx responses must declare application/json content.
$.paths[*][*].responses.200.content
warn
schema-property-snake-case
JSON schema property names must use snake_case.
$.components.schemas[*].properties[*]~
warn
schema-description-required
Top-level schemas should have a description.
$.components.schemas[*]
warn
schema-property-type-required
Each property must declare a type (or be a $ref).
$.components.schemas[*].properties[*]
warn
security-global-defined
A global security array must be defined.
$
error
security-scheme-defined
At least one securityScheme must be defined.
$.components.securitySchemes
warn
security-apikey-key-header
EmailRep authentication uses the `Key` header (not Authorization, not X-API-Key).
$.components.securitySchemes[?(@.type=="apiKey")]
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get.requestBody
warn
delete-no-request-body
DELETE operations should not declare a request body.
$.paths[*].delete.requestBody
warn
post-has-request-body
POST operations should declare a request body.
$.paths[*].post
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description
info
examples-encouraged
Schema properties and operations should include examples where possible.
$.components.schemas[*].properties[*]