{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-api-connect/json-schema/ibm-api-connect-draft-list-schema.json",
  "title": "DraftList",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-api-connect-drafts-api-openapi.yml#/components/schemas/DraftList",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "total_results": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    },
    "draft_apis": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DraftAPI"
      }
    },
    "draft_products": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DraftProduct"
      }
    }
  },
  "$defs": {
    "DraftAPI": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "draft_api"
          ]
        },
        "api_version": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "2.0.0"
          ]
        },
        "id": {
          "type": "string",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "maxLength": 255
        },
        "version": {
          "type": "string",
          "maxLength": 255
        },
        "title": {
          "type": "string",
          "maxLength": 1023
        },
        "summary": {
          "type": "string",
          "maxLength": 65535
        },
        "draft_api": {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "swagger": {
              "type": "string"
            },
            "info": {
              "type": "object",
              "additionalProperties": true,
              "required": [
                "title",
                "version"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "x-ibm-name": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "x-ibm-summary": {
                  "type": "string"
                },
                "x-postman-collection-id": {
                  "type": "string"
                },
                "x-postman-workspace-id": {
                  "type": "string"
                }
              }
            }
          }
        },
        "remote_api": {
          "type": "object",
          "properties": {
            "endpoint": {
              "type": "string"
            },
            "auth_header": {
              "type": "string"
            }
          }
        },
        "api_type": {
          "type": "string",
          "enum": [
            "rest",
            "wsdl",
            "graphql",
            "asyncapi"
          ]
        },
        "enforced": {
          "type": "boolean"
        },
        "gateway_type": {
          "type": "string",
          "enum": [
            "datapower-gateway",
            "datapower-api-gateway",
            "event-gateway",
            "datapower-nano-gateway",
            "wm-api-gateway"
          ]
        },
        "oai_version": {
          "type": "string",
          "enum": [
            "openapi2",
            "openapi3"
          ]
        },
        "document_specification": {
          "type": "string",
          "enum": [
            "asyncapi2.0",
            "asyncapi2.1",
            "openapi2",
            "openapi3"
          ]
        },
        "wsdl": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "content_type",
            "content"
          ],
          "properties": {
            "content_type": {
              "type": "string",
              "enum": [
                "application/wsdl",
                "application/wsdl+xml",
                "text/xml",
                "application/zip"
              ]
            },
            "content": {
              "type": "string",
              "format": "binary"
            }
          }
        },
        "org_url": {
          "type": "string",
          "format": "uri"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true,
          "format": "uri"
        }
      }
    },
    "DraftProduct": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "draft_product"
          ]
        },
        "api_version": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "2.0.0"
          ]
        },
        "id": {
          "type": "string",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "maxLength": 255
        },
        "version": {
          "type": "string",
          "maxLength": 255
        },
        "title": {
          "type": "string",
          "maxLength": 1023
        },
        "summary": {
          "type": "string",
          "maxLength": 65535
        },
        "draft_product": {
          "anyOf": [
            {
              "x-bhendi-db-type": "text",
              "$ref": "#/$defs/ProjectProduct"
            },
            {
              "x-bhendi-db-type": "text",
              "type": "object",
              "additionalProperties": true
            }
          ]
        },
        "gateway_types": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "datapower-gateway",
              "datapower-api-gateway",
              "event-gateway",
              "datapower-nano-gateway",
              "wm-api-gateway"
            ]
          }
        },
        "portal_types": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "cms",
              "devportal"
            ]
          }
        },
        "org_url": {
          "type": "string",
          "format": "uri"
        },
        "catalogs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "spaces": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        },
        "product_kind": {
          "$ref": "#/$defs/ProjectProduct"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true,
          "format": "uri"
        }
      }
    },
    "ProjectMetadata": {
      "description": "Defines a message named Metadata",
      "type": "object",
      "required": [
        "name",
        "version"
      ],
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "namespace": {
          "type": "string"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "enum": [
            "REST",
            "SWAGGER",
            "SOAP",
            "GRAPHQL",
            "ODATA"
          ],
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "domain": {
          "enum": [
            "api",
            "ai-platform",
            "mcp"
          ],
          "type": "string"
        },
        "labels": {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "gatewayTypes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "ProjectProduct": {
      "type": "object",
      "required": [
        "kind",
        "apiVersion",
        "metadata",
        "spec"
      ],
      "properties": {
        "apiVersion": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "Product"
          ],
          "type": "string"
        },
        "metadata": {
          "$ref": "#/$defs/ProjectMetadata"
        },
        "spec": {
          "type": "object",
          "properties": {
            "info": {
              "type": "object",
              "properties": {
                "categories": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "contact": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                },
                "license": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                },
                "termsOfService": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                }
              }
            },
            "apis": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "$ref": {
                    "type": "string"
                  }
                }
              }
            },
            "plans": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "$ref": {
                    "type": "string"
                  }
                }
              }
            },
            "extensions": {
              "type": "object",
              "properties": {
                "portal-config": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "type": "string"
                    },
                    "spec": {
                      "type": "object",
                      "properties": {
                        "visibility": {
                          "type": "object",
                          "properties": {
                            "view": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "authenticated",
                                    "public",
                                    "custom"
                                  ]
                                },
                                "orgs": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "enabled": {
                                  "type": "boolean"
                                }
                              }
                            },
                            "subscribe": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "authenticated",
                                    "custom"
                                  ]
                                },
                                "orgs": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "enabled": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "dp-nano-gateway": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "type": "string",
                      "enum": [
                        "api.ibm.com/v1"
                      ]
                    },
                    "spec": {
                      "type": "object",
                      "properties": {
                        "api-set": {
                          "type": "object",
                          "required": [
                            "isEnabled"
                          ],
                          "properties": {
                            "isEnabled": {
                              "type": "boolean",
                              "description": "If true, the APIs of this product will be grouped into API sets."
                            }
                          }
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "encoded": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "env": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "valueFrom": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "configMapKeyRef": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "key": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "secretKeyRef": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "key": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "fieldRef": {
                                        "type": "object",
                                        "properties": {
                                          "fieldPath": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "resourceFieldRef": {
                                        "type": "object",
                                        "properties": {
                                          "resource": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "hostAliases": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ip": {
                                "type": "string"
                              },
                              "hostnames": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "logLevel": {
                          "type": "object",
                          "properties": {
                            "all": {
                              "type": "string",
                              "enum": [
                                "trace",
                                "debug",
                                "info",
                                "warn",
                                "error",
                                "off"
                              ]
                            }
                          }
                        },
                        "quotaService": {
                          "type": "object",
                          "properties": {
                            "cache": {
                              "type": "object",
                              "properties": {
                                "capacity": {
                                  "type": "integer"
                                },
                                "maxAgeMilliseconds": {
                                  "type": "integer"
                                },
                                "maxPercent": {
                                  "type": "integer"
                                },
                                "fallback": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "enabled": {
                                      "type": "boolean"
                                    }
                                  }
                                }
                              }
                            },
                            "responseHeaders": {
                              "type": "string"
                            },
                            "updateInterval": {
                              "type": "integer"
                            }
                          }
                        },
                        "replicas": {
                          "type": "integer"
                        },
                        "resources": {
                          "type": "object",
                          "properties": {
                            "limits": {
                              "type": "object",
                              "properties": {
                                "cpu": {
                                  "type": "string"
                                },
                                "memory": {
                                  "type": "string"
                                }
                              }
                            },
                            "requests": {
                              "type": "object",
                              "properties": {
                                "cpu": {
                                  "type": "string"
                                },
                                "memory": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "sqlInjectionFilters": {
                          "type": "object",
                          "properties": {
                            "commands": {
                              "type": "string"
                            },
                            "escapeSequence": {
                              "type": "string"
                            },
                            "keywordInjection": {
                              "type": "string"
                            },
                            "likeMatch": {
                              "type": "string"
                            },
                            "metacharacters": {
                              "type": "string"
                            },
                            "msSqlCommands": {
                              "type": "string"
                            },
                            "andOrAttack": {
                              "type": "string"
                            },
                            "oracleBufferOverflow": {
                              "type": "string"
                            },
                            "simpleMetacharacters": {
                              "type": "string"
                            },
                            "custom": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "tlsServerCertificateSecretName": {
                          "type": "string",
                          "description": "This is the kubernetes secret name that contains the TLS server certificate that this product will expose. The secret must exist on the kubernetes cluster where DataPower Nano Gateway is deployed."
                        },
                        "autoScaling": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "enabled": {
                              "type": "boolean",
                              "default": false,
                              "description": "Enable this AutoScaleConfig"
                            },
                            "fromZero": {
                              "type": "object",
                              "additionalProperties": false,
                              "required": [
                                "replicas"
                              ],
                              "properties": {
                                "replicas": {
                                  "type": "integer",
                                  "format": "int32",
                                  "minimum": 1
                                }
                              }
                            },
                            "hpa": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "enabled": {
                                  "type": "boolean",
                                  "default": true
                                },
                                "minReplicas": {
                                  "type": "integer",
                                  "format": "int32",
                                  "minimum": 1
                                },
                                "maxReplicas": {
                                  "type": "integer",
                                  "format": "int32",
                                  "minimum": 2
                                },
                                "targetUtilization": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "cpu": {
                                      "type": "integer",
                                      "format": "int32",
                                      "minimum": 1,
                                      "maximum": 100
                                    },
                                    "memory": {
                                      "type": "integer",
                                      "format": "int32",
                                      "minimum": 1,
                                      "maximum": 100
                                    }
                                  }
                                }
                              }
                            },
                            "toZero": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "strategy": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "sinceLastRequest": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "required": [
                                        "seconds"
                                      ],
                                      "properties": {
                                        "seconds": {
                                          "type": "integer",
                                          "format": "int32",
                                          "minimum": 60
                                        }
                                      }
                                    }
                                  },
                                  "required": [
                                    "sinceLastRequest"
                                  ]
                                }
                              },
                              "required": [
                                "strategy"
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}