Skip to content

Commit

Permalink
generator-go-sdk: ensure allowOmittingDiscriminatedValue is set corre…
Browse files Browse the repository at this point in the history
…ctly for common types
  • Loading branch information
manicminer committed Sep 23, 2024
1 parent d36a0d8 commit 046e87c
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions tools/generator-go-sdk/internal/generator/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,22 +168,23 @@ func (i VersionGeneratorInput) generatorData(settings Settings) VersionGenerator

return VersionGeneratorData{
GeneratorData: GeneratorData{
apiVersion: i.VersionName,
canonicalApiVersion: settings.CanonicalApiVersion(i.VersionName),
baseClientPackage: baseClientPackageForSdk(i.Type),
commonTypes: i.CommonTypes,
constants: i.CommonTypes.Constants,
generateDescriptionsForModels: settings.GenerateDescriptionsForModels,
isDataPlane: models.SourceDataTypeIsDataPlane(i.Type),
models: i.CommonTypes.Models,
packageName: versionPackageName,
recurseParentModels: settings.RecurseParentModels,
servicePackageName: strings.ToLower(i.ServiceName),
source: i.Source,
sourceType: i.Type,
useNewBaseLayer: useNewBaseLayer,
versionDirectoryName: versionDirectoryName,
versionPackageName: versionPackageName,
apiVersion: i.VersionName,
canonicalApiVersion: settings.CanonicalApiVersion(i.VersionName),
baseClientPackage: baseClientPackageForSdk(i.Type),
commonTypes: i.CommonTypes,
constants: i.CommonTypes.Constants,
allowOmittingDiscriminatedValue: settings.AllowOmittingDiscriminatedValue,
generateDescriptionsForModels: settings.GenerateDescriptionsForModels,
isDataPlane: models.SourceDataTypeIsDataPlane(i.Type),
models: i.CommonTypes.Models,
packageName: versionPackageName,
recurseParentModels: settings.RecurseParentModels,
servicePackageName: strings.ToLower(i.ServiceName),
source: i.Source,
sourceType: i.Type,
useNewBaseLayer: useNewBaseLayer,
versionDirectoryName: versionDirectoryName,
versionPackageName: versionPackageName,
},
commonTypesOutputPath: commonTypesOutputPath,
resources: i.Resources,
Expand Down

0 comments on commit 046e87c

Please sign in to comment.