Truto · API Governance Rules

Truto API Rules

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

10 Rules error 1 warn 6 info 3
View Rules File View on GitHub

Rule Categories

truto

Rules

warn
truto-operation-ids-camel-case
Truto operation IDs must use camelCase format.
$.paths.*[get,post,put,patch,delete]
error
truto-bearer-auth-security
All Truto API endpoints must require Bearer token authentication.
$.paths.*[get,post,put,patch,delete]
info
truto-versioned-paths
Truto API paths should not require version prefixes (versioning handled by server URL).
$.paths
warn
truto-operations-tagged
All Truto API operations must have tags for grouping.
$.paths.*[get,post,put,patch,delete]
warn
truto-response-200-json
GET operations must include a 200 response with JSON content.
$.paths.*[get].responses.200
info
truto-post-201-response
POST creation operations should return 201 status.
$.paths.*[post]
warn
truto-id-string-type
Identifier fields (id, remoteId) must be string type.
$.components.schemas.*.properties[id,remoteId,candidateId,accountId,contactId,opportunityId,employeeId,applicationId,integratedAccountId]
warn
truto-date-time-format
Date/time fields must use date-time format.
$.components.schemas.*.properties[createdAt,updatedAt,appliedAt,openedAt,closedAt,completedAt,requestedAt]
info
truto-pagination-cursor
List endpoints should support cursor-based pagination.
$.paths.*[get]
warn
truto-integrated-account-param
Unified API list/get endpoints should include integrated_account_id parameter to specify the connected provider instance.
$.paths./unified/*/[get,post]

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  truto-operation-ids-camel-case:
    description: Truto operation IDs must use camelCase format.
    severity: warn
    given: "$.paths.*[get,post,put,patch,delete]"
    then:
      field: operationId
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  truto-bearer-auth-security:
    description: All Truto API endpoints must require Bearer token authentication.
    severity: error
    given: "$.paths.*[get,post,put,patch,delete]"
    then:
      field: security
      function: truthy

  truto-versioned-paths:
    description: Truto API paths should not require version prefixes (versioning handled by server URL).
    severity: info
    given: "$.paths"
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/"

  truto-operations-tagged:
    description: All Truto API operations must have tags for grouping.
    severity: warn
    given: "$.paths.*[get,post,put,patch,delete]"
    then:
      field: tags
      function: truthy

  truto-response-200-json:
    description: GET operations must include a 200 response with JSON content.
    severity: warn
    given: "$.paths.*[get].responses.200"
    then:
      field: content.application/json
      function: truthy

  truto-post-201-response:
    description: POST creation operations should return 201 status.
    severity: info
    given: "$.paths.*[post]"
    then:
      field: responses.201
      function: truthy

  truto-id-string-type:
    description: Identifier fields (id, remoteId) must be string type.
    severity: warn
    given: "$.components.schemas.*.properties[id,remoteId,candidateId,accountId,contactId,opportunityId,employeeId,applicationId,integratedAccountId]"
    then:
      field: type
      function: enumeration
      functionOptions:
        values:
          - string

  truto-date-time-format:
    description: Date/time fields must use date-time format.
    severity: warn
    given: "$.components.schemas.*.properties[createdAt,updatedAt,appliedAt,openedAt,closedAt,completedAt,requestedAt]"
    then:
      field: format
      function: enumeration
      functionOptions:
        values:
          - date-time

  truto-pagination-cursor:
    description: List endpoints should support cursor-based pagination.
    severity: info
    given: "$.paths.*[get]"
    then:
      function: schema
      functionOptions:
        schema:
          properties:
            parameters:
              type: array

  truto-integrated-account-param:
    description: >-
      Unified API list/get endpoints should include integrated_account_id parameter
      to specify the connected provider instance.
    severity: warn
    given: "$.paths./unified/*/[get,post]"
    then:
      function: truthy

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/truto-rules"
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.