Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

[schema] change in JSON schema structure for validation purpose #229

Closed
hrishin opened this issue Sep 21, 2017 · 10 comments
Closed

[schema] change in JSON schema structure for validation purpose #229

hrishin opened this issue Sep 21, 2017 · 10 comments
Assignees
Milestone

Comments

@hrishin
Copy link
Member

hrishin commented Sep 21, 2017

Is it possible to update the JSON schema structure without having any side effects.
To use kube-schema.json in F8-M-P for validation purpose (fabric8io/fabric8-maven-plugin#66), it requires following changes.

{
  id:
  $schema:
  definitions:
  .....
  resources: {
    kubernetes: {}
    openshift: {}
  }
} 

Here resources key will hold the properties respective resource like deployment for Kubernetes and deploymentconfig for OpenShift.

fabric8io/fabric8-maven-plugin#1051 (comment)

@hrishin hrishin self-assigned this Sep 21, 2017
@hrishin
Copy link
Member Author

hrishin commented Sep 21, 2017

After change the schema would look exactly like this.
https://gist.githubusercontent.com/hrishin/eb0a136a3516ecfd301ee3fea28b6456/raw/9179e241f383e26be537632e2876693d50c3087c/kube-schema.json

Please let me know, if its possible to accommodate this change?
@jimmidyson @jstrachan @rawlingsj @iocanel

@rawlingsj
Copy link
Contributor

Is there any impact on kubernetes-client with this change?

@hrishin
Copy link
Member Author

hrishin commented Sep 25, 2017

@rawlingsj I have verified kubernetes-client, f8-m-p and both are getting build with this change.

@hrishin hrishin added this to the Sprint 138 milestone Sep 26, 2017
@jstrachan
Copy link
Contributor

lets try it and see what breaks?

if things go bad we could always create a modified version of the schema just for fmp to do verification - but hopefully things won't come to that

@hrishin
Copy link
Member Author

hrishin commented Sep 27, 2017

finger crossed

@jimmidyson
Copy link
Contributor

Is resources valid for a JSON schema document type? Is this going to break any other tooling that relies on a valid JSON schema document?

@hrishin
Copy link
Member Author

hrishin commented Oct 5, 2017

hey @jimmidyson that's good point. Its valid to have additional property like resources in our case as long as additionalProperties is set to true at least at root level which is there in current state. In that way if other tools honoring this property then it should not break anything.
reference

@hrishin
Copy link
Member Author

hrishin commented Oct 6, 2017

hi @jimmidyson any thought about it?

@hrishin hrishin modified the milestones: Sprint 138, Sprint 139 Oct 12, 2017
@hrishin
Copy link
Member Author

hrishin commented Oct 23, 2017

@jimmidyson better way lets create separate json-scehma file for validation purpose only. So existing file could stay intact.
@jstrachan WDYT?

@jstrachan
Copy link
Contributor

sounds good to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants