{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yondry-app/json-schema/yondry-app-place-response-schema.json",
  "title": "PlaceResponse",
  "description": "Full place response including all fields and server-computed values.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yondry-app-openapi.json#/components/schemas/PlaceResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Address"
    },
    "lat": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lat"
    },
    "lon": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lon"
    },
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "City"
    },
    "country_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Country Code"
    },
    "place_type": {
      "anyOf": [
        {
          "$ref": "#/$defs/PlaceType"
        },
        {
          "type": "null"
        }
      ]
    },
    "category": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Category"
    },
    "google_place_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Google Place Id"
    },
    "google_types": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Google Types"
    },
    "price_level": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Level"
    },
    "rating": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rating"
    },
    "rating_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rating Count"
    },
    "opening_hours": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Opening Hours"
    },
    "website": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Website"
    },
    "phone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Phone"
    },
    "photos": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Photos"
    },
    "photo_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Photo Url"
    },
    "editorial_summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Editorial Summary"
    },
    "last_enriched_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Enriched At"
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "title": "User Id"
    },
    "user_rating": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "User Rating"
    },
    "user_notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "User Notes"
    },
    "user_tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "User Tags"
    },
    "is_favourite": {
      "type": "boolean",
      "title": "Is Favourite"
    },
    "status": {
      "$ref": "#/$defs/PlaceStatus"
    },
    "permanently_closed": {
      "type": "boolean",
      "title": "Permanently Closed"
    },
    "source_type": {
      "anyOf": [
        {
          "$ref": "#/$defs/SourceType"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Url"
    },
    "source_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Id"
    },
    "source": {
      "type": "string",
      "title": "Source"
    },
    "saved_at": {
      "type": "string",
      "format": "date-time",
      "title": "Saved At"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "deleted_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deleted At"
    },
    "is_deleted": {
      "type": "boolean",
      "title": "Is Deleted"
    },
    "stroller_friendly": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stroller Friendly"
    },
    "has_changing_facilities": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Has Changing Facilities"
    },
    "noise_level": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Noise Level"
    },
    "indoor_outdoor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Indoor Outdoor"
    },
    "budget_level": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Budget Level"
    },
    "kid_min_age": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kid Min Age"
    },
    "kid_max_age": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kid Max Age"
    },
    "always_open": {
      "type": "boolean",
      "title": "Always Open"
    },
    "opening_time": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Opening Time"
    },
    "closing_time": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Closing Time"
    },
    "notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags"
    },
    "is_open_now": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Open Now"
    },
    "visit_count": {
      "type": "integer",
      "title": "Visit Count",
      "default": 0
    },
    "distance_km": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Distance Km"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "address",
    "lat",
    "lon",
    "city",
    "country_code",
    "place_type",
    "category",
    "google_place_id",
    "google_types",
    "price_level",
    "rating",
    "rating_count",
    "opening_hours",
    "website",
    "phone",
    "photos",
    "editorial_summary",
    "last_enriched_at",
    "user_id",
    "user_rating",
    "user_notes",
    "user_tags",
    "is_favourite",
    "status",
    "permanently_closed",
    "source_type",
    "source_url",
    "source_id",
    "source",
    "saved_at",
    "created_at",
    "updated_at",
    "deleted_at",
    "is_deleted",
    "indoor_outdoor",
    "budget_level",
    "kid_min_age",
    "kid_max_age",
    "always_open",
    "opening_time",
    "closing_time",
    "notes",
    "tags"
  ],
  "$defs": {
    "PlaceStatus": {
      "type": "string",
      "enum": [
        "pending",
        "active",
        "closed"
      ],
      "title": "PlaceStatus"
    },
    "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"
    }
  }
}