oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
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,...
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` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/)...
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/mod | `v0.17.0` -> `v0.25.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/)...
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...
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":...