Skip to content

Instantly share code, notes, and snippets.

@amitpatelx
Last active November 1, 2021 15:50
Show Gist options
  • Save amitpatelx/88006b520fb32f024c1d453adfe66192 to your computer and use it in GitHub Desktop.
Save amitpatelx/88006b520fb32f024c1d453adfe66192 to your computer and use it in GitHub Desktop.
Reva Media JSON schema for property details
{
"$id": "https://www.revamedia.dk//schemas/myschema.json",
"description": "Schema to validate generated JSON by spiders",
"type": "object",
"properties": {
"external_source": {
"type": "string",
"minLength": 6,
"pattern": "^[a-zA-Z0-9_]*$"
},
"external_link": {
"type": "string"
},
"external_id": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"city": {
"type": "string"
},
"zipcode": {
"type": "string"
},
"address": {
"type": "string"
},
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"property_type": {
"type": "string",
"enum": ["apartment", "house", "room", "property_for_sale", "student_apartment", "studio"]
},
"square_meters": {
"type": "number"
},
"room_count": {
"type": "integer"
},
"bathroom_count": {
"type": "integer"
},
"available_date": {
"type": "string",
"format": "date"
},
"images": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "uri"
}
},
"floor_plan_images": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "uri"
}
},
"rent": {
"type": "number"
},
"currency": {
"type": "string",
"enum": ["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW", "ZWL"]
},
"deposit": {
"type": "number"
},
"agency_fees": {
"type": "number"
},
"prepaid_rent": {
"type": "number"
},
"utilities": {
"type": "number"
},
"water_cost": {
"type": "number"
},
"heating_cost": {
"type": "number"
},
"energy_label": {
"type": "string"
},
"pets_allowed": {
"type": "boolean"
},
"furnished": {
"type": "boolean"
},
"floor": {
"type": "string"
},
"parking": {
"type": "boolean"
},
"elevator": {
"type": "boolean"
},
"balcony": {
"type": "boolean"
},
"terrace": {
"type": "boolean"
},
"swimming_pool": {
"type": "boolean"
},
"washing_machine": {
"type": "boolean"
},
"dishwasher": {
"type": "boolean"
},
"air_conditioner": {
"type": "boolean"
},
"landlord_name": {
"type": "string"
},
"landlord_email": {
"type": "string",
"format": "email"
},
"landlord_phone": {
"type": "string"
},
"position": {
"type": "integer"
},
"external_images_count": {
"type": "integer"
}
},
"additionalProperties": false,
"required": ["external_source", "external_link", "address", "property_type", "square_meters", "room_count", "rent", "currency"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment