{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wso2/main/json-schema/wso2-service-schema.json",
  "title": "The Service Object",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wso2-services-api-openapi.yml#/components/schemas/Service",
  "type": "object",
  "required": [
    "name",
    "version",
    "definitionType",
    "serviceUrl"
  ],
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "pattern": "^[^\\*]+$",
      "maxLength": 255,
      "minLength": 1
    },
    "description": {
      "type": "string",
      "maxLength": 1024
    },
    "version": {
      "type": "string",
      "maxLength": 30,
      "minLength": 1
    },
    "serviceKey": {
      "type": "string",
      "maxLength": 512
    },
    "serviceUrl": {
      "type": "string"
    },
    "definitionType": {
      "type": "string",
      "description": "The type of the provided API definition",
      "enum": [
        "OAS2",
        "OAS3",
        "WSDL1",
        "WSDL2",
        "GRAPHQL_SDL",
        "ASYNC_API"
      ]
    },
    "securityType": {
      "type": "string",
      "description": "The security type of the endpoint",
      "enum": [
        "BASIC",
        "DIGEST",
        "OAUTH2",
        "X509",
        "API_KEY",
        "NONE"
      ],
      "default": "NONE"
    },
    "mutualSSLEnabled": {
      "type": "boolean",
      "description": "Whether Mutual SSL is enabled for the endpoint",
      "default": false
    },
    "usage": {
      "type": "integer",
      "description": "Number of usages of the service in APIs",
      "readOnly": true
    },
    "createdTime": {
      "type": "string",
      "readOnly": true
    },
    "lastUpdatedTime": {
      "type": "string",
      "readOnly": true
    },
    "md5": {
      "type": "string"
    },
    "definitionUrl": {
      "type": "string"
    }
  }
}