-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat(scaffolder): add first class citizen support for zod #26957
base: master
Are you sure you want to change the base?
Conversation
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.## Changed Packages
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Not stale |
@benjdlambert @Rugvip PTAL? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey 👋 sorry it's taken a while to get round to this, have a million and other things to do as well. Some higher level comments that I think we want to address before moving this forwards.
The changes to support zod
by default with the (z) => z.string()
syntax for input and output schemas also aligns us pretty nicely with the new frontend system https://backstage.io/docs/frontend-system/architecture/extensions#extension-configuration and something that we're looking to rollout further around the project too.
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Not stale, been busy for KubeCon. |
e63eccb
to
9cf644a
Compare
@schultzp2020 just to recap, we were chatting how we can get a Can we not just do something like: const zod = z.object(
Object.fromEntries(
Object.entries(input).map(
([k, v]) => [k, v(z)]
)
)
) Obviously for both input and output schemas, but that should allow us to use |
Thank you for the idea! I haven't thought of that, let me try it. |
50f1555
to
c97eb90
Compare
c8ea22f
to
e3e59a1
Compare
@benjdlambert After further investigation, I believe overloading |
e3e59a1
to
63d1e73
Compare
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Not stale |
Signed-off-by: Paul Schultz <pschultz@pobox.com> backport better typescript support Signed-off-by: Paul Schultz <pschultz@pobox.com> wip Signed-off-by: Paul Schultz <pschultz@pobox.com> wip Signed-off-by: Paul Schultz <pschultz@pobox.com> complete refactor Signed-off-by: Paul Schultz <pschultz@pobox.com>
63d1e73
to
58f6cfd
Compare
Updated the type names as suggested in the Scaffolder SIG. |
Signed-off-by: Paul Schultz <pschultz@pobox.com>
d5395f7
to
083246c
Compare
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Hey, I just made a Pull Request!
#26933
✔️ Checklist
Signed-off-by
line in the message. (more info)