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

Escape unions without properties #1587

Conversation

heyBett
Copy link
Contributor

@heyBett heyBett commented Mar 5, 2025

It is possible for unions to have no properties. This change checks whether the current childSchema has "properties" before continuing execution.

#1575

…hange checks whether the current childSchema has "properties" before continuing execution.
Copy link

changeset-bot bot commented Mar 5, 2025

🦋 Changeset detected

Latest commit: 84d21ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@kubb/oas Patch
@kubb/plugin-client Patch
@kubb/plugin-faker Patch
@kubb/plugin-msw Patch
@kubb/plugin-oas Patch
@kubb/plugin-react-query Patch
@kubb/plugin-redoc Patch
@kubb/plugin-solid-query Patch
@kubb/plugin-svelte-query Patch
@kubb/plugin-swr Patch
@kubb/plugin-ts Patch
@kubb/plugin-vue-query Patch
@kubb/plugin-zod Patch
@kubb/cli Patch
@kubb/config-biome Patch
@kubb/config-ts Patch
@kubb/config-tsup Patch
@kubb/core Patch
@kubb/fs Patch
@kubb/parser-ts Patch
@kubb/react Patch
@kubb/types Patch
kubb Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@heyBett heyBett changed the title It is possible for discriminated unions to have no properties. This c… Escape unions without properties Mar 5, 2025
@heyBett
Copy link
Contributor Author

heyBett commented Mar 7, 2025

Hello there, let me know if you need anything else. Should I add this edge use case where unions don't have properties to the test suites?

@stijnvanhulle
Copy link
Collaborator

@all-contributors please add @heyBett for code

Copy link
Contributor

@stijnvanhulle

I've put up a pull request to add @heyBett! 🎉

@stijnvanhulle stijnvanhulle merged commit 0eca47d into kubb-labs:main Mar 17, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Mar 17, 2025
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.

2 participants