Saasment · API Governance Rules

Saasment API Rules

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

9 Rules error 2 warn 5 info 2
View Rules File View on GitHub

Rule Categories

saasment

Rules

warn
saasment-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
saasment-security-bearer-required
All endpoints except public must require BearerAuth security
$.paths[*][*]
warn
saasment-operation-ids-kebab-case
Operation IDs should use camelCase
$.paths[*][*].operationId
warn
saasment-tags-required
All operations must have at least one tag
$.paths[*][*]
error
saasment-response-200-defined
All operations must define a success response
$.paths[*][get,put,patch].responses
warn
saasment-error-responses-defined
Operations should define 401 unauthorized response
$.paths[*][get,post,put,patch,delete].responses
info
saasment-pagination-parameters
List endpoints should support pagination with page and per_page
$.paths[*][get]
warn
saasment-severity-enum
Severity fields should use standard enum values
$.components.schemas..properties.severity
info
saasment-resource-ids-as-strings
Resource ID fields should be string type for UUID compatibility
$.components.schemas..properties.id

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  saasment-operation-summary-title-case:
    description: All operation summaries must use Title Case
    message: "Operation summary '{{value}}' must use Title Case"
    given: "$.paths[*][*].summary"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][a-z]*)( [A-Z][a-z]*)*$"

  saasment-security-bearer-required:
    description: All endpoints except public must require BearerAuth security
    message: "Endpoint must declare security requirements"
    given: "$.paths[*][*]"
    severity: error
    then:
      field: security
      function: defined

  saasment-operation-ids-kebab-case:
    description: Operation IDs should use camelCase
    message: "Operation ID '{{value}}' should use camelCase"
    given: "$.paths[*][*].operationId"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  saasment-tags-required:
    description: All operations must have at least one tag
    message: "Operation must have at least one tag"
    given: "$.paths[*][*]"
    severity: warn
    then:
      field: tags
      function: truthy

  saasment-response-200-defined:
    description: All operations must define a success response
    message: "Operation must define at least a 200 or 201 response"
    given: "$.paths[*][get,put,patch].responses"
    severity: error
    then:
      field: "200"
      function: defined

  saasment-error-responses-defined:
    description: Operations should define 401 unauthorized response
    message: "Operation should define 401 response for authentication errors"
    given: "$.paths[*][get,post,put,patch,delete].responses"
    severity: warn
    then:
      field: "401"
      function: defined

  saasment-pagination-parameters:
    description: List endpoints should support pagination with page and per_page
    message: "List endpoints should include page and per_page query parameters"
    given: "$.paths[*][get]"
    severity: info
    then:
      function: schema
      functionOptions:
        schema:
          properties:
            parameters:
              type: array

  saasment-severity-enum:
    description: Severity fields should use standard enum values
    message: "Severity fields should use standard values: critical, high, medium, low, info"
    given: "$.components.schemas..properties.severity"
    severity: warn
    then:
      field: enum
      function: defined

  saasment-resource-ids-as-strings:
    description: Resource ID fields should be string type for UUID compatibility
    message: "ID fields should be string type"
    given: "$.components.schemas..properties.id"
    severity: info
    then:
      field: type
      function: enumeration
      functionOptions:
        values:
          - string

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/saasment-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.