Skip to content

Commit

Permalink
restrict list type children (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Vitalii Bedletskyi <[email protected]>
  • Loading branch information
taras-dubyk and VitaliiBedletskyi authored Dec 19, 2024
1 parent 51bf6ff commit c9eda21
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 155 deletions.
177 changes: 24 additions & 153 deletions properties_pane/defaultData.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,123 +28,47 @@
"childType": "object"
},
"field": {
"hackoladeMeta": {
"subtype": {
"valueDependencies": [
{
"value": {
"disableAdd": false
},
"value": "inputList",
"dependency": {
"key": "childType",
"value": "type"
}
},
{
"value": {
"disableAppend": true,
"disableDelete": true,
"disableAdd": true,
"disableReference": true
},
"dependency": {
"type": "and",
"type": "or",
"values": [
{
"key": "childType",
"value": "expression"
"type": "and",
"values": [
{
"key": "childType",
"value": "List"
},
{
"level": "parent",
"key": "childType",
"value": "input"
}
]
},
{
"level": "parent",
"key": "childType",
"value": "link"
"key": "subtype",
"value": "inputList"
}
]
}
},
{
"value": {
"disableAppend": true,
"disableReference": false
},
"dependency": {
"level": "parent",
"key": "subtype",
"value": "structuralSchema"
}
},
{
"value": {
"disableAdd": false,
"disableDelete": false,
"disableAppend": true,
"resetInsteadOfDelete": true,
"disableChoices": true
},
"dependency": [
{
"key": "subtype",
"value": "anyParameter"
}
]
},
}
]
},
"hackoladeMeta": {
"valueDependencies": [
{
"value": {
"disableDelete": false,
"disableAppend": false,
"resetInsteadOfDelete": false,
"displayNameFromField": false
"disableAdd": false
},
"dependency": {
"level": "parent",
"key": "childType",
"value": "type"
}
},
{
"value": {
"disableReference": true
},
"dependency": {
"key": "childType",
"value": "media"
}
},
{
"value": {
"disableAppend": false,
"disableDelete": false,
"disableReference": false,
"resetInsteadOfDelete": false
},
"dependency": {
"level": "parent",
"key": "subtype",
"value": "schema"
}
},
{
"value": {
"disableAppend": true,
"disableReference": true
},
"dependency": [
{
"type": "and",
"values": [
{
"key": "childType",
"value": "object"
},
{
"type": "not",
"values": {
"key": "subtype",
"value": "schema"
}
}
]
}
]
}
]
},
Expand Down Expand Up @@ -199,63 +123,10 @@
"key": "childType",
"value": "directive"
}
},

{
"value": "application/json",
"dependency": {
"level": "parent",
"key": "subtype",
"value": "media"
}
},
{
"value": "response",
"dependency": {
"level": "parent",
"key": "subtype",
"value": "response"
}
},
{
"value": "parameterName",
"dependency": {
"level": "parent",
"key": "subtype",
"value": "anyParameter"
}
},
{
"value": "schema",
"dependency": {
"level": "parent",
"key": "subtype",
"value": "structuralSchema"
}
},
{
"value": "schema",
"dependency": {
"level": "parent",
"key": "type",
"value": "subschema"
}
}
]
},
"schemeType": "apiKey",
"required": {
"valueDependencies": [
{
"value": true,
"dependency": {
"key": "childType",
"value": "parameter (path)"
}
}
],
"value": false
}
"schemeType": "apiKey"
},
"patternField": {
"name": "^New Pattern Field$"
Expand Down
40 changes: 38 additions & 2 deletions types/List.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,48 @@
"useSample": true,
"hiddenOnEntity": "view",
"defaultValues": {
"subtype": "list<str>",
"properties": [],
"primaryKey": false,
"additionalItems": true,
"minItems": "",
"maxItems": "",
"uniqueItems": false
"uniqueItems": false,
"subtype": "outputList"
},
"subtypes": {
"outputList": {
"childValueType": [
"String",
"ID",
"Int",
"Float",
"Boolean",
"List",
"reference"
],
"childReferenceValueType": [
"object",
"interface",
"union",
"enum",
"scalar"
]
},
"inputList": {
"childValueType": [
"String",
"ID",
"Int",
"Float",
"Boolean",
"List",
"reference"
],
"childReferenceValueType": [
"input",
"enum",
"scalar"
]
}
}
}

0 comments on commit c9eda21

Please sign in to comment.