OpenMercantil · API Governance Rules
OpenMercantil API Rules
Spectral linting rules defining API design standards and conventions for OpenMercantil.
9 Rules
error 2
warn 4
info 3
Rule Categories
openmercantil
Rules
warn
openmercantil-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
error
openmercantil-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
openmercantil-summaries-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
error
openmercantil-v1-paths
Public paths must be versioned under /api/v1/
$.paths[*]~
warn
openmercantil-429-documented
All public endpoints should document the 429 rate-limit response
$.paths[*][get,post,put,delete].responses
info
openmercantil-snake-case-query-params
Query parameters should use snake_case
$.paths[*][*].parameters[?(@.in=='query')].name
info
openmercantil-slug-path-param
Company and person resource paths must use a `slug` path parameter
$.paths[?(@property.match(/^\/api\/v1\/(company|person)\/.*/))][*].parameters[?(@.in=='path' && @.name=='slug')]
warn
openmercantil-rate-limit-headers
429 responses should document Retry-After and X-RateLimit-* headers
$.paths[*][*].responses.429
info
openmercantil-public-no-auth
Public read endpoints should not require authentication
$.paths[?(@property.match(/^\/api\/v1\/(search|company|person|persona|daily|summary|cnae|sector|sectores|ccaa|sources|contracts|export|health)/))].get