Document FinOps Currency Iso4217
document-finops-currency-iso4217
info
experience: consistencyexperience: data-modeling
spec: document
currency should be an ISO 4217 code.
currency should be a 3-letter ISO 4217 code (e.g. USD).
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
document-finops-currency-iso4217:
title: Document FinOps Currency Iso4217
reference: https://spotlight-rules.com/spec/rules/finops/document-finops-currency-iso4217/
description: currency should be a 3-letter ISO 4217 code (e.g. USD).
message: currency should be an ISO 4217 code.
given: $.currency
severity: info
then:
function: pattern
functionOptions:
match: ^[A-Z]{3}$
tags:
- format:finops
- spec:document
- experience:consistency
- experience:data-modeling
prompt: "You are editing a FinOps document to satisfy the Spotlight API
governance rule 'document-finops-currency-iso4217' (Document FinOps Currency
Iso4217). Requirement: currency should be a 3-letter ISO 4217 code (e.g.
USD). To fix: Ensure the targeted value matches the regular expression
`^[A-Z]{3}$`; rewrite any value that does not. This rule is evaluated at the
JSONPath `$.currency` — 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 FinOps. 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 a FinOps document to satisfy the Spotlight API governance rule 'document-finops-currency-iso4217' (Document FinOps Currency Iso4217). Requirement: currency should be a 3-letter ISO 4217 code (e.g. USD). To fix: Ensure the targeted value matches the regular expression `^[A-Z]{3}$`; rewrite any value that does not. This rule is evaluated at the JSONPath `$.currency` — 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 FinOps. Return only the complete corrected document, with no commentary.
| Artifact | FinOps |
|---|---|
| Applies at (given) | $.currency |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/finops/document-finops-currency-iso4217/ |