{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-generation-schema.json",
  "title": "Generation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-cars-api-openapi.yml#/components/schemas/Generation",
  "type": "object",
  "properties": {
    "make": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "Display name, e.g. E90/E91/E92/E93 facelift."
    },
    "slug": {
      "type": "string",
      "description": "URL-safe form, and the value to pass as generation."
    },
    "chassis_codes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Every chassis code this generation covers. BMW's 2004-2010 3 Series is E90 (saloon), E91 (Touring), E92 (coupe) and E93 (convertible) -- one generation, four codes. Empty for generations with no published code. There is no singular chassis_code field: it would only ever be the first entry here, which for a multi-body generation is one body's code standing in for the whole generation."
    },
    "ordinal": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Generation number where the manufacturer counts rather than codes."
    },
    "facelift": {
      "type": "boolean"
    },
    "market": {
      "type": [
        "string",
        "null"
      ]
    },
    "year_begin": {
      "type": [
        "integer",
        "null"
      ]
    },
    "year_end": {
      "type": [
        "integer",
        "null"
      ]
    },
    "car_count": {
      "type": "integer",
      "description": "A generation with 0 is still returned, so gaps in coverage are visible. Pass has_cars=true to omit them."
    }
  }
}