fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift

Home Page:http://fabric8.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Align crd generator v1 and v2 output

shawkins opened this issue · comments

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.

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!

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