any_channel_json_schemas 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -9
- data/json_schemas/event_callback_pull_request.json +15 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3468bbe39096b7b8963a682864c4c88a1f70147
|
4
|
+
data.tar.gz: fb483e80f5eadae3b7ac11276cda390e8e6c5ff0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46a87735a661497314e6b36c6751cb5c226f7603144a1d3d92d871b4e6c1aed94f0862ec27dbcbe85fe7d6c738d636ea852eb3eb68c2c5daca0e606a0c3b1e1d
|
7
|
+
data.tar.gz: 71b4b99da16f0816c02699928fbdc79d8be296978b307fd51bb6dacee035b29c103eb8f8bb46a23f5497005e9e3acdde11b0fab155fe500f3effb4aaea17332c
|
data/README.md
CHANGED
@@ -13,14 +13,19 @@ gem install any_channel_json_schemas
|
|
13
13
|
The gem exposes a single module with the following methods:
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
manifest
|
17
|
+
pull_payload
|
18
|
+
external_resource
|
19
|
+
push_parameters
|
20
|
+
channelback_payload
|
21
|
+
event_callback_any
|
22
|
+
event_callback_base
|
23
|
+
event_callback_create_integration
|
24
|
+
event_callback_create_integration_instance
|
25
|
+
event_callback_destroy_integration
|
26
|
+
event_callback_destroy_integration_instance
|
27
|
+
event_callback_pull_request
|
28
|
+
event_callback_resources_created_from_external_ids
|
24
29
|
```
|
25
30
|
|
26
31
|
Each of these returns an absolute path to a schema file. We use these in our own code base with the [json-schema](https://github.com/ruby-json-schema/json-schema) gem both in our test suite and to validate json payloads real-time.
|
@@ -33,7 +38,7 @@ Here's an example of how use the schemas to validate a [manifest](https://develo
|
|
33
38
|
if validation_errors.empty?
|
34
39
|
# Manifest conforms to the published schema.
|
35
40
|
else
|
36
|
-
# There are validation
|
41
|
+
# There are validation errors and we can't proceed.
|
37
42
|
end
|
38
43
|
```
|
39
44
|
|
@@ -3,11 +3,24 @@
|
|
3
3
|
"properties": {
|
4
4
|
"data": {
|
5
5
|
"type": "object",
|
6
|
-
"required": ["integration_instance_name", "url", "request_id"],
|
6
|
+
"required": ["integration_instance_name", "url", "request_id", "duplicate_external_ids"],
|
7
7
|
"properties": {
|
8
8
|
"integration_instance_name": {"type": "string"},
|
9
9
|
"url": {"type": "string", "format": "https-url"},
|
10
|
-
"request_id": {"type": "string"}
|
10
|
+
"request_id": {"type": "string"},
|
11
|
+
"duplicate_external_ids": {
|
12
|
+
"type": "array",
|
13
|
+
"items": {
|
14
|
+
"type": "object",
|
15
|
+
"required": ["external_id", "request_id", "ticket_nice_id", "comment_id"],
|
16
|
+
"properties": {
|
17
|
+
"external_id": {"type": "string"},
|
18
|
+
"request_id": {"type": "string"},
|
19
|
+
"ticket_nice_id": {"type": "string"},
|
20
|
+
"comment_id": {"type": "string"}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
11
24
|
}
|
12
25
|
}
|
13
26
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: any_channel_json_schemas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JaredShay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: JSON schema files for the Zendesk Channels Framework.
|
14
14
|
email:
|