oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
It was completely unclear to me how to propagate the parsed token back to the echo context so that it can be used in the handlers. This small PR updates...
I've an openapi 3.0.3 with paths that have [callbacks ](https://swagger.io/docs/specification/callbacks/), how can one use oapi-codegen to generate the code for the callbacks? Is it a missing feature of this project?
The generated swaggerSpec does not contain nested types when the nested type is defined in an external reference, and included there via `$ref`. I have modified the externalref test to...
Due to how Go's JSON encoding works with composed structs, this breaks 1.12.0+ For an example of how Go's struct composition works with JSON encoding, see this playground link: https://go.dev/play/p/pofURCwIv3i...
The template generates multiple parameters. Example: ``` var cookie *http.Cookie if cookie, err = r.Cookie("cookie1"); err == nil { var value string err = runtime.BindStyledParameter("simple", true, "oauth2_authentication_csrf", cookie.Value, &value) if...
Hello, i downloaded openapi spec and it containt type with name `Client` which conflict after generation with buil-in Client struct. I did not find how to rename client, i guess...
Fixes #301 Massive thank you to @gnirb for already doing some of the PR.
I have an object with nested properties, but the generated code does not define a separate type for the nested struct. This makes it very difficult to work with the...
Hi, I've been generating chi code with authentication (`OapiRequestValidatorWithOptions` with `AuthenticationFunc`). I can get to the point where we can verify the bearer token, but is it possible to add...
Hi, what do you think of something like this? ```go // Defines values for Weather. const ( WeatherSunny Weather = "sunny" WeatherRaining Weather = "raining" ) var AllWeathers = []Weather{...