flatin.pt · API Governance Rules

flatin.pt API Rules

Spectral linting rules defining API design standards and conventions for flatin.pt.

9 Rules error 3 warn 4 info 2
View Rules File View on GitHub

Rule Categories

flatin

Rules

error
flatin-paths-versioned
Every public path lives under /api/v1/, so a breaking change can ship as /api/v2/ next to it.
$.paths
warn
flatin-paths-lowercase
Path segments are lowercase; parameters are the only exception.
$.paths
error
flatin-servers-https
Servers are reached over HTTPS only.
$.servers[*].url
error
flatin-operation-summary
Every operation has a short English summary; catalogs and MCP clients show it as the name.
$.paths[*][get,post,put,patch,delete]
warn
flatin-summary-length
Summaries stay short enough to fit a catalog card.
$.paths[*][get,post,put,patch,delete].summary
warn
flatin-info-license
The licence of the data is stated in the schema itself.
$.info
warn
flatin-info-contact-email
A reachable contact address is in the schema.
$.info.contact
info
flatin-no-security-schemes
The API is keyless by design; a security scheme would promise authentication that does not exist.
$.components
info
flatin-no-trailing-slash
Paths do not end with a slash.
$.paths

Spectral Ruleset

Raw ↑
# Spectral ruleset for the flatin.pt public API (https://flatin.pt/api/openapi.json).
#
# Extends the standard OpenAPI ruleset and adds the rules the API is held to:
# versioned lowercase paths, HTTPS servers, English summaries, a contact and a
# licence, no authentication schemes. Checked with spectral-cli 6 on 2026-09-16:
# no findings.
#
# Run: npx @stoplight/spectral-cli lint https://flatin.pt/api/openapi.json \
#        --ruleset https://flatin.pt/api/spectral.yaml
extends:
  - spectral:oas
rules:
  flatin-paths-versioned:
    description: Every public path lives under /api/v1/, so a breaking change can ship as /api/v2/ next to it.
    message: "{{property}} is not under /api/v1/"
    severity: error
    given: $.paths
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/api/v1/"

  flatin-paths-lowercase:
    description: Path segments are lowercase; parameters are the only exception.
    message: "{{property}} has uppercase letters outside a parameter"
    severity: warn
    given: $.paths
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^(/([a-z0-9._-]+|\\{[A-Za-z_]+\\}))+$"

  flatin-servers-https:
    description: Servers are reached over HTTPS only.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://"

  flatin-operation-summary:
    description: Every operation has a short English summary; catalogs and MCP clients show it as the name.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: summary
      function: truthy

  flatin-summary-length:
    description: Summaries stay short enough to fit a catalog card.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].summary
    then:
      function: length
      functionOptions:
        max: 80

  flatin-info-license:
    description: The licence of the data is stated in the schema itself.
    severity: warn
    given: $.info
    then:
      field: license.name
      function: truthy

  flatin-info-contact-email:
    description: A reachable contact address is in the schema.
    severity: warn
    given: $.info.contact
    then:
      field: email
      function: truthy

  flatin-no-security-schemes:
    description: The API is keyless by design; a security scheme would promise authentication that does not exist.
    severity: info
    given: $.components
    then:
      field: securitySchemes
      function: falsy

  flatin-no-trailing-slash:
    description: Paths do not end with a slash.
    severity: info
    given: $.paths
    then:
      field: "@key"
      function: pattern
      functionOptions:
        notMatch: ".+/$"

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/flatin-pt-spectral"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

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.

A second provider on the same verified email joins the account you already have.