Document Spec Must Not Be Empty

document-spec-must-not-be-empty

info experience: governance spec: document

{{error}}

Spec should not be empty.

Rule definition

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

document-spec-must-not-be-empty:
  title: Document Spec Must Not Be Empty
  reference: https://spotlight-rules.com/spec/rules/openapi/document-spec-must-not-be-empty/
  description: Spec should not be empty.
  message: "{{error}}"
  severity: info
  given: $
  then:
    function: trimble:is-valid-spec
  tags:
    - format:openapi
    - spec:document
    - experience:governance
  prompt: "You are editing an OpenAPI document to satisfy the Spotlight API
    governance rule 'document-spec-must-not-be-empty' (Document Spec Must Not Be
    Empty). Requirement: Spec should not be empty. 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-spec-must-not-be-empty' (Document Spec Must Not Be Empty). Requirement: Spec should not be empty. 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-spec-must-not-be-empty/