How do you reference other property values in JSON schema?

前端 未结 3 1280
感情败类
感情败类 2021-01-05 07:07

I have a JSON schema with 2 properties, minimumTolerance and maximumTolerance. I need to make sure that the value of maximumTolerance is not smaller than minimumTolerance &a

3条回答
  •  被撕碎了的回忆
    2021-01-05 07:47

    Yes, but it may not be the dynamic answer you are looking for...put in the values of min and max for the range expected:

                "MinimumTolerance": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 6000,
                },
                "MaximumTolerance": {
                    "type": "number",
                    "minimum": 6001,
                },
    

提交回复
热议问题