GatiFlow · API Governance Rules
GatiFlow API Rules
Spectral linting rules defining API design standards and conventions for GatiFlow.
29 Rules
error 18
warn 8
info 3
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
gatiflow
Rules
error
gatiflow-openapi-3-1
The contract is OpenAPI 3.1, the version its webhooks section and JSON Schema 2020-12 types need.
$.openapi
error
gatiflow-server-production
The contract names exactly one server, https://api.gatiflow.io. It is served from gatiflow.io, so without this every path would resolve against the marketing site.
$
error
gatiflow-path-versioned
The version is in the path. Every operation lives under /api/v1, and a breaking change ships under a new version path next to the current one.
$.paths
error
gatiflow-path-kebab-case
Path segments are lowercase kebab-case, and path parameters are snake_case in braces.
$.paths
error
gatiflow-read-only
Every published operation is a read. A write first needs an idempotency key, an x-agentic-access classification with its consequence and human-in-the-loop decision, and a reversal story, so its first appearance fails here until this rule is changed on purpose.
$.paths[*][put,post,delete,patch]
error
gatiflow-operation-security-explicit
Every operation states its credential. The document sets no default, so an operation without a security key would read as open; one that takes nothing says so with an empty list.
#Operation
error
gatiflow-security-known-schemes
An operation takes one of the two credentials the contract defines, ApiKeyAuth or SessionBearer, alone.
$.paths[*][*].security[*]
error
gatiflow-api-key-in-header
The API key travels in the X-API-Key header, never in the URL, where logs and proxies keep it.
$.components.securitySchemes[?(@.type == 'apiKey')]
error
gatiflow-no-credentials-in-query
No query parameter carries a credential.
$.paths[*][*].parameters[?(@.in == 'query')].name
error
gatiflow-unauthorized-documented
An operation that takes a credential documents the 401 a missing or wrong one receives.
#Operation
error
gatiflow-error-envelope
Every 4xx and 5xx is the one error envelope, ErrorResponse, or StaleDataError, the same envelope with a structured message.
$.paths[*][*].responses[?(@property.match(/^[45]/))].content.application/json.schema
error
gatiflow-stale-data-retry-after
The 503 that refuses stale data says when to ask again, in a Retry-After header.
$.paths[*][*].responses[*]
error
gatiflow-rate-limited-documents-429
An operation that reports X-RateLimit-* headers documents the 429 its limit produces.
#Operation
error
gatiflow-deprecation-announced
A deprecated operation announces it on every success, with a Deprecation header (RFC 9745) and a Sunset header (RFC 8594) carrying the removal date, as the versioning policy promises.
#Operation
error
gatiflow-agentic-access-declared
Every operation carries its x-agentic-access classification, so an agent reads what a call may do from the contract it already fetched.
#Operation
error
gatiflow-get-is-read
A GET changes nothing, so its x-agentic-access consequence is read.
$.paths[*].get.x-agentic-access.consequence
error
gatiflow-webhook-signed
Every event GatiFlow sends is signed. The webhook declares X-GatiFlow-Signature as a required header, so a receiver's generated code verifies it.
#WebhookOperation
error
gatiflow-provenance-declared
The contract names its author: x-provenance with method published, publisher GatiFlow and the gatiflow.io URL it is served at, the marker a catalog reads to tell a provider's contract from one written about it.
$
warn
gatiflow-operation-single-tag
Each operation is filed under exactly one tag, which is also its folder in the Postman collection.
#Operation
warn
gatiflow-operation-description-substantive
An operation description says what the call returns, what it costs in quota and how it refuses, which does not fit in fewer than 100 characters.
#Operation
warn
gatiflow-path-params-snake-case
Path parameter names are snake_case, like the fields they come from.
$.paths[*][*].parameters[?(@.in == 'path')].name
warn
gatiflow-query-params-snake-case
Query parameter names are snake_case.
$.paths[*][*].parameters[?(@.in == 'query')].name
warn
gatiflow-properties-snake-case
Response field names are snake_case, the way every payload spells them.
$.components.schemas..properties
warn
gatiflow-schema-described
Every component schema says what it is in a description, not only a title derived from its name.
$.components.schemas[*]
warn
gatiflow-success-example
Every JSON success response carries a worked example, the empty states included.
$.paths[*][*].responses[?(@property.match(/^2/))].content.application/json
warn
gatiflow-contact-email
The contract's contact is a gatiflow.io address someone reads.
$.info.contact
info
gatiflow-summary-short
An operation summary fits on one line of a sidebar, in 60 characters, with no closing period.
$.paths[*][*].summary
info
gatiflow-schema-names-pascal-case
Component schema names are PascalCase nouns.
$.components.schemas
info
gatiflow-webhook-headers-namespaced
The headers GatiFlow sends with a webhook carry the X-GatiFlow- prefix.
$.webhooks[*][*].parameters[?(@.in == 'header')].name
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.