New Relic · API Governance Rules
New Relic API Rules
Spectral linting rules defining API design standards and conventions for New Relic.
28 Rules
error 19
warn 8
info 1
Rule Categories
error
http
info
microcks
no
openapi
operation
operationid
parameter
paths
query
response
schema
security
servers
Rules
error
info-title-required
Info title must be present and non-empty
$.info
error
info-description-required
Info description must be present
$.info
error
info-version-required
API version must be specified
$.info
warn
info-contact-required
Contact information should be provided
$.info
error
openapi-version
OpenAPI version should be 3.x
$
error
servers-defined
At least one server must be defined
$
error
servers-https
Server URLs must use HTTPS
$.servers[*].url
error
paths-no-trailing-slash
Paths must not have trailing slashes
$.paths
error
operation-operationid-required
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
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]
error
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
parameter-description-required
Every parameter must have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter must have a schema
$.paths[*][get,post,put,patch,delete].parameters[*]
error
response-success-required
Every operation must have a success response
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Every response must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
error
security-global-defined
Global security must be defined
$
error
http-get-no-body
GET operations must not have a request body
$.paths[*].get
error
http-delete-no-body
DELETE operations must not have a request body
$.paths[*].delete
error
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
microcks-operation-extension
Operations should have x-microcks-operation
$.paths[*][get,post,put,patch,delete]
warn
servers-expected-domain
Server URLs should be on the newrelic.com domain.
$.servers[*].url
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
operationid-casing
Operation IDs should be camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].operationId
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas