oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
How to reproduce: Create the following files in a directory. openapi.yaml ```yaml # openapi.yaml openapi: "3.0.0" info: version: 1.0.0 title: Generate models paths: /client: get: operationId: getClient parameters: - description:...
I have multiple endpoints that have the same validation logic that returns a few different status codes. That validation logic is in a different function. The problem is that every...
I found some typos: - `unmarshaling` -> `unmarshalling`. - `specificiation` -> `specification`
### Problem When using oapi-codegen generated strict middleware (`StrictMiddlewareFunc`), the response status code is not available during middleware execution. ### Expected Behavior ```go func Telemetry(f v1.StrictHandlerFunc, operationName string) v1.StrictHandlerFunc {...
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-go](https://redirect.github.com/actions/setup-go) | action | minor | `v6.0.0` -> `v6.1.0` | --- ### Release...
Read more in https://github.com/oapi-codegen/oapi-codegen/discussions/2169
This PR adds capability to generate pointer types for nullable array items. When an array's items have `nullable: true`, the generated Go type now correctly uses pointer types (e.g., `[]*float32`...
I believe the recent change to handle leading underscores in property names has introduced a breaking change in how the `oapi-codegen` generates structs. https://github.com/oapi-codegen/oapi-codegen/pull/1822 This renaming alters the generated code...
Related to #2163, but this has been on my (internal, mental) backlog for some time
Closes #1513 I've just implemented it for the `std-http` code generation, give me some thoughts about it and I could implement other server frameworks.