Maintainer Email Format
maintainer-email-format
info
experience: consistency
spec: maintainers
Maintainer email should be a valid email.
A maintainer email should be a valid email address.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
maintainer-email-format:
title: Maintainer Email Format
reference: https://spotlight-rules.com/spec/rules/apis-json/maintainer-email-format/
description: A maintainer email should be a valid email address.
message: Maintainer email should be a valid email.
given: $.maintainers[*].email
severity: info
then:
function: pattern
functionOptions:
match: ^[^@\s]+@[^@\s]+\.[^@\s]+$
tags:
- format:apis-json
- spec:maintainers
- experience:consistency
prompt: "You are editing an APIs.json document to satisfy the Spotlight API
governance rule 'maintainer-email-format' (Maintainer Email Format).
Requirement: A maintainer email should be a valid email address. To fix:
Ensure the targeted value matches the regular expression
`^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$`; rewrite any value that does not. This rule
is evaluated at the JSONPath `$.maintainers[*].email` — 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
APIs.json. 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 APIs.json document to satisfy the Spotlight API governance rule 'maintainer-email-format' (Maintainer Email Format). Requirement: A maintainer email should be a valid email address. To fix: Ensure the targeted value matches the regular expression `^[^@\s]+@[^@\s]+\.[^@\s]+$`; rewrite any value that does not. This rule is evaluated at the JSONPath `$.maintainers[*].email` — 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 APIs.json. Return only the complete corrected document, with no commentary.
| Artifact | APIs.json |
|---|---|
| Applies at (given) | $.maintainers[*].email |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/apis-json/maintainer-email-format/ |