{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ownkube-io/json-schema/ownkube-io-source-deploy-result-schema.json",
  "title": "SourceDeployResult",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ownkube-io-openapi.json#/components/schemas/SourceDeployResult",
  "type": "object",
  "properties": {
    "created": {
      "type": "boolean",
      "description": "True when this call created a new app; false on a redeploy."
    },
    "deploymentId": {
      "type": "string"
    },
    "revisionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The build's revision id (use it for build logs). Null if the app was created but its build didn't start; upload and deploy again."
    },
    "clusterId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Always null: uploaded source runs on Ownkube Compute, which is placed by region (see `defaults.region`). Kept for older CLI versions."
    },
    "environmentId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The new app's environment id. Null on a redeploy."
    },
    "publicHostname": {
      "type": [
        "string",
        "null"
      ],
      "description": "The new app's public address, once assigned. Null on a redeploy or for a private app."
    },
    "defaults": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "region": {
          "type": "string",
          "description": "Region id (as in GET /v1/regions)."
        },
        "regionLabel": {
          "type": "string",
          "description": "Human-readable region name."
        },
        "port": {
          "type": "integer"
        },
        "portSource": {
          "type": "string",
          "enum": [
            "explicit",
            "dockerfile",
            "language",
            "fallback"
          ],
          "description": "Where the port came from: the request, the Dockerfile's EXPOSE, the detected framework's default, or the 8080 fallback."
        },
        "resourceType": {
          "type": "string",
          "enum": [
            "web",
            "worker"
          ]
        },
        "public": {
          "type": "boolean"
        },
        "projectId": {
          "type": "string"
        },
        "environmentId": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "region",
        "regionLabel",
        "port",
        "portSource",
        "resourceType",
        "public",
        "projectId",
        "environmentId"
      ],
      "description": "What was chosen for the new app, including resolved defaults. Null on a redeploy."
    }
  },
  "required": [
    "created",
    "deploymentId",
    "revisionId",
    "clusterId",
    "environmentId",
    "publicHostname",
    "defaults"
  ]
}