Chore: Update oapi-codegen library (#62962)

* Update oapi library and thema

* Use fork commit to fix elasticsearch and cloudwatch generators

* Update thema

* Fixes

* Update thema with last fixes

* Sync

* Fix test

* Update thema and schemas

* Update thema
This commit is contained in:
Selene
2023-02-21 12:34:24 +01:00
committed by GitHub
parent 5ca8ea40c1
commit 7ace44c8b5
22 changed files with 971 additions and 929 deletions
+15 -7
View File
@@ -183,13 +183,21 @@ func (cd *CoremodelDeclaration) GenerateGoCoremodel(path string) (WriteDiffer, e
return nil, fmt.Errorf("error executing imports template: %w", err)
}
gostr, err := codegen.Generate(oT, lin.Name(), codegen.Options{
GenerateTypes: true,
SkipPrune: true,
SkipFmt: true,
UserTemplates: map[string]string{
"imports.tmpl": importbuf.String(),
"typedef.tmpl": tmplTypedef,
gostr, err := codegen.Generate(oT, codegen.Configuration{
PackageName: lin.Name(),
Generate: codegen.GenerateOptions{
Models: true,
},
Compatibility: codegen.CompatibilityOptions{
AlwaysPrefixEnumValues: true,
},
OutputOptions: codegen.OutputOptions{
SkipFmt: true,
SkipPrune: true,
UserTemplates: map[string]string{
"imports.tmpl": importbuf.String(),
"typedef.tmpl": tmplTypedef,
},
},
})
if err != nil {