{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/romm/json-schema/romm-device-create-payload-schema.json",
  "title": "DeviceCreatePayload",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/romm-devices-api-openapi.yml#/components/schemas/DeviceCreatePayload",
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "platform": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    },
    "client": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Client"
    },
    "client_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Version"
    },
    "ip_address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ip Address"
    },
    "mac_address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Mac Address"
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hostname"
    },
    "sync_mode": {
      "anyOf": [
        {
          "$ref": "#/$defs/SyncMode"
        },
        {
          "type": "null"
        }
      ]
    },
    "sync_config": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sync Config"
    },
    "capabilities": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "boolean"
          },
          "propertyNames": {
            "maxLength": 64,
            "minLength": 1
          },
          "type": "object",
          "maxProperties": 32
        },
        {
          "type": "null"
        }
      ],
      "title": "Capabilities"
    },
    "allow_existing": {
      "type": "boolean",
      "title": "Allow Existing",
      "default": true
    },
    "allow_duplicate": {
      "type": "boolean",
      "title": "Allow Duplicate",
      "default": false
    },
    "reset_syncs": {
      "type": "boolean",
      "title": "Reset Syncs",
      "default": false
    }
  },
  "type": "object",
  "$defs": {
    "SyncMode": {
      "type": "string",
      "enum": [
        "api",
        "file_transfer",
        "push_pull"
      ],
      "title": "SyncMode"
    }
  }
}