Bifrost · API Governance Rules

Bifrost API Rules

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

24 Rules error 7 warn 17
View Rules File View on GitHub

Rule Categories

bifrost

Rules

error
bifrost-info-title-prefix
API title must start with "Bifrost"
$.info.title
error
bifrost-info-version-present
API info must have a version field
$.info
warn
bifrost-info-contact-present
API info must include contact details
$.info
error
bifrost-operation-summary-prefix
Operation summaries must start with "Bifrost"
$.paths[*][*].summary
warn
bifrost-operation-id-camel-case
Operation IDs must be camelCase
$.paths[*][*].operationId
warn
bifrost-operation-tags-present
Every operation must have at least one tag
$.paths[*][*]
warn
bifrost-operation-description-present
Every operation must have a description
$.paths[*][*]
warn
bifrost-path-kebab-case
Paths must use kebab-case segments
$.paths
error
bifrost-request-body-required
POST operations must have a request body
$.paths[*].post
error
bifrost-response-200-present
Every operation must define a 200 or 201 response
$.paths[*][*].responses
warn
bifrost-response-error-schema
Error responses must reference ErrorResponse schema
$.paths[*][*].responses[?(@property >= '400')].content.application/json.schema
warn
bifrost-schema-title-present
All schemas must have a title
$.components.schemas[*]
warn
bifrost-schema-description-present
All schemas must have a description
$.components.schemas[*]
warn
bifrost-schema-properties-described
Schema properties must have descriptions
$.components.schemas[*].properties[*]
error
bifrost-security-scheme-present
API must define at least one security scheme
$.components
warn
bifrost-operation-security-present
Operations should reference a security scheme
$.paths[*][post,put,patch,delete]
warn
bifrost-tags-defined
All tags used in operations must be defined at top level
$.tags
warn
bifrost-tag-description-present
Top-level tags must have a description
$.tags[*]
error
bifrost-servers-present
API must define servers
$
warn
bifrost-chat-model-format
Chat completion model must use provider/model format
$.components.schemas.ChatCompletionRequest.properties.model
warn
bifrost-operation-examples-present
Responses with content should include examples
$.paths[*][*].responses[*].content[*]
warn
bifrost-microcks-operation-present
Every operation must include x-microcks-operation extension
$.paths[*][*]
warn
bifrost-license-present
API info must include license
$.info
warn
bifrost-license-apache
License must be Apache 2.0
$.info.license.name