oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
I'm trying to generate model `ConfigSaveReq` from this spec ``` ConfigHttp: type: object properties: host: type: string port: type: integer ConfigSsh: type: object properties: host: type: string key: type: string...
It may be useful to make it explicit that generated code abides by the code in the codebase it's part of, not i.e. Apache-2.0 that the templates are.
I'm trying use custom generate templates and want to add some methods for only response models. For define what is request or response I have suffixes for models. But for...
## Overview As a user, I would like to generate only specific schemas. The new flag/option would generate models similar to `--exclude-schemas`, but via allowlisting approach rather than blocklisting. The...
* to do this you have the import-mapping be `file.yaml:*` fixes: #400
I see that other servers generated codes like chi or std return different error types such as `RequiredHeaderError` or `InvalidParamFormatError`, but gin server generated codes returns errors without a specific...
Fix for issue: https://github.com/deepmap/oapi-codegen/issues/1621
``` bash ❯ go version go version go1.22.1 darwin/arm64 ❯ oapi-codegen --version github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen v2.3.0 ``` Hi👋 , I think there's a bug in `oapi-codegen v2.3.0` and there's a minimal example...
```yaml openapi: "3.0.0" info: version: 0.0.1 title: Test description: Example servers: - url: /v1 paths: /stuff: post: description: Create stuff operationId: createStuff security: - Bearer: [] requestBody: required: true content:...
Via https://github.com/oapi-codegen/oapi-codegen/issues/1668 That being said, I'm not sure what the user-facing benefit of this would be, if it's then not possible to retrieve the fields? (unless we have #1680) This...