Skip to content

Commit

Permalink
test: update test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
RutZap committed Feb 11, 2025
1 parent bdb02a0 commit 6c87093
Show file tree
Hide file tree
Showing 10 changed files with 317 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tools/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,13 @@ func getPageInfoResponses() []*toolsproto.ResponseFieldConfig {
Visible: false,
Scope: toolsproto.ResponseFieldConfig_PAGINATION,
},
{
FieldLocation: &toolsproto.JsonPath{Path: "$.pageInfo.pageNumber"},
FieldType: proto.Type_TYPE_INT,
DisplayName: "Page Number",
Visible: false,
Scope: toolsproto.ResponseFieldConfig_PAGINATION,
},
}
}

Expand All @@ -965,7 +972,7 @@ func inferInputType(actionType proto.ActionType, fieldName string) toolsproto.Re
return toolsproto.RequestFieldConfig_FILTERS
case "orderBy":
return toolsproto.RequestFieldConfig_SORTING
case "first", "after", "last", "before":
case "first", "after", "last", "before", "limit", "offset":
return toolsproto.RequestFieldConfig_PAGINATION
}
case proto.ActionType_ACTION_TYPE_UPDATE:
Expand Down
90 changes: 89 additions & 1 deletion tools/testdata/blog/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -644,6 +660,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down Expand Up @@ -813,6 +835,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -852,6 +890,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down Expand Up @@ -989,12 +1033,28 @@
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.orderBy" },
"fieldType": "TYPE_UNION",
"repeated": true,
"displayName": "Order by",
"displayOrder": 5,
"displayOrder": 7,
"visible": true,
"scope": "SORTING"
}
Expand Down Expand Up @@ -1036,6 +1096,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down Expand Up @@ -1274,6 +1340,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -1313,6 +1395,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down
44 changes: 44 additions & 0 deletions tools/testdata/config_use_api/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -463,6 +479,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down Expand Up @@ -616,6 +638,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -655,6 +693,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down
22 changes: 22 additions & 0 deletions tools/testdata/entry_activity_actions/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -341,6 +357,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down
22 changes: 22 additions & 0 deletions tools/testdata/input_get_entry_actions/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -421,6 +437,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -261,6 +277,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down
22 changes: 22 additions & 0 deletions tools/testdata/input_lookup_actions/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@
"displayOrder": 4,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.limit" },
"fieldType": "TYPE_INT",
"displayName": "Limit",
"displayOrder": 5,
"visible": true,
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.offset" },
"fieldType": "TYPE_INT",
"displayName": "Offset",
"displayOrder": 6,
"visible": true,
"scope": "PAGINATION"
}
],
"response": [
Expand Down Expand Up @@ -86,6 +102,12 @@
"displayName": "End cursor",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.pageInfo.pageNumber" },
"fieldType": "TYPE_INT",
"displayName": "Page Number",
"scope": "PAGINATION"
},
{
"fieldLocation": { "path": "$.results" },
"fieldType": "TYPE_OBJECT",
Expand Down
Loading

0 comments on commit 6c87093

Please sign in to comment.