smithy-lang / smithy-kotlin

Smithy code generator for Kotlin (in development)
Apache License 2.0
77 stars 26 forks source link

fix: correctly codegen defaults for enum shapes #944

Closed ianbotsf closed 1 year ago

ianbotsf commented 1 year ago

Issue \

(none)

Description of changes

Enum shapes don't have correct defaults codegenned for them. For example, in a structure's builder class:

public var mode: aws.sdk.kotlin.services.neptunedata.model.GraphSummaryType? = "basic" // <-- compiler error

This change adds handling of defaults so that they're resolved correctly from the enum's members.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication