Frankfurter · API Governance Rules
Frankfurter API Rules
Spectral linting rules defining API design standards and conventions for Frankfurter.
37 Rules
error 14
warn 18
info 5
Rule Categories
examples
info
no
only
openapi
operation
parameter
paths
response
schema
servers
tags
Rules
error
info-title-frankfurter
API title must start with "Frankfurter".
$.info.title
error
info-description-required
Info description is required and must be meaningful.
$.info
error
info-version-required
API version must be defined.
$.info
warn
info-license-mit
License must be defined and is expected to be MIT.
$.info.license
warn
info-contact-required
Contact url must be defined.
$.info.contact
error
openapi-version-3-1
OpenAPI version must be 3.1.x.
$
error
servers-defined
At least one server must be defined.
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
info
servers-frankfurter-host
Server URLs should target the api.frankfurter.dev host (or self-host equivalent).
$.servers[*].url
warn
servers-versioned
Server URL should include a /v1 or /v2 version segment.
$.servers[*].url
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths
error
paths-no-query-string
Paths must not contain query strings.
$.paths
warn
paths-kebab-or-template
Path segments should be kebab-case or templated parameters.
$.paths
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-frankfurter-prefix
Operation summaries should start with "Frankfurter".
$.paths[*][get,post,put,patch,delete].summary
warn
operation-id-camel-case
operationId must be camelCase when present (v2 convention).
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-extension
Operation should declare an x-microcks-operation block for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
warn
tags-global-defined
Top-level tags array must be defined and non-empty.
$
info
tags-have-description
Each global tag should declare a description.
$.tags[*]
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][*].parameters[*]
warn
parameter-snake-case
Parameter names should be snake_case (matches Frankfurter convention — base, quotes, from, to, start_date, end_date, providers).
$.paths[*][*].parameters[*].name
error
parameter-schema-required
Every parameter must declare a schema with a type.
$.paths[*][*].parameters[*]
error
no-request-bodies
Frankfurter API operations must not declare a requestBody (the API is read-only over GET).
$.paths[*][get,delete]
error
response-200-required
Every GET operation must define a 200 response.
$.paths[*].get.responses
warn
response-404-defined
GET operations should declare a 404 response for missing data.
$.paths[*].get.responses
warn
response-content-json
2xx responses should use application/json (or application/x-ndjson for streaming).
$.paths[*][*].responses[?(@property.match(/^2/))].content
error
response-description-required
Every response must have a description.
$.paths[*][*].responses[*]
warn
schema-property-snake-case
Schema property names should be snake_case (matches API JSON output — iso_code, iso_numeric, start_date, end_date, pivot_currency, etc.).
$.components.schemas[*].properties
info
schema-property-description
Top-level schema properties should have descriptions.
$.components.schemas[*].properties[*]
warn
schema-type-defined
Component schemas must declare a type (or use composition keywords).
$.components.schemas[*]
warn
no-security-schemes
Frankfurter is a public open API — no security schemes should be declared.
$.components.securitySchemes
warn
no-global-security
Frankfurter operations should not require security.
$
error
only-get-methods
Frankfurter exposes only GET endpoints — no write methods are permitted.
$.paths[*]
warn
no-empty-descriptions
Descriptions must not be empty.
$..description
info
examples-encouraged
Schemas should provide examples to aid documentation and mock generation.
$.components.schemas[*]