Skip to content
Open
Show file tree
Hide file tree
Changes from 15 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
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ http-api-docs:
--openapiv2_out=openapi \
--openapiv2_opt=allow_merge=true,merge_file_name=openapiv2,simple_operation_ids=true \
temporal/api/workflowservice/v1/* \
temporal/api/applicationservice/v1/* \
temporal/api/operatorservice/v1/*

jq --rawfile desc $(OAPI_OUT)/payload_description.txt < $(OAPI_OUT)/openapiv2.swagger.json '.definitions.v1Payload={description: $$desc}' > $(OAPI_OUT)/v2.tmp
Expand Down Expand Up @@ -131,6 +132,7 @@ nexus-rpc-yaml: nexus-rpc-yaml-install
--nexus-rpc-yaml_opt=include_operation_tags=exposed \
--nexus-rpc-yaml_out=. \
temporal/api/workflowservice/v1/* \
temporal/api/applicationservice/v1/* \
temporal/api/operatorservice/v1/*

nexus-rpc-yaml-install:
Expand Down
1 change: 1 addition & 0 deletions api-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

- included_paths:
- "**/workflowservice/v1/service.proto"
- "**/workflownexusservice/v1/service.proto"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "**/workflownexusservice/v1/service.proto"
- "**/applicationservice/v1/service.proto"

