BetterCloud · API Governance Rules

BetterCloud API Rules

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

34 Rules error 13 warn 19 info 2
Generated by API Evangelist Written by API Evangelist tooling for BetterCloud's APIs. It is a starting point, not a ruleset BetterCloud publishes or enforces.
View Rules File View on GitHub

Rule Categories

error http info no openapi operation pagination parameter path paths query response schema security servers

Rules

warn
info-title-prefix
API title should start with "BetterCloud"
$.info.title
error
info-description-required
API info must have a description
$.info
error
info-version-required
API must specify a version
$.info
warn
openapi-version
Should use OpenAPI 3.0.x
$.openapi
error
servers-defined
At least one server must be defined
$
error
servers-https-only
Server URLs must use HTTPS
$.servers[*].url
warn
paths-kebab-case
Path segments should use kebab-case
$.paths
error
paths-no-trailing-slash
Paths must not have trailing slashes
$.paths
error
operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Operation summaries should start with "BetterCloud"
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Operations should have descriptions
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
All operations must have operationId
$.paths[*][get,post,put,patch,delete]
warn
operation-id-camel-case
operationId should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Operations must have tags
$.paths[*][get,post,put,patch,delete]
warn
parameter-description-required
Parameters must have descriptions
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Parameters must have schemas
$.paths[*][get,post,put,patch,delete].parameters[*]
error
response-success-required
Operations must define a success response
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Response descriptions are required
$.paths[*][get,post,put,patch,delete].responses[*]
error
schema-error-required-fields
Error schema must have code, id, href, and reason fields
$.components.schemas.ErrorResponse.required
warn
schema-description-required
Component schemas should have descriptions
$.components.schemas[*]
error
security-schemes-defined
Security schemes must be defined
$.components
warn
security-global-defined
Global security should be defined
$
info
security-api-key-header
BetterCloud uses API key in header (X-API-Key)
$.components.securitySchemes[*][?(@.type=='apiKey')]
error
http-get-no-body
GET operations should not have request bodies
$.paths[*].get
warn
http-delete-no-body
DELETE operations should not have request bodies
$.paths[*].delete
warn
http-post-has-body
POST operations creating resources should have request bodies
$.paths[*].post
info
pagination-page-parameter
List endpoints should support page parameter
$.paths[*].get.parameters[?(@.name=='page')].schema.type
warn
no-empty-descriptions
Descriptions should not be empty
$..description
warn
servers-expected-domain
Server URLs should be on the bettercloud.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas

Spectral Ruleset

Raw ↑
# authorship: generated by API Evangelist tooling. Stamped 2026-08-18
# on the file's own generator header (roadmap#64). An unmarked file is
# NOT assumed to be ours -- absence of evidence was never stamped.
x-method: generated
# bettercloud — Spectral ruleset (strengthened)
# Plain Spectral. Existing hand-authored rules preserved; measured rules added
# from this provider's own OpenAPI conventions by strengthen_ruleset.py,
# then self-validated against the spec.
#
# Provenance:
#   - servers-https-only: 100% of servers already https (error)
#   - servers-expected-domain: 1/1 servers on bettercloud.com
#   - path-params-casing: snake @ 100% (n=11)
#   - query-params-casing: snake @ 100% (n=13)
#   - operationid-casing: camel @ 100% (n=18)
#   - schema-names-casing: pascal @ 100% (n=24)
#   - schema-properties-casing: snake @ 100% (n=78)
#   - security: global (root) — NOT emitting operation-security-required
#   - error-schema-defined: ErrorResponse
#   - pagination params observed: ['page', 'per_page']
#   - merge: kept 28 existing, added 6 measured, upgraded 0
#   - added: servers-expected-domain, path-params-casing, query-params-casing, schema-names-casing, schema-properties-casing, error-schema-defined
extends:
  - spectral:oas
