Browse Source

refactor(nocodb): update & delete hook responses & examples

pull/5269/head
Wing-Kam Wong 2 years ago
parent
commit
61abd222e8
  1. 54
      packages/nocodb/src/schema/swagger.json

54
packages/nocodb/src/schema/swagger.json

@ -11171,6 +11171,26 @@
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/Hook" "$ref": "#/components/schemas/Hook"
},
"examples": {
"Example 1": {
"value": {
"active": 0,
"async": 0,
"description": "This is my hook description",
"env": "all",
"event": "after",
"fk_model_id": "md_rsu68aqjsbyqtl",
"id": "string",
"notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}",
"null": null,
"operation": "insert",
"retries": 10,
"retry_interval": 60000,
"timeout": 60000,
"title": "My Webhook"
}
}
} }
} }
} }
@ -11185,6 +11205,26 @@
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/Hook" "$ref": "#/components/schemas/Hook"
},
"examples": {
"Example 1": {
"value": {
"active": 0,
"async": 0,
"description": "This is my hook description",
"env": "all",
"event": "after",
"fk_model_id": "md_rsu68aqjsbyqtl",
"id": "string",
"notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}",
"null": null,
"operation": "insert",
"retries": 10,
"retry_interval": 60000,
"timeout": 60000,
"title": "My Webhook"
}
}
} }
} }
} }
@ -11201,7 +11241,19 @@
"operationId": "db-table-webhook-delete", "operationId": "db-table-webhook-delete",
"responses": { "responses": {
"200": { "200": {
"description": "OK" "description": "OK",
"content": {
"application/json": {
"schema": {
"type": "boolean"
},
"examples": {
"Example 1": {
"value": true
}
}
}
}
}, },
"400": { "400": {
"$ref": "#/components/responses/BadRequest" "$ref": "#/components/responses/BadRequest"

Loading…
Cancel
Save