Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove starting stateId from start workflow API #25

Merged
merged 2 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gen/iwfidl/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ configuration.go
docs/ChannelRequestStatus.md
docs/CommandCarryOverPolicy.md
docs/CommandCarryOverType.md
docs/CommandCombination.md
docs/CommandRequest.md
docs/CommandResults.md
docs/Context.md
docs/DeciderTriggerType.md
docs/DefaultApi.md
docs/EncodedObject.md
docs/ErrorResponse.md
docs/ErrorSubStatus.md
docs/InterStateChannelCommand.md
docs/InterStateChannelPublishing.md
docs/InterStateChannelResult.md
Expand Down Expand Up @@ -48,6 +50,7 @@ docs/WorkflowSearchRequest.md
docs/WorkflowSearchResponse.md
docs/WorkflowSearchResponseEntry.md
docs/WorkflowSignalRequest.md
docs/WorkflowSkipTimerRequest.md
docs/WorkflowStartOptions.md
docs/WorkflowStartRequest.md
docs/WorkflowStartResponse.md
Expand All @@ -65,12 +68,14 @@ go.sum
model_channel_request_status.go
model_command_carry_over_policy.go
model_command_carry_over_type.go
model_command_combination.go
model_command_request.go
model_command_results.go
model_context.go
model_decider_trigger_type.go
model_encoded_object.go
model_error_response.go
model_error_sub_status.go
model_inter_state_channel_command.go
model_inter_state_channel_publishing.go
model_inter_state_channel_result.go
Expand Down Expand Up @@ -103,6 +108,7 @@ model_workflow_search_request.go
model_workflow_search_response.go
model_workflow_search_response_entry.go
model_workflow_signal_request.go
model_workflow_skip_timer_request.go
model_workflow_start_options.go
model_workflow_start_request.go
model_workflow_start_response.go
Expand All @@ -115,4 +121,5 @@ model_workflow_status.go
model_workflow_stop_request.go
model_workflow_stop_type.go
response.go
test/api_default_test.go
utils.go
2 changes: 1 addition & 1 deletion gen/iwfidl/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.1
6.2.1
6 changes: 5 additions & 1 deletion gen/iwfidl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Each operation can use different server URL defined using `OperationServers` map
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```
```golang
ctx := context.WithValue(context.Background(), iwfidl.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
Expand Down Expand Up @@ -89,19 +89,22 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**ApiV1WorkflowStateDecidePost**](docs/DefaultApi.md#apiv1workflowstatedecidepost) | **Post** /api/v1/workflowState/decide | for invoking WorkflowState.decide API
*DefaultApi* | [**ApiV1WorkflowStateStartPost**](docs/DefaultApi.md#apiv1workflowstatestartpost) | **Post** /api/v1/workflowState/start | for invoking WorkflowState.start API
*DefaultApi* | [**ApiV1WorkflowStopPost**](docs/DefaultApi.md#apiv1workflowstoppost) | **Post** /api/v1/workflow/stop | stop a workflow
*DefaultApi* | [**ApiV1WorkflowTimerSkipPost**](docs/DefaultApi.md#apiv1workflowtimerskippost) | **Post** /api/v1/workflow/timer/skip | skip the timer of a workflow


## Documentation For Models

- [ChannelRequestStatus](docs/ChannelRequestStatus.md)
- [CommandCarryOverPolicy](docs/CommandCarryOverPolicy.md)
- [CommandCarryOverType](docs/CommandCarryOverType.md)
- [CommandCombination](docs/CommandCombination.md)
- [CommandRequest](docs/CommandRequest.md)
- [CommandResults](docs/CommandResults.md)
- [Context](docs/Context.md)
- [DeciderTriggerType](docs/DeciderTriggerType.md)
- [EncodedObject](docs/EncodedObject.md)
- [ErrorResponse](docs/ErrorResponse.md)
- [ErrorSubStatus](docs/ErrorSubStatus.md)
- [InterStateChannelCommand](docs/InterStateChannelCommand.md)
- [InterStateChannelPublishing](docs/InterStateChannelPublishing.md)
- [InterStateChannelResult](docs/InterStateChannelResult.md)
Expand Down Expand Up @@ -134,6 +137,7 @@ Class | Method | HTTP request | Description
- [WorkflowSearchResponse](docs/WorkflowSearchResponse.md)
- [WorkflowSearchResponseEntry](docs/WorkflowSearchResponseEntry.md)
- [WorkflowSignalRequest](docs/WorkflowSignalRequest.md)
- [WorkflowSkipTimerRequest](docs/WorkflowSkipTimerRequest.md)
- [WorkflowStartOptions](docs/WorkflowStartOptions.md)
- [WorkflowStartRequest](docs/WorkflowStartRequest.md)
- [WorkflowStartResponse](docs/WorkflowStartResponse.md)
Expand Down
89 changes: 88 additions & 1 deletion gen/iwfidl/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,24 @@ paths:
$ref: '#/components/schemas/ErrorResponse'
description: Invalid input
summary: reset a workflow
/api/v1/workflow/timer/skip:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowSkipTimerRequest'
responses:
"200":
content: {}
description: successful operation
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Invalid input
summary: skip the timer of a workflow
/api/v1/workflowState/start:
post:
requestBody:
Expand Down Expand Up @@ -450,8 +468,14 @@ components:
detail:
type: string
subStatus:
type: string
$ref: '#/components/schemas/ErrorSubStatus'
type: object
ErrorSubStatus:
enum:
- UNCATEGORIZED_SUB_STATUS
- WORKFLOW_ALREADY_STARTED_SUB_STATUS
- WORKFLOW_NOT_EXISTS_SUB_STATUS
type: string
WorkflowStartRequest:
example:
startStateId: startStateId
Expand Down Expand Up @@ -855,8 +879,10 @@ components:
key: key
workflowStateId: workflowStateId
context:
firstAttemptTimestamp: 6
workflowStartedTimestamp: 0
workflowRunId: workflowRunId
attempt: 1
workflowId: workflowId
stateExecutionId: stateExecutionId
workflowType: workflowType
Expand Down Expand Up @@ -904,6 +930,28 @@ components:
- workflowStateId
- workflowType
type: object
WorkflowSkipTimerRequest:
example:
timerCommandIndex: 0
workflowRunId: workflowRunId
workflowStateExecutionId: workflowStateExecutionId
timerCommandId: timerCommandId
workflowId: workflowId
properties:
workflowId:
type: string
workflowRunId:
type: string
workflowStateExecutionId:
type: string
timerCommandId:
type: string
timerCommandIndex:
type: integer
required:
- workflowId
- workflowStateExecutionId
type: object
WorkflowStateStartResponse:
example:
upsertSearchAttributes:
Expand Down Expand Up @@ -946,6 +994,13 @@ components:
- firingUnixTimestampSeconds: 0
commandId: commandId
deciderTriggerType: null
commandCombinations:
- commandIds:
- commandIds
- commandIds
- commandIds:
- commandIds
- commandIds
interStateChannelCommands:
- channelName: channelName
commandId: commandId
Expand Down Expand Up @@ -1047,8 +1102,10 @@ components:
- timerStatus: null
commandId: commandId
context:
firstAttemptTimestamp: 6
workflowStartedTimestamp: 0
workflowRunId: workflowRunId
attempt: 1
workflowId: workflowId
stateExecutionId: stateExecutionId
workflowType: workflowType
Expand Down Expand Up @@ -1373,6 +1430,13 @@ components:
- firingUnixTimestampSeconds: 0
commandId: commandId
deciderTriggerType: null
commandCombinations:
- commandIds:
- commandIds
- commandIds
- commandIds:
- commandIds
- commandIds
interStateChannelCommands:
- channelName: channelName
commandId: commandId
Expand All @@ -1393,14 +1457,30 @@ components:
items:
$ref: '#/components/schemas/InterStateChannelCommand'
type: array
commandCombinations:
items:
$ref: '#/components/schemas/CommandCombination'
type: array
required:
- deciderTriggerType
type: object
DeciderTriggerType:
enum:
- ALL_COMMAND_COMPLETED
- ANY_COMMAND_COMPLETED
- ANY_COMMAND_COMBINATION_COMPLETED
type: string
CommandCombination:
example:
commandIds:
- commandIds
- commandIds
properties:
commandIds:
items:
type: string
type: array
type: object
CommandResults:
example:
signalResults:
Expand Down Expand Up @@ -1571,8 +1651,10 @@ components:
type: object
Context:
example:
firstAttemptTimestamp: 6
workflowStartedTimestamp: 0
workflowRunId: workflowRunId
attempt: 1
workflowId: workflowId
stateExecutionId: stateExecutionId
properties:
Expand All @@ -1585,6 +1667,11 @@ components:
type: integer
stateExecutionId:
type: string
firstAttemptTimestamp:
format: int64
type: integer
attempt:
type: integer
required:
- commandId
- stateExecutionId
Expand Down
Loading