rules:
  info-title-prefix:
    description: API title should start with "BetterCloud"
    message: Info title should start with 'BetterCloud' — got '{{value}}'
    severity: warn
    given: $.info.title
    then:
      function: pattern
      functionOptions:
        match: ^BetterCloud
  info-description-required:
    description: API info must have a description
    severity: error
    given: $.info
    then:
      field: description
      function: truthy
  info-version-required:
    description: API must specify a version
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  openapi-version:
    description: Should use OpenAPI 3.0.x
    severity: warn
    given: $.openapi
    then:
      function: pattern
      functionOptions:
        match: ^3\.0\.
  servers-defined:
    description: At least one server must be defined
    severity: error
    given: $
    then:
      field: servers
      function: truthy
  servers-https-only:
    description: Server URLs must use HTTPS
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: ^https://
  paths-kebab-case:
    description: Path segments should use kebab-case
    severity: warn
    given: $.paths
    then:
      function: pattern
      functionOptions:
        match: ^(/[a-z0-9-{}]+)+$
  paths-no-trailing-slash:
    description: Paths must not have trailing slashes
    severity: error
    given: $.paths
    then:
      function: pattern
      functionOptions:
        notMatch: /$
  operation-summary-required:
    description: All operations must have a summary
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: summary
      function: truthy
  operation-summary-prefix:
    description: Operation summaries should start with "BetterCloud"
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].summary
    then:
      function: pattern
      functionOptions:
        match: ^BetterCloud
  operation-description-required:
    description: Operations should have descriptions
    severity: warn
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: description
      function: truthy
  operation-id-required:
    description: All operations must have operationId
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: operationId
      function: truthy
  operation-id-camel-case:
    description: operationId should use camelCase
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].operationId
    then:
      function: pattern
      functionOptions:
        match: ^[a-z][a-zA-Z0-9]+$
  operation-tags-required:
    description: Operations must have tags
    severity: warn
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: tags
      function: truthy
  parameter-description-required:
    description: Parameters must have descriptions
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].parameters[*]
    then:
      field: description
      function: truthy
  parameter-schema-required:
    description: Parameters must have schemas
    severity: error
    given: $.paths[*][get,post,put,patch,delete].parameters[*]
    then:
      field: schema
      function: truthy
  response-success-required:
    description: Operations must define a success response
    severity: error
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          minProperties: 1
  response-description-required:
    description: Response descriptions are required
    severity: error
    given: $.paths[*][get,post,put,patch,delete].responses[*]
    then:
      field: description
      function: truthy
  schema-error-required-fields:
    description: Error schema must have code, id, href, and reason fields
    severity: error
    given: $.components.schemas.ErrorResponse.required
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          contains:
            type: string
            enum:
            - code
            - id
            - href
            - reason
  schema-description-required:
    description: Component schemas should have descriptions
    severity: warn
    given: $.components.schemas[*]
    then:
      field: description
      function: truthy
  security-schemes-defined:
    description: Security schemes must be defined
    severity: error
    given: $.components
    then:
      field: securitySchemes
      function: truthy
  security-global-defined:
    description: Global security should be defined
    severity: warn
    given: $
    then:
      field: security
      function: truthy
  security-api-key-header:
    description: BetterCloud uses API key in header (X-API-Key)
    severity: info
    given: $.components.securitySchemes[*][?(@.type=='apiKey')]
    then:
      field: in
      function: enumeration
      functionOptions:
        values:
        - header
  http-get-no-body:
    description: GET operations should not have request bodies
    severity: error
    given: $.paths[*].get
    then:
      field: requestBody
      function: falsy
  http-delete-no-body:
    description: DELETE operations should not have request bodies
    severity: warn
    given: $.paths[*].delete
    then:
      field: requestBody
      function: falsy
  http-post-has-body:
    description: POST operations creating resources should have request bodies
    severity: warn
    given: $.paths[*].post
    then:
      field: requestBody
      function: truthy
  pagination-page-parameter:
    description: List endpoints should support page parameter
    severity: info
    given: $.paths[*].get.parameters[?(@.name=='page')].schema.type
    then:
      function: enumeration
      functionOptions:
        values:
        - integer
  no-empty-descriptions:
    description: Descriptions should not be empty
    severity: warn
    given: $..description
    then:
      function: pattern
      functionOptions:
        match: .+
  servers-expected-domain:
    description: Server URLs should be on the bettercloud.com domain.
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: bettercloud\.com
  path-params-casing:
    description: Path parameters should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.paths[*].parameters[?(@.in=='path')].name
    then:
      function: casing
      functionOptions:
        type: snake
  query-params-casing:
    description: Query parameters should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
    then:
      field: name
      function: casing
      functionOptions:
        type: snake
  schema-names-casing:
    description: Component schema names should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.components.schemas
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: pascal
  schema-properties-casing:
    description: Schema properties should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.components.schemas[*].properties
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: snake
  error-schema-defined:
    description: A shared error schema (ErrorResponse) should be defined for error payloads.
    severity: warn
    given: $.components.schemas
    then:
      field: ErrorResponse
      function: truthy

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