oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
I've decided I'll give it a try but as long as fixing `ValueByDiscriminator` seems pretty straightforward, it requires some more changes to support proper generation of `FromX` and `MergeX` methods....
Uses type aliases for response schema definitions. While using a schema like: ```yaml paths: /example: get: responses: 200: content: application/json: schema: $ref: "#/components/schemas/OneOrAnother" components: schemas: One: type: object Another: type:...
Fixes: https://github.com/deepmap/oapi-codegen/issues/1429
This PR adds support for clients to use custom query parameter names. This change is motivated by a [discussion](https://stackoverflow.com/questions/11490326/is-array-syntax-using-square-brackets-in-url-query-strings-valid) on stack how different languages handle array syntax with square brackets...
For readability purposes, it's useful to allow an optional separator string for enum values. For example: `TypeName_EnumValue` instead of `TypeNameEnumValue`. This PR adds the `EnumPrefixSeparator` configuration parameter to control such...
- Remove checks for `unexpected reference depth` - Add test case for reference depth checks Closes #1348.
The following changes were made to the GenerateBodyDefinitions function to fix https://github.com/deepmap/oapi-codegen/issues/1367.
- fix #1379
Note To Reviewer: I'm aware that you [don't usually want to change variable names in generated code](https://github.com/deepmap/oapi-codegen#contributing), but this particular change should not affect existing code, as interfaces don't need...
As seen with https://docs.mend.io/bundle/api_sca/page/getting_started_with_mend_sca_api_2_0.html that doesn't always specify the schema's `type`.