{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adhdevaluations-fyi/json-schema/adhdevaluations-fyi-listing-schema.json",
  "title": "Listing",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adhdevaluations-fyi-openapi.json#/components/schemas/Listing",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "description": "The stable identifier. Use it in /listings/{slug}."
    },
    "name": {
      "type": "string"
    },
    "path": {
      "type": "string",
      "description": "The listing page on this site."
    },
    "url": {
      "type": "string",
      "description": "Absolute URL of the listing page."
    },
    "country": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2, upper case."
    },
    "region": {
      "type": "string"
    },
    "regionSlug": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "citySlug": {
      "type": "string"
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name"
        ],
        "additionalProperties": false
      },
      "description": "Primary category first."
    },
    "tier": {
      "type": "string"
    },
    "lat": {
      "type": [
        "number",
        "null"
      ]
    },
    "lng": {
      "type": [
        "number",
        "null"
      ]
    },
    "completeness": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "0 to 100. How much of the record is filled in."
    },
    "attributes": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {},
      "description": "Public facet attributes, keyed by attribute key."
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "street": {
      "type": [
        "string",
        "null"
      ]
    },
    "street2": {
      "type": [
        "string",
        "null"
      ]
    },
    "postalCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "website": {
      "type": [
        "string",
        "null"
      ]
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217."
    },
    "language": {
      "type": "string",
      "description": "BCP 47."
    },
    "verified": {
      "type": "boolean",
      "description": "The listing has an owner or a paid tier."
    },
    "source": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "license": {
              "type": "string"
            },
            "refresh": {
              "type": "string"
            },
            "notes": {
              "description": "The source note: how the record was gathered.",
              "type": [
                "string",
                "null"
              ]
            },
            "recordUrl": {
              "type": "string",
              "description": "Where this record was read."
            },
            "retrieved": {
              "description": "When it was read, ISO 8601.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "key",
            "name",
            "license",
            "refresh",
            "notes",
            "recordUrl",
            "retrieved"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Null for a record that did not come from an import."
    },
    "published": {
      "description": "ISO 8601.",
      "type": [
        "string",
        "null"
      ]
    },
    "updated": {
      "type": "string",
      "description": "ISO 8601."
    }
  },
  "required": [
    "slug",
    "name",
    "path",
    "url",
    "country",
    "region",
    "regionSlug",
    "city",
    "citySlug",
    "categories",
    "tier",
    "lat",
    "lng",
    "completeness",
    "attributes",
    "description",
    "street",
    "street2",
    "postalCode",
    "phone",
    "website",
    "currency",
    "language",
    "verified",
    "source",
    "published",
    "updated"
  ],
  "additionalProperties": false
}