Easyship · API Governance Rules
Easyship API Rules
Spectral linting rules defining API design standards and conventions for Easyship.
14 Rules
error 4
warn 7
info 3
Rule Categories
easyship
Rules
warn
easyship-operation-id-camel-case
Operation IDs must use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
easyship-path-snake-case
Path segments use lowercase snake_case or kebab-case; identifiers in curly braces (e.g. {id}) are permitted.
$.paths
error
easyship-must-have-summary
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
easyship-must-have-tags
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
easyship-must-have-operation-id
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
easyship-response-200-must-have-schema
200 responses must have a content schema
$.paths[*][get,post,put,patch,delete].responses[200]
warn
easyship-post-must-have-request-body
POST operations should have a request body
$.paths[*].post
error
easyship-security-defined
Bearer token security must be declared at the root level
$
info
easyship-bearer-auth
Easyship uses OAuth 2.0 bearer token authentication
$.components.securitySchemes[*]
error
easyship-no-trailing-slash
Paths must not have trailing slashes
$.paths
info
easyship-parameters-have-description
All parameters should have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
info
easyship-country-alpha2-fields
Country fields should follow the *_alpha2 naming convention and be two-character ISO 3166-1 alpha-2 codes (string, length 2).
$..properties[?(@property.match(/.*country.*alpha2/i))]
warn
easyship-components-schemas-exist
OpenAPI spec should define component schemas
$.components
warn
easyship-version-in-server-url
Server base URL should include a versioned path segment (e.g. /2024-09)
$.servers[*].url