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

[codegen] Add Ability to Use an Existing Go or TypeScript Type for Fields in Spec/Status #375

Open
IfSentient opened this issue Aug 27, 2024 · 1 comment
Labels
area/codegen type/feature New feature or request

Comments

@IfSentient
Copy link
Collaborator

It would be nice to have a way to tell the codegen to use an existing go type (such as a kubernetes type) for a field in the spec or status when generating code. The CUE source would still need to define the type properly for OpenAPI generation, but could reference an existing type to use for the generated go or TypeScript, perhaps with something like @app-sdk(gotype="repo/pkg.Type").

@IfSentient IfSentient added type/feature New feature or request area/codegen labels Aug 27, 2024
@bcotton
Copy link
Contributor

bcotton commented Sep 30, 2024

Related to this, it would be good to have codegen generate a set of common types, perhaps from a common.cue that could be referenced from all other Kinds, but would be generated into it's own separate package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen type/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants