Apache OFBiz · API Governance Rules

Apache OFBiz API Rules

Spectral linting rules defining API design standards and conventions for Apache OFBiz.

31 Rules error 12 warn 15 info 4
View Rules File View on GitHub

Rule Categories

auth get info no openapi operation parameter request response schema security servers tags

Rules

error
info-title-required
OpenAPI info must have a title.
$.info
warn
info-description-required
OpenAPI info must have a description.
$.info
error
info-version-required
OpenAPI info must define a version.
$.info
warn
info-contact-required
OpenAPI info should include contact information.
$.info
warn
info-license-required
OpenAPI info should include license information.
$.info
error
openapi-version-3
Specs must use OpenAPI 3.x.
$
error
servers-defined
At least one server must be defined.
$
warn
servers-https
Server URLs should use HTTPS.
$.servers[*].url
warn
servers-description
Each server should have a description.
$.servers[*]
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation should have a description.
$.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 should use camelCase.
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
info
operation-summary-apache-ofbiz-prefix
Operation summaries should start with "Apache OFBiz".
$.paths[*][get,post,put,patch,delete].summary
warn
tags-global-defined
Global tags array should be defined.
$
warn
tags-description
Each global tag should have a description.
$.tags[*]
warn
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[*]
warn
request-body-description
Request bodies should have a description.
$.paths[*][post,put,patch].requestBody
error
response-success-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-required
Secured operations should document 401 Unauthorized 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[*]
warn
schema-description-required
Top-level component schemas should have a description.
$.components.schemas[*]
info
schema-property-description
Schema properties should have descriptions.
$.components.schemas[*].properties[*]
error
security-schemes-defined
Security schemes must be defined in components.
$.components
warn
security-global-defined
Global security requirements should be defined.
$
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
info
auth-bearer-jwt
Bearer authentication should specify JWT format.
$.components.securitySchemes[?(@.scheme == 'bearer')]
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description
info
response-status-code-standard
OFBiz API responses should include statusCode, statusDescription, and data fields.
$.components.schemas[*].properties