{
  "schemaVersion": 1,
  "operation": {
    "operationId": "updateSemanticAttributeMetadata",
    "method": "PATCH",
    "path": "/api/v1/semantic-attributes/{attribute}",
    "summary": "",
    "description": "",
    "tags": [
      "Access"
    ],
    "effect": "write",
    "confirmation": "conditional",
    "parameters": [
      {
        "name": "attribute",
        "in": "path",
        "required": true,
        "description": "",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "If-Match",
        "in": "header",
        "required": true,
        "description": "",
        "schema": {
          "type": "string"
        }
      }
    ],
    "requestBody": {
      "required": true,
      "description": "",
      "content": [
        {
          "contentType": "application/json",
          "schema": {
            "$ref": "#/components/schemas/SemanticAttributeMetadataRequest"
          }
        }
      ]
    },
    "responses": [
      {
        "status": "200",
        "description": "The request has succeeded.",
        "content": [
          {
            "contentType": "application/json",
            "schema": {
              "$ref": "#/components/schemas/SemanticAttributeDefinitionResponse"
            }
          }
        ]
      },
      {
        "status": "400",
        "description": "The server could not understand the request due to invalid syntax.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "401",
        "description": "Access is unauthorized.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "403",
        "description": "Access is forbidden.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "404",
        "description": "The server cannot find the requested resource.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "409",
        "description": "The request conflicts with the current state of the server.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "412",
        "description": "Precondition failed.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "413",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "415",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "422",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "429",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "500",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "502",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "503",
        "description": "Service unavailable.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      }
    ]
  },
  "schemas": {
    "ProblemDetails": {
      "example": {
        "code": "example",
        "detail": "example",
        "errors": [
          {
            "code": "example",
            "detail": "example",
            "field": "example"
          }
        ],
        "instance": "example",
        "requestId": "example",
        "status": 1,
        "title": "example",
        "type": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "errors": {
          "example": [
            {
              "code": "example",
              "detail": "example",
              "field": "example"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ProblemFieldError"
          },
          "type": "array"
        },
        "instance": {
          "example": "example",
          "type": "string"
        },
        "requestId": {
          "example": "example",
          "type": "string"
        },
        "status": {
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "title": {
          "example": "example",
          "type": "string"
        },
        "type": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "type",
        "title",
        "status",
        "detail",
        "instance",
        "code",
        "requestId",
        "errors"
      ],
      "type": "object"
    },
    "ProblemFieldError": {
      "example": {
        "code": "example",
        "detail": "example",
        "field": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "field": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "field",
        "code",
        "detail"
      ],
      "type": "object"
    },
    "SemanticAttributeDefinitionResponse": {
      "example": {
        "createdAt": "2026-01-02T15:04:05Z",
        "definitionVersion": 1,
        "description": "example",
        "disabledAt": "2026-01-02T15:04:05Z",
        "displayName": "example",
        "documentationUrl": "example",
        "id": "example",
        "lifecycleState": "example",
        "name": "example",
        "ownerId": "example",
        "ownerKind": "instance",
        "profile": "example",
        "shape": "scalar",
        "type": "String",
        "updatedAt": "2026-01-02T15:04:05Z"
      },
      "properties": {
        "createdAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "definitionVersion": {
          "example": 1,
          "format": "int64",
          "type": "integer"
        },
        "description": {
          "example": "example",
          "type": "string"
        },
        "disabledAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "displayName": {
          "example": "example",
          "type": "string"
        },
        "documentationUrl": {
          "example": "example",
          "type": "string"
        },
        "id": {
          "example": "example",
          "type": "string"
        },
        "lifecycleState": {
          "example": "example",
          "type": "string"
        },
        "name": {
          "example": "example",
          "type": "string"
        },
        "ownerId": {
          "example": "example",
          "type": "string"
        },
        "ownerKind": {
          "$ref": "#/components/schemas/SemanticAttributeOwnerKindValue"
        },
        "profile": {
          "example": "example",
          "type": "string"
        },
        "shape": {
          "$ref": "#/components/schemas/SemanticAttributeShapeValue"
        },
        "type": {
          "$ref": "#/components/schemas/SemanticAttributeValueType"
        },
        "updatedAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "type",
        "shape",
        "profile",
        "definitionVersion",
        "ownerKind",
        "displayName",
        "description",
        "lifecycleState",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    },
    "SemanticAttributeMetadataRequest": {
      "example": {
        "description": "example",
        "displayName": "example",
        "documentationUrl": "example",
        "ownerId": "example",
        "ownerKind": "instance"
      },
      "properties": {
        "description": {
          "example": "example",
          "type": "string"
        },
        "displayName": {
          "example": "example",
          "type": "string"
        },
        "documentationUrl": {
          "example": "example",
          "type": "string"
        },
        "ownerId": {
          "example": "example",
          "type": "string"
        },
        "ownerKind": {
          "$ref": "#/components/schemas/SemanticAttributeOwnerKindValue"
        }
      },
      "required": [
        "ownerKind",
        "displayName",
        "description"
      ],
      "type": "object"
    },
    "SemanticAttributeOwnerKindValue": {
      "enum": [
        "instance",
        "principal",
        "group"
      ],
      "example": "instance",
      "type": "string"
    },
    "SemanticAttributeShapeValue": {
      "enum": [
        "scalar",
        "list"
      ],
      "example": "scalar",
      "type": "string"
    },
    "SemanticAttributeValueType": {
      "enum": [
        "String",
        "Boolean",
        "Integer",
        "Decimal",
        "Date",
        "Timestamp"
      ],
      "example": "String",
      "type": "string"
    }
  }
}
