oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

Generate Go client and server boilerplate from OpenAPI 3 specifications

Results 633 oapi-codegen issues
Sort by recently updated
recently updated
newest added

I have a service which has a public api expressed in openapi format which I use oapi-codegen to generate the server and types for and it works great, however i...

## Problem Due to the way that Go's JSON marshalling works, the standard way to make a field not marshal, if it was not specified, was to use a pointer,...

enhancement

https://jsonnet.org is a configuration language/json templater. In practice it's very convenient for creating complex json documents such as k8s manifests or OpenAPI definitions. Currently in order to use it with...

This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/text | `v0.20.0` -> `v0.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftext/v0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftext/v0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)...

dependencies

This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/mod | `v0.17.0` -> `v0.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fmod/v0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fmod/v0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)...

dependencies

When generating server code using `oapi-codegen` for an OpenAPI specification that includes responses with the content type "text/plain", the generated code contains invalid type assertions. ### Steps to Reproduce: 1....

When schema in content for response is empty, generated strict server codes are broken. ``` $ $ cat issue.yaml openapi: "3.0.1" paths: /test: get: operationId: test responses: 200: description: good...

bug

TLDR: `enum.SOME_ENUM_NAME` becomes `SOMMEENUMNAME ...` which is not the spec. INPUT: ``` openapi: 3.0.1 paths: '/someendpoint': get: responses: '200': content: application/json: schema: $ref: '#/components/schemas/SomeSchema' components: parameters: {} schemas: SomeSchema: type:...

Here is my `api.json` file ``` { "swagger": "2.0", "info": { "title": "", "version": "" }, "host": "example.com", "basePath": "/example", "schemes": [ "http", "https" ], "consumes": [ "application/json" ], "produces":...

auto:no-head-branch