Info Title Max Length
info-title-max-length
info
experience: consistencyexperience: documentation
spec: info
Info Title MUST Be Less Than 50 Characters
Having a limitation on the length of the title for your API helps provide constraints for teams naming it, 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-max-length:
title: Info Title Max Length
reference: https://spotlight-rules.com/spec/rules/openapi/info-title-max-length/
description: Having a limitation on the length of the title for your API helps
provide constraints for teams naming it, but also keep consistent with other
APIs from across teams.
message: Info Title MUST Be Less Than 50 Characters
severity: info
given: $.info
then:
field: title
function: length
functionOptions:
max: 50
tags:
- format:openapi
- spec:info
- experience:consistency
- experience:documentation
prompt: "You are editing an OpenAPI document to satisfy the Spotlight API
governance rule 'info-title-max-length' (Info Title Max Length).
Requirement: Having a limitation on the length of the title for your API
helps provide constraints for teams naming it, but also keep consistent with
other APIs from across teams. To fix: Ensure the length of `title` is at
most 50. This rule is evaluated at the JSONPath `$.info` — 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-max-length' (Info Title Max Length). Requirement: Having a limitation on the length of the title for your API helps provide constraints for teams naming it, but also keep consistent with other APIs from across teams. To fix: Ensure the length of `title` is at most 50. This rule is evaluated at the JSONPath `$.info` — 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 |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/openapi/info-title-max-length/ |