{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wisepim/json-schema/wisepim-hs-search-schema.json",
  "title": "HsSearch",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wisepim-openapi.json#/components/schemas/HsSearch",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "language": {
      "type": "string"
    },
    "nomenclatureVersion": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "level": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "chapter",
              "heading"
            ]
          },
          "description": {
            "type": "string"
          },
          "matchedTerms": {
            "type": "integer"
          },
          "allTermsMatched": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "page": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "attribution": {
      "$ref": "#/$defs/Attribution"
    }
  },
  "$defs": {
    "Attribution": {
      "type": "object",
      "description": "Credit to show wherever the data appears: a visible link with the text \"Data by WISEPIM\" to `url`.",
      "required": [
        "required",
        "text",
        "url",
        "html",
        "markdown",
        "terms"
      ],
      "properties": {
        "required": {
          "type": "boolean",
          "const": true
        },
        "text": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "html": {
          "type": "string"
        },
        "markdown": {
          "type": "string"
        },
        "terms": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}