You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.3 KiB

+++ title = "[TRIAGE] OpenAPI spec serving strategy — embed YAML at compile time vs load at runtime" priority = 7 status = "todo" ticket_type = "task" dependencies = ["f3dc74"] +++

This is a triage decision ticket. It must be resolved before dependent implementation tickets can proceed. OpenAPI spec serving strategy: should the spec be embedded at compile time (include_str! macro) or loaded at runtime from a file or generated programmatically? 1. **Compile-time embed** — `include_str!("../../api/openapi.yaml")` bakes the YAML into the binary. Simple, no runtime file I/O needed for Workers. 2. **Runtime load** — read the file at startup. Does not work in Cloudflare Workers (no filesystem). 3. **Programmatic generation** — use a crate like `utoipa` to generate the spec from handler annotations. Most maintainable but adds complexity. 1. Research the options above and choose the best approach for this project. 2. Update ticket 28e7d9 (GET /api/ handler) with the chosen approach. If using utoipa, update `Cargo.toml`. 3. Mark this ticket done with a note on the chosen approach in the body or a comment. `chore(quotesdb): resolve triage — openapi-spec-serving-strategy-embed-yaml-at-compile-time-vs-`