CloudEvents · API Governance Rules

CloudEvents API Rules

Spectral linting rules defining API design standards and conventions for CloudEvents.

9 Rules error 3 warn 6
View Rules File View on GitHub

Rule Categories

cloudevents

Rules

error
cloudevents-info-contact
API contact information must be present.
$.info
warn
cloudevents-info-license
API license must be declared (CloudEvents publishes under Apache-2.0).
$.info
warn
cloudevents-info-license-apache
CloudEvents-aligned APIs should declare an Apache-2.0 license.
$.info.license.name
error
cloudevents-server-https
All server URLs must use HTTPS.
$.servers[*].url
error
cloudevents-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
cloudevents-operation-tags
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
cloudevents-operation-summary
Every operation must include a short summary.
$.paths[*][get,post,put,patch,delete]
warn
cloudevents-error-responses
Mutating operations should declare 4xx error responses.
$.paths[*][post,put,patch,delete].responses
warn
cloudevents-subscription-required-attributes
Subscription schemas must include the CloudEvents-required `id`, `source`, and `sink` attributes.
$.components.schemas.Subscription.properties