Catch netlify.toml errors before you deploy with the new JSON schema
Netlify now publishes a JSON schema for netlify.toml, so editors can flag configuration mistakes before you deploy instead of after a failed build.
To turn it on, add this key at the top of your file: "$schema" = "https://open-api.netlify.com/netlify.schema.json". The schema describes the supported properties, the values each one accepts, and what they do. In editors that support JSON schemas for TOML files, you get property suggestions as you type, descriptions inline, and warnings on invalid values. In VS Code, you'll need the Even Better TOML extension for this.
Netlify also points to agents as a use case. An agent that writes your netlify.toml can check its output against the schema and fix invalid properties or values before anything is deployed.
Netlify ignores the $schema key during builds and deploys. Some checks, like whether a configured directory exists, only happen at build time, so a file that passes the schema can still fail to build.
Loading replies…