You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (dst*WebhookEvent) UnmarshalJSON(data []byte) error {
varerrerror// use discriminator value to speed up the lookupvarjsonDictmap[string]interface{}
err:=json.Unmarshal(data, &jsonDict) // <---- compilation error as err already declared in variferr!=nil {
returnfmt.Errorf("Failed to unmarshal JSON into map for the discrimintor lookup.")
}
}
Steps to reproduce
Related issues/PRs
Suggest a fix
fix the template and remove unnecessary colon
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
The generator produces broken code for
anyOf
openapi-generator version
v5.2.1
OpenAPI declaration file content or url
Generation Details
generate
--global-property models
--global-property modelDocs=false
--additional-properties sourceFolder=dto,useOneOfDiscriminatorLookup=true
--model-package dto
--package-name dto
-i /local/docs/openapi.yaml
--generate-alias-as-model
-g go
-o /local/internal/server/rest
Steps to reproduce
Related issues/PRs
Suggest a fix
fix the template and remove unnecessary colon
The text was updated successfully, but these errors were encountered: