{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yondry-app/json-schema/yondry-app-place-create-schema.json",
  "title": "PlaceCreate",
  "description": "Fields for creating a place manually via POST /places.\n\nplace_type and source_type are recommended but optional so that existing\nmobile API calls (which omit them) continue to work without changes.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yondry-app-openapi.json#/components/schemas/PlaceCreate",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Name"
    },
    "place_type": {
      "anyOf": [
        {
          "$ref": "#/$defs/PlaceType"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_type": {
      "$ref": "#/$defs/SourceType",
      "default": "manual"
    },
    "address": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Address"
    },
    "lat": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 90.0,
          "minimum": -90.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Lat"
    },
    "lon": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 180.0,
          "minimum": -180.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Lon"
    },
    "city": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ],
      "title": "City"
    },
    "country_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Country Code"
    },
    "google_place_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Google Place Id"
    },
    "user_notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 5000
        },
        {
          "type": "null"
        }
      ],
      "title": "User Notes"
    },
    "user_tags": {
      "items": {
        "type": "string",
        "maxLength": 100
      },
      "type": "array",
      "title": "User Tags"
    },
    "is_favourite": {
      "type": "boolean",
      "title": "Is Favourite",
      "default": false
    },
    "source_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Url"
    },
    "category": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Category"
    },
    "indoor_outdoor": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "indoor",
            "outdoor",
            "both"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Indoor Outdoor"
    },
    "budget_level": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "free",
            "low",
            "medium",
            "high"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Budget Level"
    },
    "kid_min_age": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 17.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Kid Min Age"
    },
    "kid_max_age": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 17.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Kid Max Age"
    },
    "always_open": {
      "type": "boolean",
      "title": "Always Open",
      "default": false
    },
    "opening_time": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{2}:\\d{2}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Opening Time"
    },
    "closing_time": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{2}:\\d{2}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Closing Time"
    },
    "tags": {
      "items": {
        "type": "string",
        "maxLength": 100
      },
      "type": "array",
      "maxItems": 50,
      "title": "Tags"
    },
    "notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes"
    }
  },
  "type": "object",
  "required": [
    "name"
  ],
  "$defs": {
    "PlaceType": {
      "type": "string",
      "enum": [
        "park",
        "playground",
        "museum",
        "cafe",
        "restaurant",
        "bar",
        "activity",
        "shopping",
        "other"
      ],
      "title": "PlaceType"
    },
    "SourceType": {
      "type": "string",
      "enum": [
        "manual",
        "google_import",
        "url_import",
        "screenshot",
        "social_save"
      ],
      "title": "SourceType"
    }
  }
}