Skip to content

Commit

Permalink
IWF-122: adding new apis
Browse files Browse the repository at this point in the history
  • Loading branch information
Katie Atrops committed Nov 7, 2024
1 parent 3ae5a22 commit 3a48844
Show file tree
Hide file tree
Showing 13 changed files with 696 additions and 10 deletions.
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ Here is the repository layout if you are interested to learn about it:

1. Check out the idl submodule by running the command: `git submodule update --init --recursive`
2. Run the command `git submodule update --remote --merge` to update IDL to the latest commit
3. Run `make idl-code-gen` to refresh the generated code. The command requires to have `openapi-generator` CLI.See
the [openapi-generator doc](https://openapi-generator.tech/docs/installation/) for how to install it. And you may
also need to upgrade it to the latest if it's older than what we are currently using.
3. Run `make idl-code-gen` to refresh the generated code.

# How to run server or integration test

Expand Down
4 changes: 4 additions & 0 deletions gen/iwfidl/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ docs/WorkflowRpcResponse.md
docs/WorkflowSearchRequest.md
docs/WorkflowSearchResponse.md
docs/WorkflowSearchResponseEntry.md
docs/WorkflowSetDataObjectsRequest.md
docs/WorkflowSetSearchAttributesRequest.md
docs/WorkflowSignalRequest.md
docs/WorkflowSkipTimerRequest.md
docs/WorkflowStartOptions.md
Expand Down Expand Up @@ -147,6 +149,8 @@ model_workflow_rpc_response.go
model_workflow_search_request.go
model_workflow_search_response.go
model_workflow_search_response_entry.go
model_workflow_set_data_objects_request.go
model_workflow_set_search_attributes_request.go
model_workflow_signal_request.go
model_workflow_skip_timer_request.go
model_workflow_start_options.go
Expand Down
6 changes: 5 additions & 1 deletion gen/iwfidl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,16 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**ApiV1WorkflowConfigUpdatePost**](docs/DefaultApi.md#apiv1workflowconfigupdatepost) | **Post** /api/v1/workflow/config/update | update the config of a workflow
*DefaultApi* | [**ApiV1WorkflowDataobjectsGetPost**](docs/DefaultApi.md#apiv1workflowdataobjectsgetpost) | **Post** /api/v1/workflow/dataobjects/get | get workflow data objects
*DefaultApi* | [**ApiV1WorkflowDataobjectsGetPost**](docs/DefaultApi.md#apiv1workflowdataobjectsgetpost) | **Post** /api/v1/workflow/dataobjects/get | get workflow data objects aka data attributes
*DefaultApi* | [**ApiV1WorkflowDataobjectsSetPost**](docs/DefaultApi.md#apiv1workflowdataobjectssetpost) | **Post** /api/v1/workflow/dataobjects/set | set workflow data objects aka data attributes
*DefaultApi* | [**ApiV1WorkflowGetPost**](docs/DefaultApi.md#apiv1workflowgetpost) | **Post** /api/v1/workflow/get | get a workflow's status and results(if completed & requested)
*DefaultApi* | [**ApiV1WorkflowGetWithWaitPost**](docs/DefaultApi.md#apiv1workflowgetwithwaitpost) | **Post** /api/v1/workflow/getWithWait | get a workflow's status and results(if completed & requested), wait if the workflow is still running
*DefaultApi* | [**ApiV1WorkflowInternalDumpPost**](docs/DefaultApi.md#apiv1workflowinternaldumppost) | **Post** /api/v1/workflow/internal/dump | dump internal info of a workflow
*DefaultApi* | [**ApiV1WorkflowResetPost**](docs/DefaultApi.md#apiv1workflowresetpost) | **Post** /api/v1/workflow/reset | reset a workflow
*DefaultApi* | [**ApiV1WorkflowRpcPost**](docs/DefaultApi.md#apiv1workflowrpcpost) | **Post** /api/v1/workflow/rpc | execute an RPC of a workflow
*DefaultApi* | [**ApiV1WorkflowSearchPost**](docs/DefaultApi.md#apiv1workflowsearchpost) | **Post** /api/v1/workflow/search | search for workflows by a search attribute query
*DefaultApi* | [**ApiV1WorkflowSearchattributesGetPost**](docs/DefaultApi.md#apiv1workflowsearchattributesgetpost) | **Post** /api/v1/workflow/searchattributes/get | get workflow search attributes
*DefaultApi* | [**ApiV1WorkflowSearchattributesSetPost**](docs/DefaultApi.md#apiv1workflowsearchattributessetpost) | **Post** /api/v1/workflow/searchattributes/set | set workflow search attributes
*DefaultApi* | [**ApiV1WorkflowSignalPost**](docs/DefaultApi.md#apiv1workflowsignalpost) | **Post** /api/v1/workflow/signal | signal a workflow
*DefaultApi* | [**ApiV1WorkflowStartPost**](docs/DefaultApi.md#apiv1workflowstartpost) | **Post** /api/v1/workflow/start | start a workflow
*DefaultApi* | [**ApiV1WorkflowStateDecidePost**](docs/DefaultApi.md#apiv1workflowstatedecidepost) | **Post** /api/v1/workflowState/decide | for invoking WorkflowState.decide API
Expand Down Expand Up @@ -160,6 +162,8 @@ Class | Method | HTTP request | Description
- [WorkflowSearchRequest](docs/WorkflowSearchRequest.md)
- [WorkflowSearchResponse](docs/WorkflowSearchResponse.md)
- [WorkflowSearchResponseEntry](docs/WorkflowSearchResponseEntry.md)
- [WorkflowSetDataObjectsRequest](docs/WorkflowSetDataObjectsRequest.md)
- [WorkflowSetSearchAttributesRequest](docs/WorkflowSetSearchAttributesRequest.md)
- [WorkflowSignalRequest](docs/WorkflowSignalRequest.md)
- [WorkflowSkipTimerRequest](docs/WorkflowSkipTimerRequest.md)
- [WorkflowStartOptions](docs/WorkflowStartOptions.md)
Expand Down
98 changes: 97 additions & 1 deletion gen/iwfidl/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,25 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Invalid input
summary: get workflow data objects
summary: get workflow data objects aka data attributes
/api/v1/workflow/dataobjects/set:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowSetDataObjectsRequest'
responses:
"200":
content: {}
description: successful operation
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Invalid input
summary: set workflow data objects aka data attributes
/api/v1/workflow/searchattributes/get:
post:
requestBody:
Expand All @@ -108,6 +126,24 @@ paths:
$ref: '#/components/schemas/ErrorResponse'
description: Invalid input
summary: get workflow search attributes
/api/v1/workflow/searchattributes/set:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowSetSearchAttributesRequest'
responses:
"200":
content: {}
description: successful operation
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Invalid input
summary: set workflow search attributes
/api/v1/workflow/get:
post:
requestBody:
Expand Down Expand Up @@ -1140,6 +1176,31 @@ components:
$ref: '#/components/schemas/KeyValue'
type: array
type: object
WorkflowSetDataObjectsRequest:
example:
objects:
- value:
data: data
encoding: encoding
key: key
- value:
data: data
encoding: encoding
key: key
workflowRunId: workflowRunId
workflowId: workflowId
properties:
workflowId:
type: string
workflowRunId:
type: string
objects:
items:
$ref: '#/components/schemas/KeyValue'
type: array
required:
- workflowId
type: object
WorkflowGetSearchAttributesRequest:
example:
keys:
Expand Down Expand Up @@ -1188,6 +1249,41 @@ components:
$ref: '#/components/schemas/SearchAttribute'
type: array
type: object
WorkflowSetSearchAttributesRequest:
example:
searchAttributes:
- stringValue: stringValue
valueType: null
integerValue: 6
boolValue: true
doubleValue: 7.457744773683766
stringArrayValue:
- stringArrayValue
- stringArrayValue
key: key
- stringValue: stringValue
valueType: null
integerValue: 6
boolValue: true
doubleValue: 7.457744773683766
stringArrayValue:
- stringArrayValue
- stringArrayValue
key: key
workflowRunId: workflowRunId
workflowId: workflowId
properties:
workflowId:
type: string
workflowRunId:
type: string
searchAttributes:
items:
$ref: '#/components/schemas/SearchAttribute'
type: array
required:
- workflowId
type: object
WorkflowGetRequest:
example:
waitTimeSeconds: 0
Expand Down
Loading

0 comments on commit 3a48844

Please sign in to comment.