Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
{
  "definitions": {},
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Root",
  "type": "object",
  "required": [
    "requestId",
    "subRequestId",
    "originatorId"
  ],
  "properties": {
    "requestId": {
      "$id": "#root/requestId",
      "title": "Requestid",
      "type": "string",
      "default": "",
      "examples": [
        "123456-1000"
      ],
      "pattern": "^.*$"
    },
    "subRequestId": {
      "$id": "#root/subRequestId",
      "title": "Subrequestid",
      "type": "string",
      "default": "",
      "examples": [
        "sub-123456-1000"
      ],
      "pattern": "^.*$"
    },
    "originatorId": {
      "$id": "#root/originatorId",
      "title": "Originatorid",
      "type": "string",
      "default": "",
      "examples": [
        "sdnc"
      ],
      "pattern": "^.*$"
    }
  }
}

Note: If a field is optional, then do not mention it in the required fields list.

5) In the logic file

  • The extra complexity of using "_DoT_" instead of ".", "_DasH_" instead of "-" and "_ColoN_" instead of ":" will be removed and the field names can be directly used.
  • createNewInstance and createNewSubInstance methods will probably not be needed with JsonSchema support. HashMap, ArrayList etc can directly be created and used as these could be mapped straightaway using the JsonSchema validator.

...