Skip to content

Config Schema Commands

The doover config-schema command group manages the JSON Schema files that define application configuration. These schemas are used by the Doover platform for deployment configuration, validation, and UI form generation.

The related doover ui-schema command group handles UI schema files in the same way.

Export

doover config-schema export

Exports the application's Python Schema class definition to a doover_config.json file. The CLI runs the application's export-config script (specified in doover_config.json or defaulting to export-config).

# Export from the current directory
doover config-schema export

# Export from a specific app directory
doover config-schema export ./my-app

# Export without automatic validation
doover config-schema export --no-validate

# Export to a specific file
doover config-schema export --config-fp ./custom_config.json

Options

OptionDefaultDescription
--validate / --no-validate--validateRun validation after export
--config-fpauto-detectedOutput file path
Information Circle

Export runs automatically as part of doover app publish. You typically only run it manually when iterating on your schema during development.

Validate

doover config-schema validate

Validates that the schemas in doover_config.json are valid JSON Schema documents. This checks the schema structure, not the configuration values.

# Validate from the current directory
doover config-schema validate

# Validate without re-exporting first
doover config-schema validate --no-export
OptionDefaultDescription
--export / --no-export--exportExport the schema before validating

The validator iterates over each application key in doover_config.json, extracts the config_schema field, and verifies it against the JSON Schema specification.

Generate

doover config-schema generate

Generates a sample configuration file from the schema. Uses JSON Schema Faker to produce a configuration with default values and example data.

# Generate to stdout
doover config-schema generate

# Generate to a specific directory
doover config-schema generate ./output

# Generate without re-exporting first
doover config-schema generate --no-export
OptionDefaultDescription
--export / --no-export--exportExport the schema before generating

This is useful for creating initial deployment configurations or for testing that your schema produces sensible defaults.

UI Schema

The doover ui-schema command group mirrors config-schema for UI schemas:

# Export UI schema
doover ui-schema export

# Validate UI schema
doover ui-schema validate

# Skip validation during export
doover ui-schema export --no-validate

UI schemas define the declarative UI layout for applications. See Declarative UI for the UI schema format.

Workflow

A typical development workflow for schemas:

# 1. Define your Schema class in Python
# 2. Export and validate
doover config-schema export

# 3. Generate a sample config to test
doover config-schema generate

# 4. Publish when ready
doover app publish

Relationship to pydoover

The doover config-schema export command calls the same Schema.export() method available in Python. The CLI wraps this in a convenient command that handles file discovery and validation.

# What the CLI does internally:
from pydoover.config import Schema

class MyConfig(Schema):
    ...

MyConfig.export(Path("doover_config.json"), "my_app")

See Schema for the full Python API reference.

Related Pages