Skip to content
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

Do not omit unreferenced non version enum when omit-unreachable-types is not set to true #839

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented May 15, 2024

fix #838

The isVersionEnum function was just completely wrong and just returned true for any enum when used in a versioned spec.

@timotheeguerin timotheeguerin changed the base branch from main to release/may-2024 May 15, 2024 15:38
@timotheeguerin timotheeguerin enabled auto-merge (squash) May 15, 2024 15:40
@azure-sdk
Copy link
Collaborator

All changed packages have been documented.

  • @azure-tools/typespec-autorest
Show changes

@azure-tools/typespec-autorest - fix ✏️

Do not omit unreferenced non version enum when omit-unreachable-types is not set to true

@azure-sdk
Copy link
Collaborator

Copy link
Member

@MaryGao MaryGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, the test case looks good to me!

@timotheeguerin timotheeguerin merged commit 8d25298 into Azure:release/may-2024 May 15, 2024
21 checks passed
@timotheeguerin timotheeguerin deleted the fix/omitted-non-version-enums branch May 15, 2024 16:00
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.

Autorest emitter wrongfully qualifies other enums as the versioning enum
3 participants