Skip to content

Commit c206d4c

Browse files
authored
#183 Automate TypeScript declarations for Common Properties (#184)
1 parent abfccb8 commit c206d4c

16 files changed

+114
-55
lines changed

common-canvas/canvas-info/canvas-info-v3-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
{
33
"$schema": "https://json-schema.org/draft-04/schema#",
4+
"title": "Canvas Info",
45
"description": "Canvas Info Flow Schema - for internal Common Canvas use.",
56
"type": "object",
67
"id": "https://api.dataplatform.ibm.com/schemas/common-canvas/canvas-info/canvas-info-v3-schema.json",

common-canvas/expression/expression-info-v3-schema.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-canvas/expression/expression-info-v3-schema.json",
4-
"title": "Expression Builder Expression Info Schema",
5-
"description": "Watson Data Platform Expression Builder Expression Info Schema for the Common Properties editor",
4+
"title": "Expression Info",
5+
"description": "Expression Info Schema for the Common Properties editor",
66
"type": "object",
77
"properties": {
88
"functions": {
@@ -31,8 +31,6 @@
3131
"type": "boolean"
3232
}
3333
},
34-
"required": [
35-
],
3634
"definitions": {
3735
"field_categories_def": {
3836
"description": "Array of categories for the field dropdown menu",
@@ -62,7 +60,7 @@
6260
},
6361
"label": {
6462
"description": "User-readable name of field category",
65-
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#definitions/resource_definition"
63+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
6664
},
6765
"field_columns": {
6866
"description": "Title of the field column",
@@ -94,10 +92,10 @@
9492
"type": "object",
9593
"properties":{
9694
"label": {
97-
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#definitions/resource_definition"
95+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
9896
},
9997
"description": {
100-
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#definitions/resource_definition"
98+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
10199
}
102100
}
103101
},
@@ -109,7 +107,7 @@
109107
"description": "Unique string to reference this info column "
110108
},
111109
"label": {
112-
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#definitions/resource_definition"
110+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
113111
}
114112
},
115113
"required": [

common-canvas/expression/function-list-v3-schema.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-canvas/expression/function-list-v3-schema.json",
4-
"title": "Expression Builder Function List Schema",
5-
"description": "Watson Data Platform Expression Builder Function List Schema for the Common Properties editor",
4+
"title": "Function List",
5+
"description": "Function List Schema for the Common Properties editor",
66
"type": "object",
77
"properties": {
88
"function_categories": {
@@ -49,7 +49,7 @@
4949
"label": {
5050
"description": "External name of category",
5151
"type": "object",
52-
"$ref": "https://github.com/elyra-ai/pipeline-schemas/blob/main/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
52+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
5353
},
5454
"function_refs": {
5555
"description": "Array of function ids that are part of this fuction category",
@@ -78,7 +78,7 @@
7878
"label": {
7979
"description": "User-readable name of function",
8080
"type": "object",
81-
"$ref": "https://github.com/elyra-ai/pipeline-schemas/blob/main/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
81+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
8282
},
8383
"parameters": {
8484
"description": "Array of parameter information",
@@ -92,7 +92,7 @@
9292
"return_type_label": {
9393
"description": "Translatable data type name of what is returned from the function. If this is not provided, default to return_type",
9494
"type": "object",
95-
"$ref": "https://github.com/elyra-ai/pipeline-schemas/blob/main/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
95+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
9696
},
9797
"return_type": {
9898
"description": "The data type name of what is returned from the function.",
@@ -101,7 +101,7 @@
101101
"description": {
102102
"description": "The help text for the function.",
103103
"type": "object",
104-
"$ref": "https://github.com/elyra-ai/pipeline-schemas/blob/main/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
104+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
105105
}
106106
},
107107
"required": [
@@ -118,7 +118,7 @@
118118
"label": {
119119
"description": "User-readable name of parameter",
120120
"type": "object",
121-
"$ref": "https://github.com/elyra-ai/pipeline-schemas/blob/main/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
121+
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#/definitions/resource_definition"
122122
},
123123
"type": {
124124
"description": "The type of the parameter.",

common-canvas/palette/palette-v3-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"type": "object",
4+
"title": "Pipeline Flow Palette",
45
"description": "Common Canvas palette schema",
56
"id": "https://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v3-schema.json",
67
"properties": {

common-canvas/parameter-defs/parameter-defs-v3-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-canvas/parameter-defs/parameter-defs-v3-schema.json",
4-
"title": "Property Definitions Schema",
5-
"description": "Watson Data Platform Property Definition Schema for the Common Properties editor",
4+
"title": "Parameter Definitions",
5+
"description": "Parameter Definition Schema for the Common Properties editor",
66
"type": "object",
77
"properties": {
88
"titleDefinition": {

common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json",
4-
"title": "Watson Data Platform Datarecord Metadata Schema",
5-
"description": "Metadata schema for datarecords in the Watson Data Platform",
4+
"title": "Datarecord Metadata Schema",
5+
"description": "Metadata schema for datarecords",
66
"type": "object",
77
"definitions": {
88
"record_schema": {

common-pipeline/operators/categories-v3-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/categories-v3-schema.json#",
4-
"title": "Watson Data Platform Operator Categories Schema",
5-
"description": "Provides category grouping and ordering for runtime environments in the Watson Data Platform",
4+
"title": "Operator Categories Schema",
5+
"description": "Provides category grouping and ordering for runtime environments",
66
"type": "object",
77
"properties": {
88
"json_schema": {

common-pipeline/operators/conditions-v3-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#",
4-
"title": "Watson Data Platform Validation Schema",
5-
"description": "User Interface Condition schema for the Watson Data Platform",
4+
"title": "Conditions",
5+
"description": "Conditions schema for the Common Properties editor",
66
"type": "object",
77
"properties": {
88
"json_schema": {

common-pipeline/operators/operator-v3-schema.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#",
4-
"title": "Watson Data Platform Operator Schema",
5-
"description": "Operator schema for the Watson Data Platform",
4+
"title": "Operators",
5+
"description": "Operators schema for the Common Properties editor",
66
"type": "object",
77
"properties": {
88
"id": {
@@ -45,14 +45,14 @@
4545
"description": "List of complex types",
4646
"type": "array",
4747
"items": {
48-
"$ref": "#/definitions/complex_type_definition"
48+
"$ref": "#/definitions/operator_complex_type_definition"
4949
}
5050
},
5151
"parameters": {
5252
"description": "List of parameters",
5353
"type": "array",
5454
"items": {
55-
"$ref": "#/definitions/parameter_definition"
55+
"$ref": "#/definitions/operator_parameter_definition"
5656
}
5757
},
5858
"app_data": {
@@ -65,8 +65,8 @@
6565
"parameters"
6666
],
6767
"definitions": {
68-
"parameter_definition": {
69-
"description": "Operator parameters definition",
68+
"operator_parameter_definition": {
69+
"description": "Operator parameters definition. Documented here - https://elyra-ai.github.io/canvas/04.01-parameter-definition/#parameter-definitions",
7070
"type": "object",
7171
"properties": {
7272
"id": {
@@ -160,7 +160,7 @@
160160
"parameter_ref"
161161
]
162162
},
163-
"complex_type_definition": {
163+
"operator_complex_type_definition": {
164164
"description": "Structure for complex parameters",
165165
"type": "object",
166166
"properties": {
@@ -173,18 +173,18 @@
173173
"type": "string"
174174
},
175175
"key_definition": {
176-
"$ref": "#/definitions/parameter_definition"
176+
"$ref": "#/definitions/operator_parameter_definition"
177177
},
178178
"parameters": {
179179
"description": "List of parameters",
180180
"type": "array",
181181
"items": {
182182
"anyOf": [
183183
{
184-
"$ref": "#/definitions/parameter_definition"
184+
"$ref": "#/definitions/operator_parameter_definition"
185185
},
186186
{
187-
"$ref": "#/definitions/complex_type_definition"
187+
"$ref": "#/definitions/operator_complex_type_definition"
188188
}
189189
]
190190
}
@@ -223,14 +223,14 @@
223223
"description": "List of parameters",
224224
"type": "array",
225225
"items": {
226-
"$ref": "#/definitions/parameter_definition"
226+
"$ref": "#/definitions/operator_parameter_definition"
227227
}
228228
},
229229
"complex_types": {
230230
"description": "List of complex types",
231231
"type": "array",
232232
"items": {
233-
"$ref": "#/definitions/complex_type_definition"
233+
"$ref": "#/definitions/operator_complex_type_definition"
234234
}
235235
}
236236
}

common-pipeline/operators/runtime-v3-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft-04/schema#",
33
"id": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/runtime-v3-schema.json#",
4-
"title": "Watson Data Platform Runtime Schema",
5-
"description": "Provides runtime environment information in the Watson Data Platform",
4+
"title": "Runtime Schema",
5+
"description": "Provides runtime environment information",
66
"type": "object",
77
"properties": {
88
"json_schema": {

0 commit comments

Comments
 (0)