Info Contact Require URL

info-contact-require-url

info experience: discoverabilityexperience: documentation spec: info

Info MUST Have Contact URL

Having a contact url associated with the technical contract ensures that anyone who comes across the API knows where to go to contact someone.

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-url:
  title: Info Contact Require URL
  reference: https://spotlight-rules.com/spec/rules/openapi/info-contact-require-url/
  description: Having a contact url associated with the technical contract ensures
    that anyone who comes across the API knows where to go to contact someone.
  message: Info MUST Have Contact URL
  severity: info
  given: $.info.contact
  then:
    field: url
    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-url' (Info Contact Require URL).
    Requirement: Having a contact url associated with the technical contract
    ensures that anyone who comes across the API knows where to go to contact
    someone. To fix: Ensure `url` 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-url' (Info Contact Require URL). Requirement: Having a contact url associated with the technical contract ensures that anyone who comes across the API knows where to go to contact someone. To fix: Ensure `url` 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.
ArtifactOpenAPI
Applies at (given)$.info.contact
Severityinfo — educational by default; raise to warn/error to enforce
Referencehttps://spotlight-rules.com/spec/rules/openapi/info-contact-require-url/