oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
## Summary Generate types from `components/securitySchemes` to be used as a key in `context.WithValue`. ## Background For example, prepare the following API schema and configuration. schemas.yaml ```yaml paths: /example: get:...
Another attempt to fix #1147. Recreated https://github.com/deepmap/oapi-codegen/pull/1148. This time `go generate ./...` has been run. All tests pass. New template function is added, which strips package name for external ref...
Resolve strict-server mode failure when handling multiple binary request bodies (e.g., jpeg and png)
I am using the following OpenAPI definition: ```yaml openapi: 3.0.3 info: title: my api version: 1.0.0 paths: /image: put: summary: put image operationId: PutImage requestBody: content: image/jpeg: schema: type: string...
Path parameters now supports encoding.TextUnmarshaler interface. https://github.com/deepmap/oapi-codegen/pull/404 Query parameters do not. I changed to call UnmarshalText instead of reflect.Set if the destination type implements encoding.TextUnmarshaler
Similar to #1143, but for fiber Original issue: #1144 Due to differences in gin and fiber error handling, `ErrorHandler` option was modified in order to support fiber. Message type was...
Hello, I have modified the ErrorHandler method signature. Changed to receive err instead of receiving error message as string. This is because an error message cannot set an appropriate error...
- fix #1091
This PR tries to implement enum with labels as discussed in this **[Stackoverflow](https://stackoverflow.com/questions/66465888/how-to-define-enum-mapping-in-openapi)** thread without using extra field `x-enum-varnames` that can change between each OpenAPI consumer. With this PR, this...
Overview --- As a user would like to be able to only hide selected components but still have code generated. The new option(s) would allow to still generate affected components...
Currently `std-http-server` handles a root path(`/`) in an spec with this generated code: `m.HandleFunc("GET "+options.BaseURL+"/", wrapper.Get)` According to `net/http` docs: > Patterns can match the method, host and path of...