Problem
We have a few independent projects (micro-services) that at some point in their life will refer to some JSON schema files, needles to say that each project has its own programming stack (mostly Nodejs and Golang though).
What are the best practices for sharing such data among different projects while keeping versioning.
Bellow I describe my own solution, however I would like to get your feedback as well.
my solution
- I have set up a github project and put json schema files there
- For each change to schemas I update the repo and tag it with a new version
- I use jsdelivr to access it like this: https://cdn.jsdelivr.net/gh/[GITHUB-ID]/[GITHUB-PROJECT]@[TAG]/schema.js
- When I want to clone the code of a random microservice which requires schema file(s), as part of build process I download the schema file from jsdelivr and save it to my local repo, However the downloaded schema file(s) are git ignored.
What do you think about it, Is there a better and smoother way to handle this case?