How to create a spec
Course: OpenAPI Spec - chapter 4
- Write it by hand (bad, but still happens)
- Auto generate it from your code
- Easy in languages that have deep types like Rust
- Slightly harder in languages like Go/Rust
- Node.js has some libraries/codebases that let you do it 1. With express - https://www.npmjs.com/package/express-openapi (highly verbose) 2. Without express - https://github.com/lukeautry/tsoa (Cohort 1 video)
- Hono has a native implementation with zod - https://hono.dev/snippets/zod-openapi
We’ll be going through d, but we’ve covered c.ii in Cohort 1