Info Contact Require Email
info-contact-require-email
info
experience: discoverabilityexperience: documentation
spec: info
Info MUST Have Contact Email
Having a contact email address associated with the technical contract ensures that anyone who comes across the API has someone to email and get more information.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
info-contact-require-email:
title: Info Contact Require Email
reference: https://spotlight-rules.com/spec/rules/openapi/info-contact-require-email/
description: Having a contact email address associated with the technical
contract ensures that anyone who comes across the API has someone to email
and get more information.
message: Info MUST Have Contact Email
severity: info
given: $.info.contact
then:
field: email
function: truthy
tags:
- format:openapi
- spec:info
- experience:discoverability
- experience:documentation
prompt: "You are editing an OpenAPI document to satisfy the Spotlight API
governance rule 'info-contact-require-email' (Info Contact Require Email).
Requirement: Having a contact email address associated with the technical
contract ensures that anyone who comes across the API has someone to email
and get more information. To fix: Ensure `email` is present and non-empty at
each matching location. This rule is evaluated at the JSONPath
`$.info.contact` — 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-contact-require-email' (Info Contact Require Email). Requirement: Having a contact email address associated with the technical contract ensures that anyone who comes across the API has someone to email and get more information. To fix: Ensure `email` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.info.contact` — 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.contact |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/openapi/info-contact-require-email/ |