Info License Require URL

info-license-require-url

info experience: governanceexperience: documentation spec: info

Info License MUST Have URL

The license object should include a URL linking to the full license text so API consumers can review the terms.

Rule definition

The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.

info-license-require-url:
  title: Info License Require URL
  reference: https://spotlight-rules.com/spec/rules/openapi/info-license-require-url/
  description: The license object should include a URL linking to the full license
    text so API consumers can review the terms.
  message: Info License MUST Have URL
  severity: info
  given: $.info.license
  then:
    field: url
    function: truthy
  tags:
    - format:openapi
    - spec:info
    - experience:governance
    - experience:documentation
  prompt: "You are editing an OpenAPI document to satisfy the Spotlight API
    governance rule 'info-license-require-url' (Info License Require URL).
    Requirement: The license object should include a URL linking to the full
    license text so API consumers can review the terms. To fix: Ensure `url` is
    present and non-empty at each matching location. This rule is evaluated at
    the JSONPath `$.info.license` — 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-license-require-url' (Info License Require URL). Requirement: The license object should include a URL linking to the full license text so API consumers can review the terms. To fix: Ensure `url` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.info.license` — 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.
ArtifactOpenAPI
Applies at (given)$.info.license
Severityinfo — educational by default; raise to warn/error to enforce
Referencehttps://spotlight-rules.com/spec/rules/openapi/info-license-require-url/