A
A
alvoro2014-10-22 18:48:56
JavaScript
alvoro, 2014-10-22 18:48:56

json schema. How to make a reference to another property?

Hello. I read a little about json schema d4 and a question arose. Is it possible using only (json schema) to validate an object with keys a and b (both numeric) and the condition that b is greater than a? Something like

{
  a: {
    type: 'number',
    maximum: 'value of b'
  },
  b: {
    type: 'number'
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-10-22
Protko @Fesor

What does this have to do with the schema? This is data validation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question