Architecture Pattern · API Governance Rules
Architecture Pattern API Rules
Spectral linting rules defining API design standards and conventions for Architecture Pattern.
19 Rules
error 8
warn 10
info 1
Rule Categories
ap
no
operationid
query
schema
servers
Rules
error
ap-pattern-id-required
Pattern must have an id field
$.components.schemas.Pattern.properties
error
ap-pattern-name-required
Pattern must have a name field
$.components.schemas.Pattern.properties
warn
ap-pattern-problem-required
Pattern must have a problem statement
$.components.schemas.Pattern.properties
warn
ap-pattern-solution-required
Pattern must have a solution description
$.components.schemas.Pattern.properties
error
ap-pattern-confidence-enum
Pattern confidence must be a valid enum value
$.components.schemas.Pattern.properties.confidence
error
ap-tradeoff-severity-enum
Tradeoff severity must be a valid enum value
$.components.schemas.Tradeoff.properties.severity
warn
ap-list-responses-have-total
List responses must include a total count
$.components.schemas[*List].properties
warn
ap-operations-have-tags
All API operations must have tags
$.paths[*][get,post,put,patch,delete]
error
ap-operations-have-summary
All API operations must have a summary
$.paths[*][get,post,put,patch,delete]
error
ap-operations-have-operation-id
All API operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
ap-info-contact-required
API info must include contact information
$.info
error
ap-servers-defined
API must define at least one server
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the apievangelist.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
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description