{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/felt/json-schema/felt-add-source-layer-params-schema.json",
  "title": "AddSourceLayerParams",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/felt-layer-uploads-api-openapi.yml#/components/schemas/AddSourceLayerParams",
  "oneOf": [
    {
      "properties": {
        "dataset_id": {
          "$ref": "#/$defs/FeltID"
        },
        "from": {
          "enum": [
            "dataset"
          ],
          "type": "string"
        }
      },
      "required": [
        "from",
        "dataset_id"
      ],
      "title": "AddSourceLayer-Dataset-Params",
      "type": "object"
    },
    {
      "properties": {
        "from": {
          "enum": [
            "sql"
          ],
          "type": "string"
        },
        "query": {
          "type": "string"
        },
        "source_id": {
          "$ref": "#/$defs/FeltID"
        }
      },
      "required": [
        "from",
        "source_id",
        "query"
      ],
      "title": "AddSourceLayer-SQL-Params",
      "type": "object"
    },
    {
      "properties": {
        "from": {
          "enum": [
            "stac"
          ],
          "type": "string"
        },
        "source_id": {
          "$ref": "#/$defs/FeltID"
        },
        "stac_asset_url": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "source_id",
        "stac_asset_url"
      ],
      "title": "AddSourceLayer-STAC-Params",
      "type": "object"
    }
  ],
  "type": "object",
  "$defs": {
    "FeltID": {
      "format": "felt_id",
      "title": "FeltID",
      "type": "string"
    }
  }
}