I would like to extend standard JSON schema by adding specific properties for data mapping.
One would be "sources" to define sources of data to map from, defined at the schema top level. Another one would be "expression" supposed to contain the mapping expression for a particular property or item.
Unfortunately JSON-schema documentation is very unspecific on how to do this (http://json-schema.org/latest/json-schema-core.html#anchor24).
How to define a schema including the extensions? Should it be the existing json-schema enhanced by the new properties, or is there some "best pratice" how to merge in the new properties?
An example how I think the resulting JSON schema (not its metadefinition) could look like (the "sources" and "expression" below are the new properties):
{ "$schema" : "(my custom URI)",
"description" : "Sample mapping",
"type" : "object" ,
"sources" : {
"data" : "app.appl.SERVICE.SERVICE_BODY.REQUEST",
"config" : "app.config"
},
"properties" : {
"appl_id" : {
"type" : "string",
"expression" : "data.APP_NO"
},
"invoker" : {"type": "string", "expression" : "config.invoker" }
}
}