{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-api-connect/json-schema/ibm-api-connect-validation-publish-multipart-schema.json",
  "title": "ValidationPublishMultipart",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-api-connect-validation-api-openapi.yml#/components/schemas/ValidationPublishMultipart",
  "type": "object",
  "properties": {
    "product": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProductDefinition"
      }
    },
    "openapi": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpenApi2Definition"
      }
    },
    "config": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ConfigDefinition"
      }
    }
  },
  "oneOf": [
    {
      "required": [
        "product"
      ]
    },
    {
      "required": [
        "openapi"
      ]
    }
  ],
  "$defs": {
    "ConfigDefinition": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "rulesets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConfigRuleset"
          }
        }
      }
    },
    "ConfigRuleset": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "rulesetName": {
          "type": "string",
          "maxLength": 255
        },
        "disabled": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "OpenApi2Definition": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "swagger": {
          "type": "string",
          "enum": [
            "2.0.0"
          ]
        },
        "info": {
          "type": "object",
          "additionalProperties": true,
          "required": [
            "title",
            "version"
          ],
          "properties": {
            "title": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          }
        }
      }
    },
    "ProductDefinition": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "product": {
          "type": "string",
          "enum": [
            "1.0.0"
          ]
        },
        "info": {
          "type": "object",
          "additionalProperties": true,
          "required": [
            "name",
            "version"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}