{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-api-connect/json-schema/ibm-api-connect-discovered-api-schema.json",
  "title": "DiscoveredAPI",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-api-connect-discovery-api-openapi.yml#/components/schemas/DiscoveredAPI",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "discovered_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
    },
    "description": {
      "type": "string",
      "maxLength": 65535
    },
    "hidden": {
      "type": "boolean"
    },
    "state": {
      "type": "string",
      "enum": [
        "discovered",
        "copied"
      ]
    },
    "api": {
      "type": "object",
      "additionalProperties": true
    },
    "info": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "title",
        "version"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "api_type": {
      "type": "string",
      "enum": [
        "rest",
        "graphql",
        "asyncapi"
      ]
    },
    "document_specification": {
      "type": "string",
      "enum": [
        "asyncapi2.0",
        "asyncapi2.1",
        "openapi2",
        "openapi3"
      ]
    },
    "base_paths": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "host": {
      "type": "string"
    },
    "schemes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "servers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpenApi3ServerDefinition"
      }
    },
    "paths": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpenApiPathDefinition"
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpenApiTagDefinition"
      }
    },
    "original_format": {
      "type": "string",
      "enum": [
        "json",
        "yaml"
      ]
    },
    "data_source": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "source": {
          "type": "string"
        },
        "collector_type": {
          "type": "string"
        },
        "source_address": {
          "type": "string"
        },
        "source_id": {
          "type": "string"
        },
        "options": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "source": {
      "type": "string"
    },
    "source_type": {
      "type": "string"
    },
    "promotion_events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DiscoveredAPIPromotionEvent"
      }
    },
    "generated_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"
    }
  },
  "$defs": {
    "DiscoveredAPIPromotionEvent": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "copied_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "reference": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "OpenApi3ServerDefinition": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "server_address": {
          "type": "string",
          "format": "uri"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "OpenApiOperationDefinition": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "method"
      ],
      "properties": {
        "method": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "OpenApiPathDefinition": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "path": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "operations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenApiOperationDefinition"
          }
        }
      }
    },
    "OpenApiTagDefinition": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    }
  }
}