Skip to content

Support $schema property in prismic.config.json #72

@angeloashmore

Description

@angeloashmore

Description

Add a $schema property to prismic.config.json so editors like VS Code can provide autocomplete and validation.

Approach

  1. Generate a JSON Schema from the Zod ConfigSchema (see the docs) and ship it in the published package.
  2. Accept $schema as an optional passthrough in the Zod schema so it doesn't fail validation.
  3. Write $schema into the config during createConfig(), pointing to the schema file in node_modules (e.g., ./node_modules/@prismicio/cli/prismic.config.schema.json).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions