Document APIs JSON URL HTTPS
document-apis-json-url-https
info
experience: securityexperience: discoverability
spec: document
APIs.json url should use https.
The APIs.json url should be an https URL.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
document-apis-json-url-https:
title: Document APIs JSON URL HTTPS
reference: https://spotlight-rules.com/spec/rules/apis-json/document-apis-json-url-https/
description: The APIs.json url should be an https URL.
message: APIs.json url should use https.
given: $.url
severity: info
then:
function: pattern
functionOptions:
match: ^https://
tags:
- format:apis-json
- spec:document
- experience:security
- experience:discoverability
prompt: "You are editing an APIs.json document to satisfy the Spotlight API
governance rule 'document-apis-json-url-https' (Document APIs JSON URL
HTTPS). Requirement: The APIs.json url should be an https URL. To fix:
Ensure the targeted value matches the regular expression `^https://`;
rewrite any value that does not. This rule is evaluated at the JSONPath
`$.url` — 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 'document-apis-json-url-https' (Document APIs JSON URL HTTPS). Requirement: The APIs.json url should be an https URL. To fix: Ensure the targeted value matches the regular expression `^https://`; rewrite any value that does not. This rule is evaluated at the JSONPath `$.url` — 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) | $.url |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/apis-json/document-apis-json-url-https/ |