0
{
  "submitOrderRequest": {
    "requestHeader": {
      "companyCode": "MSD Code",
      "accountNumber": "989898989",
      "billingLanguage": "EN",
      "operation": "NewActivation"
    },
    "requestBody": {
      "device": [
        {
          "lineID": "4",
          "parentLineID": "0",
          "sku": "IP1264WHT",
          "quantity": "1",
          "WirelessOptions": [
            {
              "optionsSocMSF": "169.00",
              "optionsSocType": "REGULAR",
              "optionsSocOneTimeFee": "NO"
            }
          ]
        }
      ]
    }
  }
}

I am trying to make " "lineID","parentLineID","sku","quantity"" Mandatory based on "operation" property value . The operation has enum defined for it ["enum":"NewActivation","Hardware","Software"] .

7
  • What's the problem you're facing? Commented May 18, 2022 at 19:26
  • How to make "lineID","parentLineID","sku","quantity"" Mandatory based on "operation" property value . The operation has enum defined for it ["enum":"NewActivation","Hardware","Software"] . Commented May 18, 2022 at 19:40
  • Yes, it was alredy said in the question. But it's not clear. What do you want to achieve? What have you tried? And what it means for you to make those fields mendatory? Commented May 18, 2022 at 19:52
  • Here is pseudo code : If (operation=="NewActiavtion" || operation=="Hardware" ) then "lineID","parentLineID","sku","quantity"" are mandatory else "lineID","parentLineID","sku","quantity"" optional how to achieve this in JSON Schema Commented May 18, 2022 at 19:59
  • Great! What problems have you faced trying to implement this behaviour? Commented May 18, 2022 at 20:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.