{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgDiDataIntegrationInApplicationVM",
  "components": {
    "schemas": {
      "PkgDiDataIntegrationInApplicationVM": {
        "required": [
          "applicationKey",
          "dataSourceDefinitionKey",
          "mappings",
          "versionKey"
        ],
        "type": "object",
        "properties": {
          "applicationKey": {
            "minLength": 1,
            "type": "string"
          },
          "dataSourceDefinitionKey": {
            "minLength": 1,
            "type": "string"
          },
          "mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingVM"
            }
          },
          "versionKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "MappingVM": {
        "required": [
          "mapping",
          "objectTypeKey",
          "queryKey"
        ],
        "type": "object",
        "properties": {
          "mapping": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldMappingVM"
            }
          },
          "objectTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "queryKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "FieldMappingVM": {
        "required": [
          "attributeTypeKey",
          "fieldKey"
        ],
        "type": "object",
        "properties": {
          "attributeTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "fieldKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}