-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from mconf/HOOK-33/create-route
Added `/hooks/enable` route
- Loading branch information
Showing
11 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fail: | ||
value: |- | ||
<response> | ||
<returncode>FAILED</returncode> | ||
<messageKey>checksumError</messageKey> | ||
<message>You did not pass the checksum security check</message> | ||
</response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fail: | ||
value: |- | ||
<response> | ||
<returncode>FAILED</returncode> | ||
<messageKey>enableHookError</messageKey> | ||
<message>An error happened while enabling your hook. Please contact the system's administrators.</message> | ||
</response> |
7 changes: 7 additions & 0 deletions
7
openapi/components/examples/enableHook/hookNotFoundError.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fail: | ||
value: |- | ||
<response> | ||
<returncode>FAILED</returncode> | ||
<messageKey>enableMissingHook</messageKey> | ||
<message>The hook informed was not found or the shared secret didn't match the hook's.</message> | ||
</response> |
7 changes: 7 additions & 0 deletions
7
openapi/components/examples/enableHook/invalidHookIDError.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fail: | ||
value: |- | ||
<response> | ||
<returncode>FAILED</returncode> | ||
<messageKey>invalidParamHookID</messageKey> | ||
<message>You must specify a valid hookID in the parameters.</message> | ||
</response> |
7 changes: 7 additions & 0 deletions
7
openapi/components/examples/enableHook/missingParamError.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fail: | ||
value: |- | ||
<response> | ||
<returncode>FAILED</returncode> | ||
<messageKey>missingParamHookID</messageKey> | ||
<message>You must specify a hookID in the parameters.</message> | ||
</response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
success: | ||
value: |- | ||
<response> | ||
<returncode>SUCCESS</returncode> | ||
<enabled>true</enabled> | ||
</response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: sharedSecretGUID | ||
in: query | ||
description: The GUID used to created the secret. | ||
schema: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type: object | ||
required: | ||
- response | ||
properties: | ||
response: | ||
type: object | ||
required: | ||
- returncode | ||
- hookID | ||
properties: | ||
returncode: | ||
type: string | ||
hookID: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type: object | ||
required: | ||
- response | ||
- messageKey | ||
- message | ||
properties: | ||
response: | ||
type: object | ||
properties: | ||
returncode: | ||
type: string | ||
messageKey: | ||
type: string | ||
message: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
get: | ||
summary: enable | ||
operationId: hooks-enable | ||
description: Enables a Hook to receive meetings events. | ||
tags: | ||
- hooks | ||
parameters: | ||
- $ref: '../components/parameters/hookID.yaml' | ||
required: true | ||
- $ref: '../components/parameters/checksum.yaml' | ||
|
||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
application/xml: | ||
examples: | ||
$ref: '../components/examples/enableHook/success.yaml' | ||
schema: | ||
$ref: '../components/schemas/responses/enableHook.yaml' | ||
'400': | ||
description: Missing Hook ID | ||
content: | ||
application/xml: | ||
examples: | ||
$ref: '../components/examples/enableHook/missingParamError.yaml' | ||
schema: | ||
$ref: '../components/schemas/responses/enableHookError.yaml' | ||
'401': | ||
description: Checksum check failed | ||
content: | ||
application/xml: | ||
examples: | ||
$ref: '../components/examples/enableHook/checksumError.yaml' | ||
schema: | ||
$ref: '../components/schemas/responses/enableHookError.yaml' | ||
'404': | ||
description: Hook Not Found | ||
content: | ||
application/xml: | ||
examples: | ||
$ref: '../components/examples/enableHook/hookNotFoundError.yaml' | ||
schema: | ||
$ref: '../components/schemas/responses/enableHookError.yaml' | ||
'422': | ||
description: Invalid Hook ID | ||
content: | ||
application/xml: | ||
examples: | ||
$ref: '../components/examples/enableHook/invalidHookIDError.yaml' | ||
schema: | ||
$ref: '../components/schemas/responses/enableHookError.yaml' | ||
'500': | ||
description: Couldn't enable hook | ||
content: | ||
application/xml: | ||
examples: | ||
$ref: '../components/examples/enableHook/enableError.yaml' | ||
schema: | ||
$ref: '../components/schemas/responses/enableHookError.yaml' |