# authorship: generated by API Evangelist tooling. Stamped 2026-08-18
# on the file's own generator header (roadmap#64). An unmarked file is
# NOT assumed to be ours -- absence of evidence was never stamped.
x-method: generated
# bfe — Spectral ruleset (strengthened)
# Plain Spectral. Existing hand-authored rules preserved; measured rules added
# from this provider's own OpenAPI conventions by strengthen_ruleset.py,
# then self-validated against the spec.
#
# Provenance:
# - operationid-casing: camel @ 100% (n=7)
# - schema-names-casing: pascal @ 100% (n=6)
# - schema-properties-casing: snake @ 100% (n=10)
# - error-schema-defined: ErrorResponse
# - merge: kept 22 existing, added 3 measured, upgraded 0
# - added: schema-names-casing, schema-properties-casing, error-schema-defined
extends:
- spectral:oas
rules:
info-title-required:
description: API info must have a title.
severity: error
given: $.info
then:
field: title
function: truthy
info-title-prefix:
description: API title should begin with "BFE".
severity: warn
given: $.info.title
then:
function: pattern
functionOptions:
match: ^BFE
info-description-required:
description: API info must have a description.
severity: error
given: $.info
then:
field: description
function: truthy
info-version-required:
description: API info must have a version.
severity: error
given: $.info
then:
field: version
function: truthy
openapi-version-3:
description: All specs must use OpenAPI 3.0.x.
severity: error
given: $
then:
field: openapi
function: pattern
functionOptions:
match: ^3\.0\.
servers-defined:
description: At least one server must be defined.
severity: error
given: $
then:
field: servers
function: truthy
servers-localhost-or-http:
description: BFE management API may use localhost (HTTP) for internal endpoints.
severity: info
given: $.servers[*].url
then:
function: pattern
functionOptions:
match: ^(http|https)://
paths-kebab-case:
description: Path segments should use kebab-case (lowercase with hyphens).
severity: warn
given: $.paths[*]~
then:
function: pattern
functionOptions:
match: ^(/[a-z0-9{}_-]+)+$
paths-no-trailing-slash:
description: Paths must not have a trailing slash.
severity: error
given: $.paths[*]~
then:
function: pattern
functionOptions:
notMatch: /$
operation-summary-required:
description: All operations must have a summary.
severity: error
given: $.paths[*][get,post,put,patch,delete,options,head]
then:
field: summary
function: truthy
operation-description-required:
description: All operations must have a description.
severity: error
given: $.paths[*][get,post,put,patch,delete,options,head]
then:
field: description
function: truthy
operation-id-required:
description: All operations must have an operationId.
severity: error
given: $.paths[*][get,post,put,patch,delete,options,head]
then:
field: operationId
function: truthy
operation-id-camel-case:
description: operationId should use camelCase.
severity: warn
given: $.paths[*][get,post,put,patch,delete].operationId
then:
function: pattern
functionOptions:
match: ^[a-z][a-zA-Z0-9]+$
operation-tags-required:
description: All operations must have at least one tag.
severity: error
given: $.paths[*][get,post,put,patch,delete,options,head]
then:
field: tags
function: truthy
parameter-description-required:
description: All parameters must have a description.
severity: warn
given: $.paths[*][get,post,put,patch,delete].parameters[*]
then:
field: description
function: truthy
response-success-required:
description: Operations must define at least one 2xx success response.
severity: error
given: $.paths[*][get,post,put,patch,delete].responses
then:
function: schema
functionOptions:
schema:
oneOf:
- required:
- '200'
- required:
- '201'
- required:
- '204'
response-description-required:
description: All responses must have a description.
severity: error
given: $.paths[*][get,post,put,patch,delete].responses[*]
then:
field: description
function: truthy
response-json-content:
description: Success responses should return application/json content.
severity: warn
given: $.paths[*][get,post,put,patch,delete].responses['200','201'].content
then:
function: truthy
schema-description-required:
description: Top-level schemas should have a description.
severity: warn
given: $.components.schemas[*]
then:
field: description
function: truthy
schema-type-required:
description: Schema definitions should have an explicit type.
severity: warn
given: $.components.schemas[*]
then:
field: type
function: truthy
get-no-request-body:
description: GET operations must not have a request body.
severity: error
given: $.paths[*].get
then:
field: requestBody
function: falsy
no-empty-descriptions:
description: Descriptions must not be empty strings.
severity: warn
given: $..description
then:
function: pattern
functionOptions:
match: .+
schema-names-casing:
description: Component schema names should be PascalCase (the dominant convention in this API).
severity: warn
given: $.components.schemas
then:
field: '@key'
function: casing
functionOptions:
type: pascal
schema-properties-casing:
description: Schema properties should be snake_case (the dominant convention in this API).
severity: warn
given: $.components.schemas[*].properties
then:
field: '@key'
function: casing
functionOptions:
type: snake
error-schema-defined:
description: A shared error schema (ErrorResponse) should be defined for error payloads.
severity: warn
given: $.components.schemas
then:
field: ErrorResponse
function: truthy
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.