{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gunspec-io/json-schema/gunspec-io-inline-media-item-schema.json",
  "title": "InlineMediaItem",
  "description": "One image attached to a firearm, inlined on list-shaped responses so a client can render a gallery without a second request. `url` is absolute and directly fetchable. For the full envelope, including credits, licence, dimensions and data-URI encoding, use `/v1/firearms/{id}/media`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gunspec-io-compatibility-api-openapi.yml#/components/schemas/InlineMediaItem",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Autoincrementing image id."
    },
    "url": {
      "type": "string",
      "description": "Absolute, directly fetchable URL."
    },
    "kind": {
      "$ref": "#/$defs/MediaKind"
    },
    "alt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Alt text, where one has been written. Null otherwise, so do not render an empty string."
    },
    "width": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Pixel width, where it is known."
    },
    "height": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Pixel height, where it is known."
    }
  },
  "required": [
    "id",
    "url",
    "kind"
  ],
  "$defs": {
    "MediaKind": {
      "type": "string",
      "enum": [
        "silhouette",
        "render",
        "photo",
        "schematic",
        "model"
      ],
      "description": "What kind of asset a media row is."
    }
  }
}