oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
When using a schema with oneOf in the requestBody the code is not generated accoring to the documentation. **Version v2.4.1** openapi.yaml ```yaml openapi: 3.0.1 info: title: openapi test version: v0.0.1...
I have the following OpenAPI: ```openapi openapi: 3.0.3 info: title: Foo description: FooDesc version: 0.0.0 servers: - url: 'http://localhost:8080/' paths: /{someString}: parameters: - name: someString in: path description: String of...
Hi, It's a concept only but we need this at @livesession. The case is like that: Let's say we have a core structures defined schema.yaml in our core golang package...
> Also, if you generate clients with this: > ```yaml > prefer-skip-optional-pointer: true > prefer-skip-optional-pointer-with-omitzero: true > ``` > and add this to a parameter like this: > ```yaml >...
I am trying to place my server generated part in one package and models that it has to use in another package. But when my api has a query parameter,...
Fixes a problem where the server generated code did not compile for strict echo. Also adds a test case to trigger the problem and then verify the update fixes #2076
When generating strict server using version 2.5.0 and respons type of text/plain the generated code looks something like this (for echo): ``` type InternalServerErrorTextResponse string type DeleteRequest500TextResponse struct { InternalServerErrorTextResponse...
Hi, There's a fix for this case: ``` components: schemas: response.Placeholder: x-go-embedding: true type: object allOf: - $ref: "#/components/schemas/Response" - type: object properties: hello: type: string past_7_days_histogram: type: array x-go-type-skip-optional-pointer:...
Hi, This PR allows to use go embeddings for particular element (instead of global `old-merge-schemas`). https://github.com/oapi-codegen/oapi-codegen/issues/531 is reasonable from OpenAPI Specification, but sometimes it's useful to use embedding to reduce...