[Go] Generate XML struct annotations
Created by: langston-barrett
Description
When generating Go code, one gets types tagged with JSON:
type Foo struct {
Str string `json:"Str,omitempty"`
}
This is awesome for JSON APIs. However, OpenAPI also allows for application/xml
content-types! I am writing an XML API and currently have to manually go in and tag these types.
openapi-generator version
The Docker CLI generator.
Command line used for generation
sudo docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/swagger.yml \
-g go \
-o /local/generated/client
Steps to reproduce
Write any swagger.yml
and generate Go code
Related issues/PRs
Suggest a fix/enhancement
Automatically annotate all structs with both XML and JSON names, to start. The tags are space separated.