Skip to content

Fix #4082: Remove name() method generation for unnamed Smithy enums #4083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

drganjoo
Copy link
Contributor

@drganjoo drganjoo commented Apr 3, 2025

This PR addresses issue #4082 by removing the generation of the name() method for unnamed Smithy enums in Python code output.

Changes

  • Modified the enum code generator to check if an enum is unnamed (string enum)
  • Skip generating the name() method for unnamed enums, as they don't have separate name identifiers
  • Retained the name() method generation for properly named enums

Testing

Verified that code generation for unnamed enums no longer includes the problematic name() method that was previously trying to reference undefined null values.

Closes: $4082

Copy link

github-actions bot commented Apr 3, 2025

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@drganjoo drganjoo marked this pull request as ready for review April 7, 2025 10:48
@drganjoo drganjoo requested a review from a team as a code owner April 7, 2025 10:48
@drganjoo drganjoo enabled auto-merge April 7, 2025 10:48
@drganjoo drganjoo disabled auto-merge April 7, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant