Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:PrefectHQ Prefect Prefect Yaml Schema

From Leeroopedia


Knowledge Sources
Domains Configuration, Deployment, Schema_Validation
Last Updated 2026-02-09 22:00 GMT

Overview

JSON Schema definition that validates `prefect.yaml` deployment configuration files, enabling IDE autocompletion and static validation.

Description

The prefect.yaml.schema.json file defines the formal JSON Schema for Prefect deployment configuration files (`prefect.yaml`). It provides complete type definitions for DeploymentConfig (name, version, schedules, parameters, work pool, triggers, concurrency limits), schedule types (CronSchedule, IntervalSchedule, RRuleSchedule), ConcurrencyLimitSpec, and related configuration objects. Each property includes type constraints, defaults, and descriptions that enable IDE-based validation and autocompletion.

Usage

This schema is consumed by IDEs (VS Code, PyCharm) and JSON Schema validators when editing `prefect.yaml` files. Reference the schema in a `prefect.yaml` file to get autocompletion and inline validation of deployment configurations.

Code Reference

Source Location

Signature

{
    "$defs": {
        "ConcurrencyLimitSpec": {
            "properties": {
                "limit": { "type": ["integer", "null"], "default": null },
                "collision_strategy": { "type": ["string", "null"], "default": null },
                "grace_period_seconds": { "type": ["integer", "null"], "default": null }
            }
        },
        "CronSchedule": { ... },
        "IntervalSchedule": { ... },
        "RRuleSchedule": { ... },
        "DeploymentConfig": {
            "properties": {
                "name": { "type": "string" },
                "version": { "type": ["string", "null"] },
                "schedules": { "type": "array" },
                "parameters": { "type": "object" },
                "work_pool": { "type": "object" },
                "triggers": { "type": "array" },
                "concurrency_limit": { "$ref": "#/$defs/ConcurrencyLimitSpec" }
            }
        }
    }
}

Import

# Reference in prefect.yaml for IDE validation:
# yaml-language-server: $schema=./schemas/prefect.yaml.schema.json

# Or generate programmatically:
# python scripts/generate_prefect_yaml_schema.py

I/O Contract

Inputs

Name Type Required Description
$defs object Yes Schema definitions for all referenced types
DeploymentConfig object Yes Main deployment configuration schema
CronSchedule object No Cron-based schedule definition
IntervalSchedule object No Interval-based schedule definition
RRuleSchedule object No RFC 5545 recurrence rule schedule definition
ConcurrencyLimitSpec object No Concurrency limit configuration

Outputs

Name Type Description
Validation results boolean Whether a prefect.yaml file conforms to the schema
IDE autocompletion UI hints Property suggestions and type information in editors

Usage Examples

Validated prefect.yaml

# prefect.yaml validated against the schema
deployments:
  - name: my-deployment
    version: "1.0.0"
    entrypoint: flows/my_flow.py:my_flow
    work_pool:
      name: my-pool
    schedules:
      - cron: "0 * * * *"
        timezone: "America/New_York"
    concurrency_limit:
      limit: 5
      collision_strategy: "ENQUEUE"

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment