I am trying to find a json schema which should act as a "envelope" for all other schemas in the system. It should contain some basic properties and then the actual other schema. It should be possible to validate the outer schema as well as the actual schema inside the "envelope" separately. The idea is that in a system all schema should be wrapped in the schema.
For a better visualisation here is an example json:
{
"timestamp": "452366",
"version": "2424",
"actualData":{
"schemaId": "http://someDomain.com/schemas/bodyschema123",
"dynamicData1":"foobar",
"dynamicData2":"barfoo",
// and so on
}
}
How should my schema look like especially when I also want to have the option to only validate the header and/or the body but also have one validation for both.