{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sonarqube/json-schema/sonarqube-component-measures-response-schema.json",
  "title": "ComponentMeasuresResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sonarqube-measures-api-openapi.yml#/components/schemas/ComponentMeasuresResponse",
  "type": "object",
  "properties": {
    "component": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "qualifier": {
          "type": "string"
        },
        "measures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Measure"
          }
        }
      }
    }
  },
  "$defs": {
    "Measure": {
      "type": "object",
      "properties": {
        "metric": {
          "type": "string",
          "description": "Metric key (e.g., coverage, bugs, vulnerabilities)"
        },
        "value": {
          "type": "string",
          "description": "Metric value"
        },
        "bestValue": {
          "type": "boolean",
          "description": "Whether this value is the best possible for the metric"
        },
        "period": {
          "type": "object",
          "properties": {
            "index": {
              "type": "integer"
            },
            "value": {
              "type": "string"
            },
            "bestValue": {
              "type": "boolean"
            }
          }
        }
      }
    }
  }
}