FACTORY I/O · API Governance Rules

FACTORY I/O API Rules

Spectral linting rules defining API design standards and conventions for FACTORY I/O.

6 Rules error 1 warn 4
View Rules File View on GitHub

Rule Categories

factory

Rules

error
factory-io-operation-must-have-operationId
$.paths[*][get,put,post,delete,patch]
warn
factory-io-operation-must-have-tags
$.paths[*][get,put,post,delete,patch]
warn
factory-io-tag-value-arrays-only
$.paths['/api/tag/values'][put].requestBody.content['application/json'].schema
warn
factory-io-uuid-format-for-tag-ids
$.components.schemas.Tag.properties.id
hint
factory-io-partial-success-pattern
$.paths['/api/tag/values'][put].responses['200'].content['application/json'].schema
warn
factory-io-server-must-define-port
$.servers[0].url

Spectral Ruleset

Raw ↑
formats:
  - oas3

rules:
  factory-io-operation-must-have-operationId:
    message: Every operation must define an operationId for code generation.
    severity: error
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: operationId
      function: truthy

  factory-io-operation-must-have-tags:
    message: Every operation must have at least one tag.
    severity: warn
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: tags
      function: truthy

  factory-io-tag-value-arrays-only:
    message: >-
      Tag value endpoints accept and return arrays of objects, never a single
      object. Request and response bodies should be array types.
    severity: warn
    given: "$.paths['/api/tag/values'][put].requestBody.content['application/json'].schema"
    then:
      field: type
      function: pattern
      functionOptions:
        match: "^array$"

  factory-io-uuid-format-for-tag-ids:
    message: Tag id fields must use format uuid.
    severity: warn
    given: "$.components.schemas.Tag.properties.id"
    then:
      field: format
      function: pattern
      functionOptions:
        match: "^uuid$"

  factory-io-partial-success-pattern:
    message: >-
      Tag value operations use partial success: HTTP 200 with per-item error
      objects containing code and error fields. Responses must define a schema
      that includes both value and code/error properties.
    severity: hint
    given: "$.paths['/api/tag/values'][put].responses['200'].content['application/json'].schema"
    then:
      field: type
      function: pattern
      functionOptions:
        match: "^array$"

  factory-io-server-must-define-port:
    message: >-
      Factory I/O web server always runs on a specific local port. The servers
      array should define a localhost URL with the default port 7410.
    severity: warn
    given: "$.servers[0].url"
    then:
      function: pattern
      functionOptions:
        match: "^http://localhost"

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/factory-i-o-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.