Skip to content

Commit

Permalink
fix(orchestration): fix missing query params cursor and pageSize (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas committed Apr 25, 2024
1 parent 3775f78 commit f4fc61d
Show file tree
Hide file tree
Showing 15 changed files with 208 additions and 26 deletions.
1 change: 0 additions & 1 deletion ee/orchestration/internal/api/v2/handler_list_triggers.go
Expand Up @@ -13,7 +13,6 @@ import (

func listTriggers(backend api.Backend) func(writer http.ResponseWriter, request *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

query, err := bunpaginate.Extract[triggers.ListTriggersQuery](r, func() (*triggers.ListTriggersQuery, error) {
pageSize, err := bunpaginate.GetPageSize(r)
if err != nil {
Expand Down
34 changes: 34 additions & 0 deletions ee/orchestration/openapi/v2.yaml
Expand Up @@ -27,6 +27,9 @@ paths:
description: List triggers
tags:
- Orchestration
parameters:
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/PageSize'
responses:
200:
description: List of triggers
Expand Down Expand Up @@ -137,6 +140,9 @@ paths:
description: List triggers occurrences
tags:
- Orchestration
parameters:
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/PageSize'
responses:
200:
description: List of triggers occurrences
Expand All @@ -153,6 +159,9 @@ paths:
description: List registered workflows
tags:
- Orchestration
parameters:
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/PageSize'
responses:
200:
description: List of workflows
Expand Down Expand Up @@ -263,6 +272,8 @@ paths:
summary: List instances of a workflow
operationId: v2ListInstances
parameters:
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/PageSize'
- in: query
description: A workflow id
name: workflowID
Expand Down Expand Up @@ -424,6 +435,29 @@ paths:
$ref: '#/components/schemas/V2GetWorkflowInstanceHistoryStageResponse'

components:
parameters:
Cursor:
name: cursor
in: query
description: |
Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
schema:
type: string
example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==
PageSize:
name: pageSize
in: query
description: |
The maximum number of results to return per page.
example: 100
schema:
type: integer
format: int64
minimum: 1
maximum: 1000
schemas:
V2ServerInfo:
type: object
Expand Down
4 changes: 3 additions & 1 deletion releases/sdks/go/.speakeasy/gen.lock
@@ -1,7 +1,7 @@
lockVersion: 2.0.0
id: 7eac0a45-60a2-40bb-9e85-26bd77ec2a6d
management:
docChecksum: 23105794aff37c229c3c414fa37c3882
docChecksum: c7f9692f27dc9c79dfc926d2b65dcc4f
docVersion: v0.0.0
speakeasyVersion: internal
generationVersion: 2.237.2
Expand Down Expand Up @@ -710,9 +710,11 @@ generatedFiles:
- docs/pkg/models/operations/v2getworkflowresponse.md
- docs/pkg/models/operations/v2listinstancesrequest.md
- docs/pkg/models/operations/v2listinstancesresponse.md
- docs/pkg/models/operations/v2listtriggersrequest.md
- docs/pkg/models/operations/v2listtriggersresponse.md
- docs/pkg/models/operations/v2listtriggersoccurrencesrequest.md
- docs/pkg/models/operations/v2listtriggersoccurrencesresponse.md
- docs/pkg/models/operations/v2listworkflowsrequest.md
- docs/pkg/models/operations/v2listworkflowsresponse.md
- docs/pkg/models/operations/v2readtriggerrequest.md
- docs/pkg/models/operations/v2readtriggerresponse.md
Expand Down
Expand Up @@ -3,7 +3,9 @@

## Fields

| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `Running` | **bool* | :heavy_minus_sign: | Filter running instances |
| `WorkflowID` | **string* | :heavy_minus_sign: | A workflow id |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.<br/>Set to the value of next for the next page of results.<br/>Set to the value of previous for the previous page of results.<br/>No other parameters can be set when this parameter is set.<br/> | aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.<br/> | |
| `Running` | **bool* | :heavy_minus_sign: | Filter running instances | |
| `WorkflowID` | **string* | :heavy_minus_sign: | A workflow id | |
Expand Up @@ -3,6 +3,8 @@

## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `TriggerID` | *string* | :heavy_check_mark: | The trigger id |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.<br/>Set to the value of next for the next page of results.<br/>Set to the value of previous for the previous page of results.<br/>No other parameters can be set when this parameter is set.<br/> | aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.<br/> | |
| `TriggerID` | *string* | :heavy_check_mark: | The trigger id | |

0 comments on commit f4fc61d

Please sign in to comment.