oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
First off, thanks for building and maintaining this project. I’ve only just starting using it and am enjoying it so far. Would you be open to hosting the README.md docs...
- **Co-authored-by: gpt-4.1 ** - **sq**
Readme states that by default nullable fields get `omitempty` tag. See https://github.com/oapi-codegen/oapi-codegen?tab=readme-ov-file#generating-nullable-types. But that doesn't seem to be the case. ``` #[0]$ cat config.yaml2 package: preferskipoptionalpointerwithomitzero output: gen.go generate: models:...
Fixes https://github.com/oapi-codegen/oapi-codegen/issues/1530 Fixes https://github.com/oapi-codegen/oapi-codegen/issues/1664 This PR: * Correctly generates the `ValueByDiscriminator` function when multiple discriminator values map to a single type * Prevents `From*/Merge*` functions from setting an arbitrary discriminator...
``` "/v1/resource/{id}": { "parameters": [ { "name": "id", "in": "path", "schema": { "anyOf": [ { "type": "string", "format": "uuid", "description": "Resource UUID" }, { "type": "string", "pattern": "^[a-z0-9_-]+$", "description": "Resource...
I'm not sure if doing this as a PR (for illustration purposes) _and_ as an Issue is considered double-dipping, so please forgive if this is overkill. https://github.com/oapi-codegen/oapi-codegen/pull/2087
When generating server response models, external package imports are not being set on the referenced header types when their schema specifications are also refs. Similar, but not equal, to issue...
Following [the instructions](https://github.com/oapi-codegen/oapi-codegen/blob/main/CONTRIBUTING.md#minimal-reproductions): Version of `oapi-codegen` - from `main` pulled today: ```shell $ go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -version github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen (devel) ``` Go version: ```shell $ go version go version go1.24.0 darwin/arm64...