{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgDfaPipelineVM",
  "components": {
    "schemas": {
      "PkgDfaPipelineVM": {
        "required": [
          "key",
          "name",
          "type"
        ],
        "type": "object",
        "properties": {
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgDfaActivityVM"
            },
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "type": {
            "minLength": 1,
            "enum": [
              "dawiso_internal",
              "customer_specific"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PkgDfaActivityVM": {
        "required": [
          "key",
          "name",
          "statement",
          "type"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "executionOrderNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isReturningData": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "parameters": {
            "type": "string",
            "nullable": true
          },
          "runInTransaction": {
            "type": "boolean",
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "statement": {
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "minLength": 1,
            "enum": [
              "sql_query",
              "sql_procedure",
              "sql_script"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}