Open concaf opened 6 years ago
Condition today:
Right now the openapi2jsonschema which is used to generate configs is based off of my branch which has changes added to generate only controllers we care about like deploymentconfig jobspec etc
Now I have created a docker image surajd/openapi2jsonschema:generate-configs-for-kedge
which is based off fedora because later on we will be using this image to install npm tool to convert openshift swagger v1 to openapi schema and doing it in openapi2jsonschema's alpine based image was really troublesome.
Dockerfile is also changed and is available here.
Link to my branch https://github.com/surajssd/openapi2jsonschema/tree/generate-configs-for-kedge
Once OpenShift gives you openapi spec and not old swagger then we can remove the whole part where we are doing conversion from swagger v1 to openapi
Code to do that is in Dockerfile for installing npm and that tool which does the conversion.
And in entrypoint script where we are actually doing the conversion.
Once we solve the above problem we don't need the fedora image we can use the upstream image garethr/openapi2jsonschema
that is automatically built. But if you use the upstream image the problem is that you will lose out on the custom code that I have added to only generate configs we care about as pointed in the first section.
So right now the way to go forward is to generate the configs right now and edit it manually.
Write a kedge json-schema acceptance test framwork. So what this will do is take your jsconschema as one input and another input is the examples in the kedge upstream repo. Since we know all the examples in the kedge repo are correct the jsonschema should validate those configs without error. If jsonschema validation fails then fix it manually. So after you setup this framework, run it on travis so that all changes are checked.
Thank you so much @surajssd, very helpful!
Right now the openapi2jsonschema which is used to generate configs is based off of my branch which has changes added to generate only controllers we care about like deploymentconfig jobspec etc
Link to my branch https://github.com/surajssd/openapi2jsonschema/tree/generate-configs-for-kedge
Dockerfile is also changed and is available here.
Once OpenShift gives you openapi spec and not old swagger then we can remove the whole part where we are doing conversion from swagger v1 to openapi
Code to do that is in Dockerfile for installing npm and that tool which does the conversion.
And in entrypoint script where we are actually doing the conversion.
Once we solve the above problem we don't need the fedora image we can use the upstream image garethr/openapi2jsonschema
that is automatically built. But if you use the upstream image the problem is that you will lose out on the custom code that I have added to only generate configs we care about as pointed in the first section.
Write a kedge json-schema acceptance test framwork. So what this will do is take your jsconschema as one input and another input is the examples in the kedge upstream repo. Since we know all the examples in the kedge repo are correct the jsonschema should validate those configs without error. If jsonschema validation fails then fix it manually. So after you setup this framework, run it on travis so that all changes are checked.
@surajssd @surajnarwade what are currently broken things for us to generate a valid JSON Schema? Would be great to have a consolidated view!