{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/viridi-parente/main/json-schema/viridi-parente-complex-version-create-request-schema.json",
  "title": "ComplexVersionCreateRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/viridi-parente-entities-version-control-controller-api-openapi.yml#/components/schemas/ComplexVersionCreateRequest",
  "allOf": [
    {
      "$ref": "#/$defs/VersionCreateRequest"
    },
    {
      "type": "object",
      "properties": {
        "syncStrategy": {
          "type": "string",
          "enum": [
            "MERGE",
            "OVERWRITE"
          ]
        },
        "entityTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/EntityTypeVersionCreateConfig"
          }
        }
      }
    }
  ],
  "$defs": {
    "EntityTypeVersionCreateConfig": {
      "properties": {
        "saveRelations": {
          "type": "boolean"
        },
        "saveAttributes": {
          "type": "boolean"
        },
        "saveCredentials": {
          "type": "boolean"
        },
        "syncStrategy": {
          "type": "string",
          "enum": [
            "MERGE",
            "OVERWRITE"
          ]
        },
        "entityIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        "allEntities": {
          "type": "boolean"
        }
      }
    },
    "VersionCreateRequest": {
      "properties": {
        "versionName": {
          "type": "string"
        },
        "branch": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "SINGLE_ENTITY",
            "COMPLEX"
          ]
        }
      }
    }
  }
}