Spring Boot · API Governance Rules

Spring Boot API Rules

Spectral linting rules defining API design standards and conventions for Spring Boot.

9 Rules error 4 warn 5
View Rules File View on GitHub

Rule Categories

spring

Rules

warn
spring-boot-actuator-operation-id-prefix
Actuator operation IDs should be descriptive and use camelCase
$.paths[*][get,post,put,delete,patch].operationId
warn
spring-boot-actuator-summary-title-case
All operation summaries must use Title Case
$.paths[*][get,post,put,delete,patch].summary
error
spring-boot-actuator-tags-defined
All operations must have at least one tag
$.paths[*][get,post,put,delete,patch]
warn
spring-boot-actuator-tags-title-case
All tags must use Title Case
$.paths[*][get,post,put,delete,patch].tags[*]
error
spring-boot-actuator-response-200-defined
All GET operations must define a 200 response
$.paths[*].get
warn
spring-boot-actuator-path-lowercase-kebab
Actuator endpoint paths should use lowercase with hyphens
$.paths
error
spring-boot-actuator-no-trailing-slash
Paths must not end with a trailing slash
$.paths
warn
spring-boot-actuator-info-contact-defined
API info must include contact information
$.info
error
spring-boot-actuator-servers-defined
At least one server must be defined
$

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

rules:

  spring-boot-actuator-operation-id-prefix:
    description: Actuator operation IDs should be descriptive and use camelCase
    message: "Operation ID '{{value}}' should be camelCase and descriptive (e.g., getHealth, listMetrics)"
    given: "$.paths[*][get,post,put,delete,patch].operationId"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  spring-boot-actuator-summary-title-case:
    description: All operation summaries must use Title Case
    message: "Summary '{{value}}' should use Title Case"
    given: "$.paths[*][get,post,put,delete,patch].summary"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][^a-z]*([A-Z][^a-z]*)*"

  spring-boot-actuator-tags-defined:
    description: All operations must have at least one tag
    message: "Operation '{{path}}' is missing tags"
    given: "$.paths[*][get,post,put,delete,patch]"
    severity: error
    then:
      field: tags
      function: truthy

  spring-boot-actuator-tags-title-case:
    description: All tags must use Title Case
    message: "Tag '{{value}}' should be in Title Case (e.g., 'Health', 'Metrics', 'Environment')"
    given: "$.paths[*][get,post,put,delete,patch].tags[*]"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z ]+$"

  spring-boot-actuator-response-200-defined:
    description: All GET operations must define a 200 response
    message: "GET operation at '{{path}}' must define a 200 response"
    given: "$.paths[*].get"
    severity: error
    then:
      field: responses.200
      function: truthy

  spring-boot-actuator-path-lowercase-kebab:
    description: Actuator endpoint paths should use lowercase with hyphens
    message: "Path '{{path}}' should use lowercase kebab-case"
    given: "$.paths"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^\\/[a-z0-9\\-\\/\\{\\}]*$"

  spring-boot-actuator-no-trailing-slash:
    description: Paths must not end with a trailing slash
    message: "Path '{{path}}' must not end with a trailing slash"
    given: "$.paths"
    severity: error
    then:
      function: pattern
      functionOptions:
        notMatch: ".*\\/$"

  spring-boot-actuator-info-contact-defined:
    description: API info must include contact information
    message: "API info must include a contact block with name and url"
    given: "$.info"
    severity: warn
    then:
      field: contact
      function: truthy

  spring-boot-actuator-servers-defined:
    description: At least one server must be defined
    message: "OpenAPI spec must define at least one server"
    given: "$"
    severity: error
    then:
      field: servers
      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/spring-boot-actuator-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.