| name | cookbook |
| description | Look up an OpenAPI-First Swift recipe (middleware, multi-file specs, mock transports, error handling) by example. Use when the user describes a pattern they want to apply. |
Look up an OpenAPI-First Swift cookbook recipe.
The user will describe what they want to do. Search the codebase for existing examples, then explain:
- How it's done in this project: show the actual code
- The OpenAPI spec behind it: show the relevant YAML
- What gets generated: show the Swift types the generator produces
- Common mistakes: what NOT to do and why
Cover recipes like:
- Defining a new endpoint with request/response schemas
- Writing client middleware (auth, logging, caching)
- Writing server middleware
- Using the build plugin vs. manual generation
- Multi-file spec resolution with Stitcher
- Protocol abstraction over generated clients
- Testing with mock transports
- Handling errors with ErrorResponse schemas
- Offline mode and bootstrap hooks