fabric8io / kubernetes-model

JSON schema generator for OpenShift Origin API objects
36 stars 72 forks source link

Upgraded model for Openshift 3.9.0 #308

Closed piyush-garg closed 6 years ago

piyush-garg commented 6 years ago

Upgraded model for Openshift 3.9.0 and Kubernetes 1.9.0 #297 Upgraded sundrio version to 0.7.1 #280

piyush-garg commented 6 years ago

ok to test

piyush-garg commented 6 years ago

Seems like there is a fix provided for https://github.com/piyush1594/kubernetes-model/blob/f9da5ae27e42ea8b2f5a4e0df9c6b0ecb941565c/kubernetes-model/src/main/resources/schema/kube-schema.json#L5142 in sundrio by @iocanel here https://github.com/sundrio/sundrio/commit/4f698970ac2b0695571fd80a497ad9d0d3d402cb

We need the similar fix for https://github.com/piyush1594/kubernetes-model/blob/f9da5ae27e42ea8b2f5a4e0df9c6b0ecb941565c/kubernetes-model/src/main/resources/schema/kube-schema.json#L329 and also https://github.com/piyush1594/kubernetes-model/blob/f9da5ae27e42ea8b2f5a4e0df9c6b0ecb941565c/kubernetes-model/src/main/resources/schema/kube-schema.json#L303

This is my first observation, may be I am wrong @oscerd @iocanel @hrishin

piyush-garg commented 6 years ago

Here is the PR https://github.com/fabric8io/kubernetes-model/pull/107 raised after that fix in sundrio on model. @iocanel

piyush-garg commented 6 years ago

Issue on sundrio https://github.com/sundrio/sundrio/issues/100

piyush-garg commented 6 years ago

ok to test

piyush-garg commented 6 years ago

If we want to get rid of default and enum There can be three solutions:-

  1. Change the variable names, that does not look good to me.
  2. Remove JSONSchemaProps class. Chain is JSONSchemaProps->CustomResourceValidation->CustomResourceDefinitionSpec->CustomResourceDefinition->CustomResourceDefinitionList Then we need to get rid of all this. Seems like not a good approach.
  3. We can get rid of two properties of JSONSchemaProps -> default and enum.

Inputs required. @iocanel @oscerd @hrishin @rohanKanojia

piyush-garg commented 6 years ago

I am going to drop these two fields default and enum from jsonSchemaProp. is this look good to you?

piyush-garg commented 6 years ago

Upgraded to sundrio version 0.7.1 everything worked fine

oscerd commented 6 years ago

ok to test

sthaha commented 6 years ago

BTW: I used - git show --stat --stat-width=580 | grep -v '^ vendor/' | awk '{ print $1 }' to generate the list of list to review.

iocanel commented 6 years ago

FWIW, sundrio 0.8.1 is released, that is expected to work fine.