FOLIO · API Governance Rules

FOLIO API Rules

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

9 Rules error 3 warn 5 info 1
Published by FOLIO Served by the provider at https://github.com/folio-org/mod-record-specifications/blob/0d5ec1fe5628eb7355fa3feefa30d89e929d543e/.spectral.yaml; the copy below was fetched from there.
View Rules File View on GitHub

Rule Categories

docs schema

Rules

warn
docs-descriptions
Descriptions should be provided for describable objects, such as `info`, `tags`, `operations`, `parameters`, and more.
#DescribableObjects
warn
docs-info-contact
`Info` object should include contact information.
$
info
docs-parameters-examples-or-schema
Path parameter must contain a defined schema or examples.
$.paths.parameters[*]
error
docs-summary
Path parameter must contain a defined schema or examples.
#PathItem[*]
warn
docs-media-types-examples-or-schema
Media object must contain a defined schema or examples.
#MediaTypeObjects
warn
docs-tags-alphabetical
Tags are not in alphabetical order.
$
warn
docs-operation-tags
Operation must have at least one tag.
#OperationObject
error
schema-fields-descriptions
Each field in schema should have description
$..[?(@ && @.properties)].properties.*
error
schema-descriptions
Each schema should have description and title
$..[?(@ && @.properties)]

Spectral Ruleset

Raw ↑
# harvested from https://github.com/folio-org/mod-record-specifications/blob/0d5ec1fe5628eb7355fa3feefa30d89e929d543e/.spectral.yaml on 2026-10-09 — a Spectral ruleset published in the provider's own GitHub repository (folio-org/mod-record-specifications); found by GitHub code search, fetched verbatim
x-method: harvested
x-stamped: 2026-10-09
x-source-url: https://github.com/folio-org/mod-record-specifications/blob/0d5ec1fe5628eb7355fa3feefa30d89e929d543e/.spectral.yaml
extends: [[spectral:oas, all]]
aliases:
  PathItem:
    description: ''
    targets:
      - formats:
          - oas2
        given:
          - "$.paths[*]"
      - formats:
          - oas3
        given:
          - "$.paths[*]"
  OperationObject:
    description: 'The complete operation object. Use it in combo with field object.'
    targets:
      - formats:
          - oas2
        given:
          - "#PathItem[get,put,post,delete,options,head,patch,trace]"
      - formats:
          - oas3
        given:
          - "#PathItem[get,put,post,delete,options,head,patch,trace]"
  DescribableObjects:
    description: ''
    targets:
      - formats:
          - oas2
        given:
          - "$.info"
          - "$.tags[*]"
          - "#OperationObject"
          - "$.paths[*][*].responses[*]"
          - "$..parameters[?(@ && @.in)]"
          - "$.definitions[*]"
      - formats:
          - oas3
        given:
          - "$.info"
          - "$.tags[*]"
          - "#OperationObject"
          - "$.paths[*][*].responses[*]"
          - "$..parameters[?(@ && @.in)]"
          - "$.components.schemas[*]"
          - "$.servers[*]"
  MediaTypeObjects:
    description: ''
    targets:
      - formats:
          - oas2
        given:
          - $.paths[*][*]..parameters[?(@ && @.in == "body")]
          - "$.paths[*][*].responses[*]"
      - formats:
          - oas3
        given:
          - "$.paths[*][*].requestBody.content[*]"
          - "$.paths[*][*].responses[*].content[*]"
rules:
  info-license: off
  license-url: off
  contact-properties: off
  oas3-valid-media-example: off
  docs-descriptions:
    given:
      - "#DescribableObjects"
    severity: warn
    then:
      - function: truthy
        field: description
      - function: length
        functionOptions:
          min: 10
        field: description
      - function: pattern
        functionOptions:
          match: "/^[A-Z]/"
        field: description
    description: "Descriptions should be provided for describable objects, such as `info`, `tags`, `operations`, `parameters`, and more."
    message: "{{error}}."
  docs-info-contact:
    given:
      - "$"
    severity: warn
    then:
      function: truthy
      field: info.contact
    description: "`Info` object should include contact information."
  docs-parameters-examples-or-schema:
    given:
      - "$.paths.parameters[*]"
    severity: info
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          anyOf:
            - required:
                - examples
            - required:
                - schema
    description: "Path parameter must contain a defined schema or examples."
    message: No example or schema provided for {{property}}
    formats:
      - oas3
  docs-summary:
    given:
      - "#PathItem[*]"
    severity: error
    then:
      - function: truthy
        field: summary
    description: "Path parameter must contain a defined schema or examples."
    message: No summary provided for {{property}}
    formats:
      - oas3
  docs-media-types-examples-or-schema:
    given:
      - "#MediaTypeObjects"
    severity: warn
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          anyOf:
            - required:
                - examples
    description: "Media object must contain a defined schema or examples."
    message: No example or schema provided for {{property}}
    formats:
      - oas3
  docs-tags-alphabetical:
    given:
      - "$"
    severity: warn
    then:
      function: alphabetical
      functionOptions:
        keyedBy: name
      field: tags
    description: "Tags are not in alphabetical order."
    message: Tags should be defined in alphabetical order
  docs-operation-tags:
    given:
      - "#OperationObject"
    severity: warn
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          minItems: 1
      field: tags
    description: "Operation must have at least one tag."
    message: Operation should have non-empty `tags` array.
  schema-fields-descriptions:
    description: "Each field in schema should have description"
    given: "$..[?(@ && @.properties)].properties.*"
    severity: error
    resolved: true
    then:
      - field: "description"
        function: defined
  schema-descriptions:
    description: "Each schema should have description and title"
    given: "$..[?(@ && @.properties)]"
    severity: error
    resolved: true
    then:
      - field: "description"
        function: defined
      - field: "title"
        function: defined

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/folio-mod-record-specifications-spectral-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.