Document Require Path

document-require-path

info experience: governanceexperience: discoverability spec: document

Missing `paths`.

openapi document should declare a paths property.

Rule definition

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

document-require-path:
  title: Document Require Path
  reference: https://spotlight-rules.com/spec/rules/openapi/document-require-path/
  description: openapi document should declare a `paths` property.
  message: Missing `paths`.
  given: $
  severity: info
  then:
    field: paths
    function: truthy
  tags:
    - format:openapi
    - spec:document
    - experience:governance
    - experience:discoverability
  prompt: "You are editing an OpenAPI document to satisfy the Spotlight API
    governance rule 'document-require-path' (Document Require Path).
    Requirement: openapi document should declare a `paths` property. To fix:
    Ensure `paths` is present and non-empty at each matching location. Guidance:
    Missing `paths`. 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 'document-require-path' (Document Require Path). Requirement: openapi document should declare a `paths` property. To fix: Ensure `paths` is present and non-empty at each matching location. Guidance: Missing `paths`. 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)$
Severityinfo — educational by default; raise to warn/error to enforce
Referencehttps://spotlight-rules.com/spec/rules/openapi/document-require-path/