oapi-codegen
oapi-codegen copied to clipboard
Generate Go client and server boilerplate from OpenAPI 3 specifications
Related to #626, but as a separate tracking issue for ease. See https://github.com/deepmap/oapi-codegen/pull/648 and https://github.com/deepmap/oapi-codegen/pull/654 for previous attempts to resolve.
Suggestion to allow different packages per generator ``` oapi-codegen -generate types,server api/openapi.yaml -o types=internal/api/models/models.go -o server=internal/api/server/server.go ```
I'm trying to get the structs and client to compile based on Microsoft's Graph specification found here: https://graphexplorerapi.azurewebsites.net/openapi?operationIds=*&openApiVersion=3&graphVersion=v1.0&format=json This is the code I'm using ``` resp, err := http.Get("https://graphexplorerapi.azurewebsites.net/openapi?operationIds=*&openApiVersion=3&graphVersion=v1.0&format=json") if...
For my use case I'd like the struct tags to be for YAML instead of JSON. I've tried 'applicaion/yaml' in the response type of the API spec had a look...
I'm not sure if there is a specific reason for how it works at current, but what I would like to do is externally reference say the kubernetes API spec,...
### Discussed in https://github.com/deepmap/oapi-codegen/discussions/551 Originally posted by **betorvs** April 15, 2022 Hi all, Thanks for this project. It's amazing! If I want to generate code in a different directories like,...
I have created a project to illustrate the problem: https://github.com/tmartin-git/oapi-codegen-unresolvedrefs In short, if you have a splitted specification (components in a seperate yaml file) and have a schema that references...
Hello folks, I want to define a type not as alias to attach GORM Scanner/Valuer functions to properly serialize/deserialize it in DB as json document: * input: ```yaml components: schemas:...
Handling XML responses and requests is severely limited in the generated code as the full OpenAPI spec WRT XML is not fully implemented. Given this example API definition: ```yaml openapi:...
# What? I'm using a bearer security scheme and I want to authenticate some endpoints but there are some of them I don't want, for example, the login endpoint that...