- "**/operatorservice/v1/service.proto"
disabled_rules:
- "core::0127::resource-name-extraction" # We extract specific fields in URL since the gRPC API predates the HTTP API -- https://linter.aip.dev/127/resource-name-extraction
Expand Down
17 changes: 17 additions & 0 deletions nexus/temporal-proto-models-nexusrpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,20 @@ services:
$pythonRef: temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse
$rubyRef: Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionResponse
$typescriptRef: '@temporalio/api/workflowservice/v1.SignalWithStartWorkflowExecutionResponse'
temporal.api.applicationservice.v1.ApplicationService:
operations:
GetWorkflowExecutionResult:
input:
$dotnetRef: Temporalio.Api.Applicationservice.V1.GetWorkflowExecutionResultRequest
$goRef: go.temporal.io/api/applicationservice/v1.GetWorkflowExecutionResultRequest
$javaRef: io.temporal.api.applicationservice.v1.GetWorkflowExecutionResultRequest
$pythonRef: temporalio.api.applicationservice.v1.GetWorkflowExecutionResultRequest
$rubyRef: Temporalio::Api::Applicationservice::V1::GetWorkflowExecutionResultRequest
$typescriptRef: '@temporalio/api/applicationservice/v1.GetWorkflowExecutionResultRequest'
output:
$dotnetRef: Temporalio.Api.Applicationservice.V1.GetWorkflowExecutionResultResponse
$goRef: go.temporal.io/api/applicationservice/v1.GetWorkflowExecutionResultResponse
$javaRef: io.temporal.api.applicationservice.v1.GetWorkflowExecutionResultResponse
$pythonRef: temporalio.api.applicationservice.v1.GetWorkflowExecutionResultResponse
$rubyRef: Temporalio::Api::Applicationservice::V1::GetWorkflowExecutionResultResponse
$typescriptRef: '@temporalio/api/applicationservice/v1.GetWorkflowExecutionResultResponse'
123 changes: 123 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{
"name": "WorkflowService"
},
{
"name": "ApplicationService"
},
{
"name": "OperatorService"
}
Expand Down Expand Up @@ -4193,6 +4196,51 @@
]
}
},
"/api/v1/namespaces/{namespace}/workflows/{execution.workflowId}/wait-for-external-workflow": {
"post": {
"summary": "GetWorkflowExecutionResult asynchronously waits for an external workflow to complete.",
"operationId": "GetWorkflowExecutionResult2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetWorkflowExecutionResultResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "execution.workflowId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApplicationServiceGetWorkflowExecutionResultBody"
}
}
],
"tags": [
"ApplicationService"
]
}
},
"/api/v1/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/cancel": {
"post": {
"summary": "RequestCancelWorkflowExecution is called by workers when they want to request cancellation of\na workflow execution.",
Expand Down Expand Up @@ -9682,6 +9730,51 @@
]
}
},
"/namespaces/{namespace}/workflows/{execution.workflowId}/wait-for-external-workflow": {
"post": {
"summary": "GetWorkflowExecutionResult asynchronously waits for an external workflow to complete.",
"operationId": "GetWorkflowExecutionResult",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetWorkflowExecutionResultResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "execution.workflowId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApplicationServiceGetWorkflowExecutionResultBody"
}
}
],
"tags": [
"ApplicationService"
]
}
},
"/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/cancel": {
"post": {
"summary": "RequestCancelWorkflowExecution is called by workers when they want to request cancellation of\na workflow execution.",
Expand Down Expand Up @@ -10623,6 +10716,21 @@
}
},
"definitions": {
"ApplicationServiceGetWorkflowExecutionResultBody": {
"type": "object",
"properties": {
"execution": {
"type": "object",
"properties": {
"runId": {
"type": "string"
}
},
"description": "The workflow execution to wait for.",
"title": "The workflow execution to wait for."
}
}
},
"CallbackInfoActivityClosed": {
"type": "object",
"description": "Trigger for when the activity is closed."
Expand Down Expand Up @@ -15770,6 +15878,21 @@
}
}
},
"v1GetWorkflowExecutionResultResponse": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/v1WorkflowExecutionStatus",
"description": "The status of the workflow execution being waited on. This is needed to determine whether the workflow completed successfully or failed."
},
"result": {
"$ref": "#/definitions/v1Payload"
},
"failure": {
"$ref": "#/definitions/v1Failure"
}
}
},
"v1Header": {
"type": "object",
"properties": {
Expand Down
136 changes: 136 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3766,6 +3766,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/wait-for-external-workflow:
post:
tags:
- ApplicationService
description: |-
GetWorkflowExecutionResult asynchronously waits for an external workflow to complete.

(-- api-linter: core::0136::prepositions=disabled
aip.dev/not-precedent: GetWorkflowExecutionResult is the established name for this operation. --)
(-- api-linter: core::0131::http-body=disabled
aip.dev/not-precedent: This is an async long-poll, not a standard Get; it carries a request body. --)
(-- api-linter: core::0131::http-method=disabled
aip.dev/not-precedent: POST is used to allow a request body for the long-poll wait. --)
(-- api-linter: core::0131::http-uri-name=disabled
aip.dev/not-precedent: Uses a custom verb path for the wait operation. --)
(-- api-linter: core::0131::method-signature=disabled
aip.dev/not-precedent: Request has no `name` field; identifies the workflow by namespace + execution. --)
(-- api-linter: core::0131::response-message-name=disabled
aip.dev/not-precedent: Returns a dedicated response message, not the workflow resource itself. --)
(-- api-linter: core::0127::resource-name-extraction=disabled
aip.dev/not-precedent: Path variables use existing workflow_id field, not AIP-122 resource names. --)
operationId: GetWorkflowExecutionResult
parameters:
- name: namespace
in: path
required: true
schema:
type: string
- name: execution.workflow_id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowExecutionResultRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowExecutionResultResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/namespaces/{namespace}/workflows/{workflowId}:
post:
tags:
Expand Down Expand Up @@ -8723,6 +8775,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
/namespaces/{namespace}/workflows/{execution.workflow_id}/wait-for-external-workflow:
post:
tags:
- ApplicationService
description: |-
GetWorkflowExecutionResult asynchronously waits for an external workflow to complete.

(-- api-linter: core::0136::prepositions=disabled
aip.dev/not-precedent: GetWorkflowExecutionResult is the established name for this operation. --)
(-- api-linter: core::0131::http-body=disabled
aip.dev/not-precedent: This is an async long-poll, not a standard Get; it carries a request body. --)
(-- api-linter: core::0131::http-method=disabled
aip.dev/not-precedent: POST is used to allow a request body for the long-poll wait. --)
(-- api-linter: core::0131::http-uri-name=disabled
aip.dev/not-precedent: Uses a custom verb path for the wait operation. --)
(-- api-linter: core::0131::method-signature=disabled
aip.dev/not-precedent: Request has no `name` field; identifies the workflow by namespace + execution. --)
(-- api-linter: core::0131::response-message-name=disabled
aip.dev/not-precedent: Returns a dedicated response message, not the workflow resource itself. --)
(-- api-linter: core::0127::resource-name-extraction=disabled
aip.dev/not-precedent: Path variables use existing workflow_id field, not AIP-122 resource names. --)
operationId: GetWorkflowExecutionResult
parameters:
- name: namespace
in: path
required: true
schema:
type: string
- name: execution.workflow_id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowExecutionResultRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowExecutionResultResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/namespaces/{namespace}/workflows/{workflowId}:
post:
tags:
Expand Down Expand Up @@ -12197,6 +12301,36 @@ components:
type: string
description: Will be set if there are more history events than were included in this response
format: bytes
GetWorkflowExecutionResultRequest:
type: object
properties:
namespace:
type: string
execution:
allOf:
- $ref: '#/components/schemas/WorkflowExecution'
description: The workflow execution to wait for.
GetWorkflowExecutionResultResponse:
type: object
properties:
status:
enum:
- WORKFLOW_EXECUTION_STATUS_UNSPECIFIED
- WORKFLOW_EXECUTION_STATUS_RUNNING
- WORKFLOW_EXECUTION_STATUS_COMPLETED
- WORKFLOW_EXECUTION_STATUS_FAILED
- WORKFLOW_EXECUTION_STATUS_CANCELED
- WORKFLOW_EXECUTION_STATUS_TERMINATED
- WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW
- WORKFLOW_EXECUTION_STATUS_TIMED_OUT
- WORKFLOW_EXECUTION_STATUS_PAUSED
type: string
description: The status of the workflow execution being waited on. This is needed to determine whether the workflow completed successfully or failed.
format: enum
result:
$ref: '#/components/schemas/Payload'
failure:
$ref: '#/components/schemas/Failure'
GoogleProtobufAny:
type: object
properties:
Expand Down Expand Up @@ -20409,6 +20543,8 @@ components:
Represents the identifier used by a workflow author to define the workflow. Typically, the
name of a function. This is sometimes referred to as the workflow's "name"
tags:
- name: ApplicationService
description: ApplicationService API defines how Temporal SDKs and other clients interact with the Temporal server.
- name: OperatorService
description: |-
OperatorService API defines how Temporal SDKs and other clients interact with the Temporal server
Expand Down
Loading
Loading