It might be that the answer is so obvious, it's not even worth mentioning anywhere, but I couldn't find any explicit information about this. Can a definition of a schema (defined inside "definitions" in the JSON schema) refer to another definition?
I did not run my code yet because I am still writing the schema and I don't want to mess it up. Here is an example of what I'm trying to do:
"definitions": {
"apple": {
"description": "a type of fruit",
"edible": "boolean"
},
"fruit": {
"description": "a type of food",
"edible": "boolean",
"items": {
"$ref": "#definitions/apple"
}
}
}