Document Require Jsonschemadialect

document-require-jsonschemadialect

info experience: governanceexperience: discoverability spec: document

Missing `jsonSchemaDialect`.

openapi document should declare a jsonSchemaDialect 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-jsonschemadialect:
  title: Document Require Jsonschemadialect
  reference: https://spotlight-rules.com/spec/rules/openapi/document-require-jsonschemadialect/
  description: openapi document should declare a `jsonSchemaDialect` property.
  message: Missing `jsonSchemaDialect`.
  given: $
  severity: info
  then:
    field: jsonSchemaDialect
    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-jsonschemadialect' (Document Require
    Jsonschemadialect). Requirement: openapi document should declare a
    `jsonSchemaDialect` property. To fix: Ensure `jsonSchemaDialect` is present
    and non-empty at each matching location. Guidance: Missing
    `jsonSchemaDialect`. 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-jsonschemadialect' (Document Require Jsonschemadialect). Requirement: openapi document should declare a `jsonSchemaDialect` property. To fix: Ensure `jsonSchemaDialect` is present and non-empty at each matching location. Guidance: Missing `jsonSchemaDialect`. 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-jsonschemadialect/