Skip to content

Commit e042ea8

Browse files
ericfitzclaude
andcommitted
fix(api): require admin for webhook/addon operations and fix OpenAPI linting
- Require admin role for webhook and addon create/update/delete operations - Remove unused clientCredentialNamePattern variable and regexp import - Fix OpenAPI schema: move nullable into oneOf with type for JsonPatchDocument - Resolves Spectral linting errors for oas3-valid-media-example rule Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7ad15a4 commit e042ea8

File tree

7 files changed

+818
-964
lines changed

7 files changed

+818
-964
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"major": 0,
33
"minor": 276,
4-
"patch": 8
4+
"patch": 9
55
}

api-schema/tmi-openapi.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5781,10 +5781,10 @@
57815781
},
57825782
"value": {
57835783
"description": "The value to use for add/replace/test operations. Can be any JSON value per RFC 6902 (string, number, boolean, object, array, or null).",
5784-
"nullable": true,
57855784
"oneOf": [
57865785
{
5787-
"type": "string"
5786+
"type": "string",
5787+
"nullable": true
57885788
},
57895789
{
57905790
"type": "number"
@@ -24703,7 +24703,7 @@
2470324703
"/webhooks/subscriptions": {
2470424704
"get": {
2470524705
"summary": "List webhook subscriptions",
24706-
"description": "List all webhook subscriptions owned by the authenticated user. Optionally filter by threat_model_id.",
24706+
"description": "List all webhook subscriptions. Requires administrator privileges.",
2470724707
"operationId": "listWebhookSubscriptions",
2470824708
"tags": [
2470924709
"webhooks"
@@ -24878,7 +24878,7 @@
2487824878
},
2487924879
"post": {
2488024880
"summary": "Create webhook subscription",
24881-
"description": "Create a new webhook subscription. The subscription will be in pending_verification status until the challenge is completed.",
24881+
"description": "Create a new webhook subscription. Requires administrator privileges. The subscription will be in pending_verification status until the challenge is completed.",
2488224882
"operationId": "createWebhookSubscription",
2488324883
"tags": [
2488424884
"webhooks"
@@ -25121,7 +25121,7 @@
2512125121
"/webhooks/subscriptions/{webhook_id}": {
2512225122
"get": {
2512325123
"summary": "Get webhook subscription",
25124-
"description": "Get a specific webhook subscription by ID",
25124+
"description": "Retrieve details of a specific webhook subscription. Requires administrator privileges.",
2512525125
"operationId": "getWebhookSubscription",
2512625126
"tags": [
2512725127
"webhooks"
@@ -25319,7 +25319,7 @@
2531925319
},
2532025320
"delete": {
2532125321
"summary": "Delete webhook subscription",
25322-
"description": "Delete a webhook subscription. Only the owner can delete a subscription.",
25322+
"description": "Delete a webhook subscription and all its associated deliveries. Requires administrator privileges.",
2532325323
"operationId": "deleteWebhookSubscription",
2532425324
"tags": [
2532525325
"webhooks"
@@ -25512,7 +25512,7 @@
2551225512
"/webhooks/subscriptions/{webhook_id}/test": {
2551325513
"post": {
2551425514
"summary": "Test webhook subscription",
25515-
"description": "Send a test event to the webhook URL to verify it's working correctly",
25515+
"description": "Send a test event to the webhook endpoint. Requires administrator privileges. Returns a delivery ID that can be used to track the test delivery status.",
2551625516
"operationId": "testWebhookSubscription",
2551725517
"tags": [
2551825518
"webhooks"
@@ -25723,7 +25723,7 @@
2572325723
"/webhooks/deliveries": {
2572425724
"get": {
2572525725
"summary": "List webhook deliveries",
25726-
"description": "List webhook deliveries for the authenticated user's subscriptions",
25726+
"description": "List webhook deliveries. Requires administrator privileges. Optionally filter by subscription_id.",
2572725727
"operationId": "listWebhookDeliveries",
2572825728
"tags": [
2572925729
"webhooks"
@@ -25900,7 +25900,7 @@
2590025900
"/webhooks/deliveries/{delivery_id}": {
2590125901
"get": {
2590225902
"summary": "Get webhook delivery",
25903-
"description": "Get details of a specific webhook delivery",
25903+
"description": "Retrieve details of a specific webhook delivery including payload and delivery attempts. Requires administrator privileges.",
2590425904
"operationId": "getWebhookDelivery",
2590525905
"tags": [
2590625906
"webhooks"

0 commit comments

Comments
 (0)