{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gunspec-io/json-schema/gunspec-io-resolved-interface-schema.json",
  "title": "ResolvedInterface",
  "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/ResolvedInterface",
  "type": "object",
  "properties": {
    "position": {
      "type": "string",
      "description": "Where on the firearm the interface sits: `muzzle`, `rear`, `top`, `bottom`."
    },
    "standardId": {
      "type": "string",
      "description": "Id of the interface standard, kind-prefixed, e.g. `thread:1/2x28`. Ids are never renamed; new spellings become aliases."
    },
    "name": {
      "type": "string",
      "description": "Display name, as the maker writes it."
    },
    "kind": {
      "type": "string",
      "description": "What sort of interface it is: `thread`, `rail`, `mag`, `stock_mount`, `optic_plate`. Not a media kind: the shared registry filled this with `silhouette`/`render` until the consistency check caught it."
    },
    "source": {
      "$ref": "#/$defs/InterfaceSource"
    },
    "confidence": {
      "type": "number",
      "description": "How well evidenced this row is, 0 to 1. **A minimum, not an average**: an inferred row caps every fit computed through it, and `min_confidence` on the endpoint hides rows below a threshold."
    },
    "inheritedFrom": {
      "type": [
        "string",
        "null"
      ],
      "description": "The parent firearm or platform this interface came from, or null when the firearm declares it itself."
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Free-text notes that do not belong in a specific field."
    }
  },
  "$defs": {
    "InterfaceSource": {
      "type": "string",
      "enum": [
        "curated",
        "inferred",
        "inherited:parent",
        "inherited:platform"
      ],
      "description": "Where an interface row on a firearm came from. `curated` is a person; `inferred` is the backfill, capped at 0.6 confidence; the inherited kinds came through the parent chain or a platform."
    }
  }
}