@camunda/element-templates-json-schema-shared 0.2.0 → 0.4.0-alpha.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/element-templates-json-schema-shared",
3
- "version": "0.2.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "description": "Shared schema definitions used within element-templates-json-schema",
5
5
  "files": [
6
6
  "src"
@@ -16,5 +16,5 @@
16
16
  "camunda"
17
17
  ],
18
18
  "license": "MIT",
19
- "gitHead": "f4b102f0cdb536cba89e1dbfbe8bd3b58b75a224"
19
+ "gitHead": "457a27772193578b941bae05d6af0f96841e5485"
20
20
  }
@@ -3,7 +3,7 @@
3
3
  "description": "List of properties of the element template.",
4
4
  "allOf": [
5
5
  { "$ref": "examples.json#/properties" }
6
- ],
6
+ ],
7
7
  "items": {
8
8
  "type": "object",
9
9
  "default": {},
@@ -28,6 +28,10 @@
28
28
  }
29
29
  ],
30
30
  "properties": {
31
+ "id": {
32
+ "type": "string",
33
+ "description": "Unique identifier of the property."
34
+ },
31
35
  "value": {
32
36
  "$id": "#/properties/property/value",
33
37
  "type": [
@@ -138,6 +142,9 @@
138
142
  "$id": "#/properties/property/group",
139
143
  "type": "string",
140
144
  "description": "The custom group of a control field."
145
+ },
146
+ "condition": {
147
+ "$ref": "condition.json"
141
148
  }
142
149
  }
143
150
  }
@@ -39,7 +39,7 @@
39
39
  "items": {
40
40
  "$id": "#/appliesTo/items",
41
41
  "type": "string",
42
- "pattern": "^(.*?:)",
42
+ "pattern": "^[\\w\\d]+:[\\w\\d]+$",
43
43
  "errorMessage": {
44
44
  "pattern": "invalid item for \"appliesTo\", should contain namespaced property, example: \"bpmn:Task\""
45
45
  },
@@ -50,6 +50,35 @@
50
50
  ]
51
51
  }
52
52
  },
53
+ "elementType": {
54
+ "$id": "#/elementType",
55
+ "type": "object",
56
+ "description": "The BPMN type the element will be transformed into.",
57
+ "default": {},
58
+ "required": [
59
+ "value"
60
+ ],
61
+ "errorMessage": {
62
+ "required": {
63
+ "value": "missing elementType value"
64
+ }
65
+ },
66
+ "properties": {
67
+ "value": {
68
+ "$id": "#/elementType/value",
69
+ "type": "string",
70
+ "pattern": "^[\\w\\d]+:[\\w\\d]+$",
71
+ "errorMessage": {
72
+ "pattern": "invalid item for \"elementType\", should contain namespaced property, example: \"bpmn:Task\""
73
+ },
74
+ "allOf": [
75
+ {
76
+ "$ref": "examples.json#/elementType"
77
+ }
78
+ ]
79
+ }
80
+ }
81
+ },
53
82
  "metadata": {
54
83
  "$id": "#/metadata",
55
84
  "type": "object",
@@ -63,6 +92,14 @@
63
92
  },
64
93
  "groups": {
65
94
  "$ref": "groups.json"
95
+ },
96
+ "documentationRef": {
97
+ "$id": "#/documentaionRef",
98
+ "type": "string",
99
+ "pattern": "^(https|http)://.*",
100
+ "errorMessage": {
101
+ "pattern": "Malformed documentation URL, must match \"^(https|http)://.*\""
102
+ }
66
103
  }
67
104
  },
68
105
  "errorMessage": {
@@ -0,0 +1,63 @@
1
+ {
2
+ "$id": "#/condition",
3
+ "type": "object",
4
+ "description": "Condition to activate the binding.",
5
+ "allOf": [
6
+ {
7
+ "$ref": "examples.json#/condition"
8
+ }
9
+ ],
10
+ "required": [
11
+ "property"
12
+ ],
13
+ "errorMessage": {
14
+ "required": {
15
+ "property": "missing property name for condition"
16
+ }
17
+ },
18
+ "properties": {
19
+ "type": {
20
+ "$id": "#/condition/type",
21
+ "const": "simple",
22
+ "description": "The type of the condition.",
23
+ "default": "simple"
24
+ },
25
+ "property": {
26
+ "$id": "#/condition/property",
27
+ "type": "string",
28
+ "description": "The id of the property to check."
29
+ }
30
+ },
31
+ "oneOf": [
32
+ {
33
+ "properties": {
34
+ "equals": {
35
+ "type": [
36
+ "string",
37
+ "number",
38
+ "boolean"
39
+ ]
40
+ }
41
+ },
42
+ "required": [
43
+ "equals"
44
+ ]
45
+ },
46
+ {
47
+ "properties": {
48
+ "oneOf": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": [
52
+ "string",
53
+ "number"
54
+ ]
55
+ }
56
+ }
57
+ },
58
+ "required": [
59
+ "oneOf"
60
+ ]
61
+ }
62
+ ]
63
+ }
@@ -35,5 +35,28 @@
35
35
  "notEmpty": true
36
36
  }
37
37
  ]
38
+ },
39
+ "elementType": {
40
+ "examples": [
41
+ "bpmn:ServiceTask",
42
+ "bpmn:UserTask",
43
+ "bpmn:StartEvent",
44
+ "bpmn:ExclusiveGateway",
45
+ "bpmn:ParallelGateway"
46
+ ]
47
+ },
48
+ "condition": {
49
+ "examples": [
50
+ {
51
+ "type": "simple",
52
+ "property": "httpMethod",
53
+ "equals": "GET"
54
+ },
55
+ {
56
+ "type": "simple",
57
+ "property": "httpMethod",
58
+ "oneOf": [ "POST", "PUT", "DELETE" ]
59
+ }
60
+ ]
38
61
  }
39
62
  }
package/CHANGELOG.md DELETED
@@ -1,15 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to [@camunda/element-templates-json-schema-shared](https://github.com/camunda/element-templates-json-schema/packages/element-templates-json-schema-shared) are documented here. We use [semantic versioning](http://semver.org/) for releases.
4
-
5
- ## Unreleased
6
-
7
- ___Note:__ Yet to be released changes appear here._
8
-
9
- ## 0.2.0
10
-
11
- * `FEAT`: provide better editor annotations ([#45](https://github.com/camunda/element-templates-json-schema/pull/45))
12
-
13
- ## 0.1.0
14
-
15
- * `FEAT`: initial version :tada: