Commit 49683d4
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
- integration-tests
- typescript-angular/src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- stripe.yaml
- typescript-axios/src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- stripe.yaml
- typescript-express/src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- stripe.yaml
- typescript-fetch/src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- stripe.yaml
- typescript-koa/src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- stripe.yaml
- packages
- documentation/src/app/guides/concepts/enums
- openapi-code-generator/src
- core
- normalization
- typescript/common/schema-builders
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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