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

Add option to remove 'version' enum from emitted types for typespec-autorest #285

Closed
markcowl opened this issue Feb 20, 2024 · 0 comments · Fixed by #774
Closed

Add option to remove 'version' enum from emitted types for typespec-autorest #285

markcowl opened this issue Feb 20, 2024 · 0 comments · Fixed by #774
Assignees
Labels
design:needed A design request has been raised that needs a proposal
Milestone

Comments

@markcowl
Copy link
Member

markcowl commented Feb 20, 2024

This is chiefly a substantive issue for ARM specs, but is also annoying to deal with for data-plane specs, where a breaking change is flagged.

  • Many specs run into this issue: when they add a new version, the version appears in all versions of the 'version' enum
  • The simplest way to fix would be to omit the version enum from versioned specs
  • The behavior change might need to be behind a config flag so we can opt out of the behavior
  • Note that 'omit-unreachable-types' will omit this enum, but it has other impacts on the emitted spec that are not always desirable
@markcowl markcowl added the design:needed A design request has been raised that needs a proposal label Feb 20, 2024
@markcowl markcowl added this to the Backlog milestone Feb 22, 2024
@markcowl markcowl modified the milestones: Backlog, [2024] April Mar 11, 2024
@markcowl markcowl modified the milestones: [2024] April, [2024] May Apr 6, 2024
github-merge-queue bot pushed a commit that referenced this issue May 6, 2024
fix #285

Currently the default is to omit it by default (Because I think this is
what we want for azure) but this is a breaking change so if we want this
opt-int we can change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design:needed A design request has been raised that needs a proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants