Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
Add webhook action definition
Browse files Browse the repository at this point in the history
  • Loading branch information
slavcodev committed Apr 15, 2016
1 parent d2a0cc4 commit 2fb0607
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/definitions/Rules/Actions/WebhookAuthorization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: object
discriminator: type
properties:
type:
type: string
enum:
- none
- basic
- digest
- oauth1
- oauth2
required:
- type
13 changes: 13 additions & 0 deletions spec/definitions/Rules/Actions/WebhookAuthorization/basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: ""
allOf:
- $ref: "#/definitions/WebhookAuthorization"
- type: object
properties:
username:
type: string
password:
type: string
format: password
required:
- username
- password
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: ""
allOf:
- $ref: "#/definitions/WebhookAuthorization"
3 changes: 3 additions & 0 deletions spec/definitions/Rules/Actions/WebhookAuthorization/none.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: ""
allOf:
- $ref: "#/definitions/WebhookAuthorization"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: ""
allOf:
- $ref: "#/definitions/WebhookAuthorization"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: ""
allOf:
- $ref: "#/definitions/WebhookAuthorization"
17 changes: 17 additions & 0 deletions spec/definitions/Rules/Actions/WebhookHeader.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
type: object
properties:
active:
description: Whether webhook header is active
type: boolean
default: true
name:
type: string
value:
type:
- string
- array
items:
type: string
required:
- name
- value
11 changes: 11 additions & 0 deletions spec/definitions/Rules/Actions/trigger-webhooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: ""
allOf:
- $ref: "#/definitions/RuleAction"
- type: object
properties:
webhooks:
type: array
items:
$ref: "#/definitions/Webhook"
required:
- webhooks
49 changes: 49 additions & 0 deletions spec/definitions/Rules/Actions/webhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
type: object
properties:
name:
description: The webhook name
type: string
status:
type: string
default: active
enum:
- active
- inactive
method:
type: string
enum:
- GET
- POST
- PUT
- PATCH
- DELETE
uri:
type: string
format: uri
query:
type: object
description: The URI parameters
additionalProperties:
type:
- string
- array
items:
type: string
example:
param1: "value1"
param2:
- "value2"
- "value3"
body:
type: string
authorization:
$ref: "#/definitions/WebhookAuthorization"
headers:
type: array
items:
$ref: "#/definitions/WebhookHeader"
required:
- name
- status
- method
- uri

0 comments on commit 2fb0607

Please sign in to comment.