Lets say I have picture schema, which I will need to reuse it in different requests. How can I save this scheme in an environment and then fetch it from environment and reuse it?
My picture scheme:
var schemaPicture = {
“type”: “object”,
“required” : [“small”, “medium”, “large”],
“properties”: {
“small”: { “type”: “string” },
“medium”: { “type”: “string” },
“large”: { “type”: “string” }
},
“additionalProperties”: false
};
In this schema I will need to add the picture scheme:
const commentSchema = {
“type”: “object”,
“required”: [“success”],
“properties”: {
“success”: { “type”: “boolean” },
“count”: { “type”: “integer” },
“data”: {
“type”: “object”,
“required”: [“id”, “value”, “created”],
“properties”: {
“type”: “object”,
“id”: { “type”: “integer” },
“value”: { “type”: “string” },
“created”: {
“type”: “object”,
“required” : [“time”, “user”],
“properties”: {
“time”: { “type”: “string” },
“user”: {
“type”: “object”,
“required” : [“name”, “username”],
“properties”: {
“id”: { “type”: “integer” },
“name”: { “type”: “string” },
“surname”: { “type”: “string” },
“username”: { “type”: “string” },
“picture”: schemaPicture !!!<<<< I need to put the schema here
},
}
},
}
},
},
}
};