Skip to content

Commit

Permalink
feat(SPV-1345): swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-4chain committed Jan 2, 2025
1 parent 00cce43 commit e3b6b2a
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,35 @@ const docTemplate = `{
}
},
"/api/v1/admin/webhooks/subscriptions": {
"get": {
"security": [
{
"x-auth-xpub": []
}
],
"description": "Get All Webhooks currently subscribed to",
"produces": [
"application/json"
],
"tags": [
"Admin"
],
"summary": "Get All Webhooks",
"responses": {
"200": {
"description": "List of webhooks",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Webhook"
}
}
},
"500": {
"description": "Internal server error - Error while getting all webhooks"
}
}
},
"post": {
"security": [
{
Expand Down
29 changes: 29 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,35 @@
}
},
"/api/v1/admin/webhooks/subscriptions": {
"get": {
"security": [
{
"x-auth-xpub": []
}
],
"description": "Get All Webhooks currently subscribed to",
"produces": [
"application/json"
],
"tags": [
"Admin"
],
"summary": "Get All Webhooks",
"responses": {
"200": {
"description": "List of webhooks",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Webhook"
}
}
},
"500": {
"description": "Internal server error - Error while getting all webhooks"
}
}
},
"post": {
"security": [
{
Expand Down
18 changes: 18 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3277,6 +3277,24 @@ paths:
summary: Unsubscribe to a webhook
tags:
- Admin
get:
description: Get All Webhooks currently subscribed to
produces:
- application/json
responses:
"200":
description: List of webhooks
schema:
items:
$ref: '#/definitions/models.Webhook'
type: array
"500":
description: Internal server error - Error while getting all webhooks
security:
- x-auth-xpub: []
summary: Get All Webhooks
tags:
- Admin
post:
description: Subscribe to a webhook to receive notifications
parameters:
Expand Down

0 comments on commit e3b6b2a

Please sign in to comment.