CAMARA Project · API Governance Rules

CAMARA Project — tooling rules

Spectral linting rules defining API design standards and conventions for CAMARA Project.

18 Rules error 5 warn 10
Published by CAMARA Project Served by the provider at https://github.com/camaraproject/tooling/blob/42da93798be5435257402eb4b0c35f9bcf7da2f8/linting/config/.spectral.yaml; the copy below was fetched from there.
View Rules File View on GitHub

Rule Categories

camara

Rules

warn
camara-discriminator-aware-unused-component
Detects unused OpenAPI components while treating discriminator mapping targets as references.
$
hint
camara-language-avoid-telco
This rule checks for telco-specific terminology in your API definitions and suggests more inclusive terms.
$..*.*
error
camara-oas-version
This rule validates the OpenAPI version in your specification and requires compliance with version 3.0.3.
$
warn
camara-path-param-id
This rule ensures consistent and descriptive naming for path parameters in your OpenAPI specification. Please use 'resource_id' instead of just 'id' for your path parameters.
$.paths[*][*].parameters[?(@.in == 'path')].name
warn
camara-security-no-secrets-in-path-or-query-parameters
This rule checks for sensitive data ('MSISDN' and 'IMSI') in API paths and suggests avoiding their use.
$.paths
error
camara-http-methods
Ensure that all path URLs have valid HTTP methods (GET, PUT, POST, DELETE, PATCH, OPTIONS).
$.paths[*][*]~
error
camara-get-no-request-body
$.paths.*.get$.paths.*.delete
warn
camara-reserved-words
This rule checks Reserved words must not be used in the following parts of an API specification [Paths, Request Body properties, Component, Operation Id, Security Schema]
$.paths$..parameters[*]$..components.schemas.*.properties.*$.paths.*.$.components.securitySchemes$.components.*.*$.paths.*.*.operationId
warn
camara-routes-description
This rule checks if each operation (POST, GET, DELETE, PUT, PATCH, OPTIONS) in your API specification has a description. Ensure that you have added a 'summary' field for each operation in your OpenAPI specification.
$.paths.*.post$.paths.*.get$.paths.*.delete$.paths.*.put$.paths.*.patch$.paths.*.options
warn
camara-parameters-descriptions
This Spectral rule ensures that each path parameter in the API specification has a descriptive and meaningful description.
$.paths..parameters.*
warn
camara-response-descriptions
This Spectral rule ensures that each responese object in the API specification has a descriptive and meaningful description.
$.paths..responses.*
warn
camara-properties-descriptions
This Spectral rule ensures that each propoerty within objects in the API specification has a descriptive and meaningful description.
$.components[examples,headers,links,parameters,pathItems,requestBodies,responses,schemas,securitySchemes].*$.components.*.*.properties.*
warn
camara-operation-summary
This rule checks if each operation (POST, GET, DELETE, PUT, PATCH, OPTIONS) in your API specification has a meaningful summary. Ensure that you have added a 'summary' field for each operation in your OpenAPI specification.
$.paths.*.post$.paths.*.get$.paths.*.delete$.paths.*.put$.paths.*.patch$.paths.*.options
hint
camara-discriminator-use
Ensure that API definition YAML files with oneOf or anyOf sections include a discriminator object for serialization, deserialization, and validation.
$.components.schemas[*]
hint
camara-operationid-casing-convention
This rule checks Operation ids should follow a specific case convention: camel case.
$.paths.*.*.operationId
warn
camara-schema-casing-convention
This rule checks schema should follow a specific case convention pascal case.
$.components.schemas[*]~
error
camara-path-casing-convention
Paths should be kebab-case.
$.paths[*]~
error
camara-schema-type-check
$.components.schemas.*

Spectral Ruleset

Raw ↑
# harvested from https://github.com/camaraproject/tooling/blob/42da93798be5435257402eb4b0c35f9bcf7da2f8/linting/config/.spectral.yaml on 2026-10-09 — a Spectral ruleset published in the provider's own GitHub repository (camaraproject/tooling); found by GitHub code search, fetched verbatim
x-method: harvested
x-stamped: 2026-10-09
x-source-url: https://github.com/camaraproject/tooling/blob/42da93798be5435257402eb4b0c35f9bcf7da2f8/linting/config/.spectral.yaml
# CAMARA Project - linting ruleset - documentation avaialable here:
# https://github.com/camaraproject/Commonalities/blob/main/documentation/Linting-rules.md
# Changelog:
# - 31.01.2024: Initial version
# - 19.03.2024: Corrected camara-http-methods rule
# - 03.12.2024: Corrected camara-path-param-id and camara-discriminator-use to handle null values error in example fields
# - 09.01.2025: Updated info-contact rule
# - 21.07.2025: Added camara-schema-type-check rule
# - 12.01.2026: camara-discriminator-use deprecated
# - 16.07.2026: Made unused-component detection discriminator-aware (S-211)


