How to use the YAML Validator and Formatter.
YAML syntax validation is different from validating a specific application's configuration. State the parser and schema assumptions when they matter.
Make the workflow fit your task.
Parse YAML using the intended version or parser and inspect the reported syntax issue. Preserve scalar types and nesting while formatting, then validate application-specific keys separately against the target configuration rules.
- What you provide
- YAML and target application schema if supplied.
- What you get
- Syntax findings and formatted YAML.
See the input and the result.
Illustrative input and output · a teaching example, not a live WebAct run
Example input
Repair the indentation in this YAML mapping. services should contain two sibling mappings, web and worker:
services:
web:
port: 3000
worker:
enabled: trueCompleted example
services:
web:
port: 3000
worker:
enabled: true
Both services now share the same indentation level. This fixes the supplied structure; no application-specific schema was provided.Load this input into the prompt, then copy it to WebAct to try the task. Your result may differ from the illustration.
Decisions and troubleshooting.
Does valid YAML guarantee a working application configuration?
No. The document can parse while containing unsupported fields or incorrect application values. Schema and runtime checks remain separate.
Why does a value change type after formatting or parsing?
Check quoting and parser conventions. A token that looks like text may be interpreted differently under the selected YAML rules.
Try it with your own source.
Replace the example with your material in the task prompt. Keep the requirements you need, then copy the task into WebAct.
Customize and copy the task ↑