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

Align crd generator v1 and v2 output #5951

Open
shawkins opened this issue Apr 24, 2024 · 2 comments
Open

Align crd generator v1 and v2 output #5951

shawkins opened this issue Apr 24, 2024 · 2 comments
Labels
component/crd-generator Related to the CRD generator
Milestone

Comments

@shawkins
Copy link
Contributor

shawkins commented Apr 24, 2024

The v1 output should sort the required list.

Also the v1 handling for JsonFormat shape needs to leave the type as string in most cases.

v2 will use set the printer column type to be the actual property type. v1 will continue to use string in some cases.

@shawkins shawkins added the component/crd-generator Related to the CRD generator label Apr 24, 2024
@matteriben
Copy link
Contributor

Also the v1 handling for JsonFormat shape needs to leave the type as string in most cases.

I think these lines in v1 need to be removed to align handling for JsonFormat shape with v2:

JSON_FORMAT_SHAPE_MAPPING.put(JsonFormat.Shape.BOOLEAN, Types.typeDefFrom(Boolean.class).toReference());
JSON_FORMAT_SHAPE_MAPPING.put(JsonFormat.Shape.NUMBER, Types.typeDefFrom(Double.class).toReference());
JSON_FORMAT_SHAPE_MAPPING.put(JsonFormat.Shape.NUMBER_FLOAT, Types.typeDefFrom(Double.class).toReference());
JSON_FORMAT_SHAPE_MAPPING.put(JsonFormat.Shape.NUMBER_INT, Types.typeDefFrom(Long.class).toReference());

Thank you!

@shawkins shawkins added this to the 6.13.0 milestone Apr 25, 2024
@shawkins
Copy link
Contributor Author

@manusa let's have this block 6.13 so that we have the best baseline as possible to stop development on v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/crd-generator Related to the CRD generator
Projects
None yet
Development

No branches or pull requests

2 participants