extends: "spectral:oas"
functions:
  - camara-reserved-words
  - camara-language-avoid-telco
  - camara-security-no-secrets-in-path-or-query-parameters
  - camara-discriminator-aware-unused-component
functionsDir: "./lint_function"
rules:
  #  Built-in OpenAPI Specification ruleset. Each rule then can be enabled individually.
  #  The severity keyword is optional in rule definition and can be error, warn, info, hint, or off. The default value is warn.
  contact-properties: false
  duplicated-entry-in-enum: true
  info-contact: false
  info-description: true
  info-license: true
  license-url: true
  no-$ref-siblings: error
  no-eval-in-markdown: true
  no-script-tags-in-markdown: true
  openapi-tags: false
  openapi-tags-alphabetical: false
  openapi-tags-uniqueness: error
  operation-description: true
  operation-operationId: true
  operation-operationId-unique: error
  operation-operationId-valid-in-url: true
  operation-parameters: true
  operation-singular-tag: true
  operation-success-response: true
  operation-tags: true
  operation-tag-defined: true
  path-declarations-must-exist: true
  path-keys-no-trailing-slash: true
  path-not-include-query: true
  path-params: error
  tag-description: false
  typed-enum: true
  oas3-api-servers: true
  oas3-examples-value-or-externalValue: true
  oas3-operation-security-defined: false
  oas3-parameter-description: false
  oas3-schema: true
  oas3-server-not-example.com: false
  oas3-server-trailing-slash: true
  oas3-unused-component: false
  oas3-valid-media-example: true
  oas3-valid-schema-example: true
  # oas3-server-variables: true

  # Custom Rules Utilizing Spectral's Built-in Functions and JavaScript Implementations

  camara-discriminator-aware-unused-component:
    message: "Potentially unused component has been detected."
    severity: warn
    description: >
      Detects unused OpenAPI components while treating discriminator mapping
      targets as references.
    formats: ["oas3"]
    resolved: false
    given: "$"
    then:
      function: camara-discriminator-aware-unused-component
    recommended: true

  camara-language-avoid-telco:
    message: "{{error}}"
    severity: hint
    description: |
      This rule checks for telco-specific terminology in your API definitions and suggests more inclusive terms.
    given: "$..*.*"
    then:
      function: camara-language-avoid-telco
    recommended: false  # Set to true/false to enable/disable this rule

  camara-oas-version:
    message: "OpenAPI Version Error: The OpenAPI specification must adhere to version 3.0.3."
    severity: error
    description: |
      This rule validates the OpenAPI version in your specification and requires compliance with version 3.0.3.
    given: "$"
    then:
      field: openapi
      function: pattern
      functionOptions:
        match: 3.0.3
    recommended: true  # Set to true/false to enable/disable this rule

  camara-path-param-id:
    message: "Path Parameter Naming Warning: Use 'resource_id' instead of just 'id' in path parameters."
    severity: warn
    description: |
      This rule ensures consistent and descriptive naming for path parameters in your OpenAPI specification.
      Please use 'resource_id' instead of just 'id' for your path parameters.
    given: "$.paths[*][*].parameters[?(@.in == 'path')].name"
    then:
      field: name
      function: pattern
      functionOptions:
        match: "^(?!.*\\b(id|Id|ID|iD)\\b).*$"
    recommended: true  # Set to true/false to enable/disable this rule

  camara-security-no-secrets-in-path-or-query-parameters:
    message: "Sensitive data found in path: {{error}} Consider avoiding the use of sensitive data "
    severity: warn
    description: |
      This rule checks for sensitive data ('MSISDN' and 'IMSI') in API paths and suggests avoiding their use.
    given:
      - "$.paths"
    then:
      function: camara-security-no-secrets-in-path-or-query-parameters
    recommended: true  # Set to true/false to enable/disable this rule

  camara-http-methods:
    description: "Ensure that all path URLs have valid HTTP methods (GET, PUT, POST, DELETE, PATCH, OPTIONS)."
    message: "Invalid HTTP method for '{{path}}'. Must be one of get, put, post, delete, patch, options."
    severity: error
    given: $.paths[*][*]~
    then:
      function: pattern
      functionOptions:
        match: "^(get|put|post|delete|patch|options|parameters)$"
    recommended: true  # Set to true/false to enable/disable this rule

  camara-get-no-request-body:
    message: There must be no request body for Get and DELETE
    severity: error
    given:
      - "$.paths.*.get"
      - "$.paths.*.delete"
    then:
      field: requestBody
      function: falsy
    recommended: true  # Set to true/false to enable/disable this rule

  camara-reserved-words:
    message: "Reserved words found {{error}} Consider avoiding the use of reserved word "
    severity: warn
    description: |
      This rule checks Reserved words must not be used in the following parts of an API specification [Paths, Request Body properties, Component, Operation Id, Security Schema]
    given:
      - "$.paths"                              # Paths
      - "$..parameters[*]"                     # Path or Query Parameter Names:
      - "$..components.schemas.*.properties.*"   # Request and Response body parameter
      - "$.paths.*."                           # Path and Operation Names:
      - "$.components.securitySchemes"         # Security Schemes:
      - "$.components.*.*"                     # Component Names:
      - "$.paths.*.*.operationId"              # OperationIds:
    then:
      function: camara-reserved-words
    recommended: true  # Set to true/false to enable/disable this rule

  camara-routes-description:
    message: "Functionality method description Warning: Each method should have description."
    severity: warn
    description: |
            This rule checks if each operation (POST, GET, DELETE, PUT, PATCH, OPTIONS) in your API specification has a description.
            Ensure that you have added a 'summary' field for each operation in your OpenAPI specification.
    given:
      - "$.paths.*.post"
      - "$.paths.*.get"
      - "$.paths.*.delete"
      - "$.paths.*.put"
      - "$.paths.*.patch"
      - "$.paths.*.options"
    then:
      field: description
      function: truthy
    recommended: true  # Set to true/false to enable/disable this rule
    
  camara-parameters-descriptions:
    message: "Parameter description is missing or empty: {{error}}"
    severity: warn
    description: |
      This Spectral rule ensures that each path parameter in the API specification has a descriptive and meaningful description.
    given:
      - "$.paths..parameters.*"
    then:
      field: description
      function: truthy
    recommended: true  # Set to true/false to enable/disable this rule
    
  camara-response-descriptions:
    message: "Parameter description is missing or empty: {{error}}"
    severity: warn
    description: |
      This Spectral rule ensures that each responese object in the API specification has a descriptive and meaningful description.
    given:
      - "$.paths..responses.*"
    then:
      field: description
      function: truthy
    recommended: true  # Set to true/false to enable/disable this rule

  camara-properties-descriptions:
    message: "Property description is missing or empty: {{error}}"
    severity: warn
    description: |
      This Spectral rule ensures that each propoerty within objects in the API specification has a descriptive and meaningful description.
    given:
      - "$.components[examples,headers,links,parameters,pathItems,requestBodies,responses,schemas,securitySchemes].*"
      - "$.components.*.*.properties.*"
    then:
      field: description
      function: truthy
    recommended: true  # Set to true/false to enable/disable this rule
    
  camara-operation-summary:
    message: "Operation Summary Warning: Each operation should include a short summary for better understanding."
    severity: warn
    description: |
            This rule checks if each operation (POST, GET, DELETE, PUT, PATCH, OPTIONS) in your API specification has a meaningful summary.
            Ensure that you have added a 'summary' field for each operation in your OpenAPI specification.
    given:
      - "$.paths.*.post"
      - "$.paths.*.get"
      - "$.paths.*.delete"
      - "$.paths.*.put"
      - "$.paths.*.patch"
      - "$.paths.*.options"
    then:
      field: summary
      function: truthy
    recommended: true  # Set to true/false to enable/disable this rule

  camara-discriminator-use:
    description: |
      Ensure that API definition YAML files with oneOf or anyOf sections include a discriminator object for serialization, deserialization, and validation.
    severity: hint
    given: "$.components.schemas[*]"
    then:
      - field: oneOf
        function: truthy
        message: "Schemas with 'oneOf' should include a 'discriminator' for type identification."
      - field: anyOf
        function: truthy
        message: "Schemas with 'anyOf' should include a 'discriminator' for type identification."
      - field: discriminator
        function: truthy
        message: "A 'discriminator' object is required when using 'oneOf' or 'anyOf'."
    recommended: false # Set to true/false to enable/disable this rule

  camara-operationid-casing-convention:
    message: Operation Id must be in Camel case "{{error}}"
    severity: hint
    description: |
        This rule checks Operation ids should follow a specific case convention: camel case.
    given: "$.paths.*.*.operationId"
    then:
      function: casing
      functionOptions:
        type: camel
    recommended: true  # Set to true/false to enable/disable this rule

  camara-schema-casing-convention:
    description: This rule checks schema should follow a specific case convention pascal case.
    message: "{{property}} should be pascal case (UppperCamelCase)"
    severity: warn
    given: $.components.schemas[*]~
    then:
      function: casing
      functionOptions:
        type: pascal
    recommended: true  # Set to true/false to enable/disable this rule

  camara-path-casing-convention:
    description: Paths should be kebab-case.
    severity: error
    message: "{{property}} is not kebab-case: {{error}}"
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: "^\/([a-z0-9]+(-[a-z0-9]+)*)?(\/[a-z0-9]+(-[a-z0-9]+)*|\/{.+})*$"  # doesn't allow /asasd{asdas}sadas pattern or not closed braces
    recommended: true  # Set to true/false to enable/disable this rule

  camara-schema-type-check:
    message: "Invalid type in schema definition."
    severity: error
    given: "$.components.schemas.*"
    then:
      field: type
      function: pattern
      functionOptions:
        match: "^(string|number|integer|boolean|array|object)$"
    recommended: true

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/camara-project-tooling-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.