SimpleLocalize · API Governance Rules

SimpleLocalize API Rules

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

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

Rule Categories

simplelocalize

Rules

error
simplelocalize-api-key-header
All translation management endpoints must require the X-SimpleLocalize-Token API key header
$.paths[?(!@path.match(/\/api\/v2\/projects/))].*.security
error
simplelocalize-versioned-paths
All paths must be versioned with /api/v1/ or /api/v2/ prefix
$.paths[*]~
warn
simplelocalize-response-envelope
All success responses must use SimpleLocalize envelope with status, message, and data fields
$.paths.*.*.responses.200.content.application/json.schema
error
simplelocalize-operation-ids
All operations must have camelCase operationId values
$.paths.*.*.operationId
warn
simplelocalize-tag-usage
All operations must have at least one tag
$.paths.*.*
warn
simplelocalize-customer-key-length
Customer key schema must enforce max length of 40 characters
$.components.schemas.Customer.properties.key
warn
simplelocalize-language-key-length
Language key schema must enforce max length of 20 characters
$.components.schemas.Language.properties.key
error
simplelocalize-security-schemes
Security schemes must define both ApiKeyAuth and BearerAuth
$.components.securitySchemes

Spectral Ruleset

Raw ↑
rules:
  simplelocalize-api-key-header:
    description: All translation management endpoints must require the X-SimpleLocalize-Token API key header
    message: "Translation management endpoint is missing X-SimpleLocalize-Token security requirement"
    severity: error
    given: "$.paths[?(!@path.match(/\\/api\\/v2\\/projects/))].*.security"
    then:
      function: truthy

  simplelocalize-versioned-paths:
    description: All paths must be versioned with /api/v1/ or /api/v2/ prefix
    message: "API path '{{value}}' must be versioned with /api/v1/ or /api/v2/"
    severity: error
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^/api/v[0-9]+/"

  simplelocalize-response-envelope:
    description: All success responses must use SimpleLocalize envelope with status, message, and data fields
    message: "Response schema should include status (integer), message (string), and data fields"
    severity: warn
    given: "$.paths.*.*.responses.200.content.application/json.schema"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - status
            - message

  simplelocalize-operation-ids:
    description: All operations must have camelCase operationId values
    message: "operationId '{{value}}' should use camelCase"
    severity: error
    given: "$.paths.*.*.operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  simplelocalize-tag-usage:
    description: All operations must have at least one tag
    message: "Operation is missing a tag"
    severity: warn
    given: "$.paths.*.*"
    then:
      field: tags
      function: truthy

  simplelocalize-customer-key-length:
    description: Customer key schema must enforce max length of 40 characters
    message: "Customer key should have maxLength of 40"
    severity: warn
    given: "$.components.schemas.Customer.properties.key"
    then:
      field: maxLength
      function: truthy

  simplelocalize-language-key-length:
    description: Language key schema must enforce max length of 20 characters
    message: "Language key should have maxLength of 20"
    severity: warn
    given: "$.components.schemas.Language.properties.key"
    then:
      field: maxLength
      function: truthy

  simplelocalize-security-schemes:
    description: Security schemes must define both ApiKeyAuth and BearerAuth
    message: "Missing required security scheme definition"
    severity: error
    given: "$.components.securitySchemes"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - ApiKeyAuth
            - BearerAuth

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