[enhancement]: Relocate json schemas somewhere more sensible
Enhancement
All of our jsonschemas are hidden down under cloudinit/config/schemas/, which doesn't make sense:
a) these files contain data not Python code
b) some of these files are not specific to configuration modules
c) the __init__.py was never required
These file should exist in a directory under the top directory, probably named something like schema (alternatively jsonschema or maybe something more generic like data).
Expected changes:
- code in cloudinit/, specifically schema.py
- test/unittest/
setup.py- possibly distro packaging too (presumably avoidable with setup.py finesse)
Hi @holmanb , can this task be assigned to me?
Hello, @antwigambrah, thanks for improving cloud-init. We do not typically assign issues to people, but please, feel free to put together a PR. If you have any questions regarding the implementation, please ask them here or in the IRC channel on libera #cloud-init.
Contributing guidelines: https://docs.cloud-init.io/en/latest/development/index.html
Hello, @antwigambrah, thanks for improving cloud-init. We do not typically assign issues to people, but please, feel free to put together a PR. If you have any questions regarding the implementation, please ask them here or in the IRC channel on libera #cloud-init.
Contributing guidelines: https://docs.cloud-init.io/en/latest/development/index.html
Just seeing this . Thanks @holmanb @aciba90 Added the pr
It would be better to deploy these files somewhere under cloud-init.io domain, instead of directly going to github...
https://raw.githubusercontent.com/canonical/cloud-init/main/cloudinit/config/schemas/schema-cloud-config-v1.json
It would be better to deploy these files somewhere under cloud-init.io domain, instead of directly going to github...
Why?
https://raw.githubusercontent.com/canonical/cloud-init/main/cloudinit/config/schemas/schema-cloud-config-v1.json
@afbjorklund We publish them already to the jsonschema store, if you want a non-github location to pull from.
The current location works OK with the tools, just thinking that normally you would download files from a web server?
The https://www.schemastore.org/json/ seems to be linking to the same address, but I just embedded a copy for now.
EDIT: apparently there was also a request for specific versions and not just main, so will change that as well.
I am using go (not python), and this tool for validation: https://github.com/santhosh-tekuri/jsonschema