jeudi 9 juillet 2020

How do I validate the existence of promised object keys using JSON Schema?

I have an object that follows the general form of:

{
    "ids": [5, 7, 12],
    "5": { },
    "7": { },
    "12": { },
    "23": { }
}

Is it possible to generate a JSON Schema that validates wheter all keys in ids property exist in this object and preferably ids that are not listed do not exists (ie. 23)?

Aucun commentaire:

Enregistrer un commentaire