Info Require Contact 2

info-require-contact-2

info experience: discoverabilityexperience: documentation spec: info

Info MUST Have Contact Object

Having a contact object associated with the technical contract ensures that anyone who comes across the API has someone to contact and get more information.

Rule definition

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

info-require-contact-2:
  title: Info Require Contact 2
  reference: https://spotlight-rules.com/spec/rules/openapi/info-require-contact-2/
  description: Having a contact object associated with the technical contract
    ensures that anyone who comes across the API has someone to contact and get
    more information.
  message: Info MUST Have Contact Object
  severity: info
  given: $.info
  then:
    field: contact
    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-require-contact-2' (Info Require Contact 2).
    Requirement: Having a contact object associated with the technical contract
    ensures that anyone who comes across the API has someone to contact and get
    more information. To fix: Ensure `contact` is present and non-empty at each
    matching location. This rule is evaluated at the JSONPath `$.info` — 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-require-contact-2' (Info Require Contact 2). Requirement: Having a contact object associated with the technical contract ensures that anyone who comes across the API has someone to contact and get more information. To fix: Ensure `contact` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.info` — 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
Severityinfo — educational by default; raise to warn/error to enforce
Referencehttps://spotlight-rules.com/spec/rules/openapi/info-require-contact-2/