Info Title Capitalized
info-title-capitalized
info
experience: namingexperience: consistency
spec: info
Info Title Has First Characters Capitalized
Having a consistent casing for the title for your API helps provide constraints for teams naming the API, but also keep consistent with other APIs from across teams.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
info-title-capitalized:
title: Info Title Capitalized
reference: https://spotlight-rules.com/spec/rules/openapi/info-title-capitalized/
description: Having a consistent casing for the title for your API helps provide
constraints for teams naming the API, but also keep consistent with other
APIs from across teams.
message: Info Title Has First Characters Capitalized
severity: info
given: $.info.title
then:
function: pattern
functionOptions:
match: "[A-Z]\\w*"
tags:
- format:openapi
- spec:info
- experience:naming
- experience:consistency
prompt: "You are editing an OpenAPI document to satisfy the Spotlight API
governance rule 'info-title-capitalized' (Info Title Capitalized).
Requirement: Having a consistent casing for the title for your API helps
provide constraints for teams naming the API, but also keep consistent with
other APIs from across teams. To fix: Ensure the targeted value matches the
regular expression `[A-Z]\\w*`; rewrite any value that does not. This rule
is evaluated at the JSONPath `$.info.title` — inspect every location it
matches and correct only what violates the rule. Make the smallest change
that satisfies the rule, leave all unrelated content, key order, comments,
and formatting unchanged, and keep the document valid OpenAPI. Return only
the complete corrected document, with no commentary."
AI fix prompt — send this to Claude, Gemini, or ChatGPT with your artifact to auto-fix this rule
You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'info-title-capitalized' (Info Title Capitalized). Requirement: Having a consistent casing for the title for your API helps provide constraints for teams naming the API, but also keep consistent with other APIs from across teams. To fix: Ensure the targeted value matches the regular expression `[A-Z]\w*`; rewrite any value that does not. This rule is evaluated at the JSONPath `$.info.title` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary.
| Artifact | OpenAPI |
|---|---|
| Applies at (given) | $.info.title |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/openapi/info-title-capitalized/ |