Skip to content

Commit 49683d4

Browse files
authored
feat!: enum of 1 is a literal (#466)
treat enums with a single valid value as closed by default, and use `z.literal`. this is often the case with discriminated unions, and the open by default behavior in clients isn't desirable in this scenario. it's still possible to override this behavior, in situations where you do intend to later add more values to the enum.
1 parent 171fba2 commit 49683d4

56 files changed

Lines changed: 6768 additions & 7678 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

integration-tests/typescript-angular/src/generated/api.github.com.yaml/client.service.ts

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/typescript-angular/src/generated/api.github.com.yaml/models.ts

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/typescript-angular/src/generated/azure-core-data-plane-service.tsp/models.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)