{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gunspec-io/json-schema/gunspec-io-top-firearm-schema.json",
  "title": "TopFirearm",
  "description": "One entry in a superlative ranking, with the measured value and its unit.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gunspec-io-firearm-discovery-api-openapi.yml#/components/schemas/TopFirearm",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Slug of the firearm."
    },
    "name": {
      "type": "string",
      "description": "Display name, as the maker writes it."
    },
    "manufacturerId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Slug of the manufacturer that makes it. Resolve against `/v1/manufacturers/{id}`."
    },
    "categoryId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Slug of the category it belongs to. Resolve against `/v1/categories`."
    },
    "value": {
      "type": [
        "number",
        "null"
      ],
      "description": "The figure this ranking is by, in the unit of whichever statistic was requested."
    },
    "unit": {
      "type": "string",
      "description": "One of g, m, rpm, mm, rounds, J"
    }
  },
  "required": [
    "id",
    "name",
    "value",
    "unit"
  ]
}