Factorial · API Governance Rules

Factorial API Rules

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

4 Rules error 2 warn 2
View Rules File View on GitHub

Rule Categories

factorial

Rules

warn
factorial-operation-summary-title-case
Factorial operation summaries should use Title Case to match the rest of the API Evangelist catalog.
$.paths.*[get,put,post,delete,patch].summary
warn
factorial-operation-id-camel-case
Operation IDs should be camelCase verbs (listEmployees, createEmployee, ...).
$.paths.*[get,put,post,delete,patch].operationId
error
factorial-prefer-bearer-or-api-key
Endpoints must declare one of the two supported auth schemes (oauth2 or apikey).
$.security[*]
error
factorial-server-must-be-canonical
Only the canonical Factorial production and demo bases should appear in `servers`.
$.servers[*].url

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  factorial-operation-summary-title-case:
    description: >-
      Factorial operation summaries should use Title Case to match the rest
      of the API Evangelist catalog.
    severity: warn
    given: "$.paths.*[get,put,post,delete,patch].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z]"
  factorial-operation-id-camel-case:
    description: Operation IDs should be camelCase verbs (listEmployees, createEmployee, ...).
    severity: warn
    given: "$.paths.*[get,put,post,delete,patch].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"
  factorial-prefer-bearer-or-api-key:
    description: Endpoints must declare one of the two supported auth schemes (oauth2 or apikey).
    severity: error
    given: "$.security[*]"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          minProperties: 1
  factorial-server-must-be-canonical:
    description: Only the canonical Factorial production and demo bases should appear in `servers`.
    severity: error
    given: "$.servers[*].url"
    then:
      function: enumeration
      functionOptions:
        values:
          - https://api.factorialhr.com/api
          - https://api.demo.factorialhr.com/api

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/factorial-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 email required.

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