Summary
Add a YAML to JSON converter at app/api/routes-f/yaml-to-json/route.ts. Parse YAML and return JSON.
Requirements
- POST body { yaml }
- Return { json: any }
- Support: scalars (string, number, bool, null), block mappings, block sequences, flow style, anchors and aliases, multi-line strings (literal and folded)
- Reject malformed YAML with 400 plus line info
- Cap input at 5MB
- Implement parser inline (no YAML library)
- Tests: scalar types, nested structures, anchors, multi-line strings
Scope Constraint - READ BEFORE STARTING
All files for this task must live inside app/api/routes-f/. This includes the route handler, helpers/utilities, types, and tests. Do NOT modify, import from, or add files to lib/, utils/, types/, components/, or anywhere else outside app/api/routes-f/. If you need shared logic, duplicate it inside your subfolder. Keeping everything scoped to this folder is intentional - it keeps these tasks independent and mergeable in any order.
Summary
Add a YAML to JSON converter at app/api/routes-f/yaml-to-json/route.ts. Parse YAML and return JSON.
Requirements
Scope Constraint - READ BEFORE STARTING
All files for this task must live inside app/api/routes-f/. This includes the route handler, helpers/utilities, types, and tests. Do NOT modify, import from, or add files to lib/, utils/, types/, components/, or anywhere else outside app/api/routes-f/. If you need shared logic, duplicate it inside your subfolder. Keeping everything scoped to this folder is intentional - it keeps these tasks independent and mergeable in any order.