Skip to content

Commit

Permalink
feat: add alternative schema for array items in RunListResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
uniqueg committed Apr 12, 2023
1 parent 6e6327f commit 9e2f986
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions openapi/workflow_execution_service.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ tags:
x-displayName: RunStatus
description: |
<SchemaDefinition schemaRef="#/components/schemas/RunStatus" />
- name: runsummary_model
x-displayName: RunSummary
description: |
<SchemaDefinition schemaRef="#/components/schemas/RunSummary" />
- name: runrequest_model
x-displayName: RunRequest
description: |
Expand Down Expand Up @@ -111,6 +115,7 @@ x-tagGroups:
- runid_model
- state_model
- runstatus_model
- runsummary_model
- runrequest_model
- runlog_model
- log_model
Expand Down Expand Up @@ -639,7 +644,33 @@ components:
type: string
state:
$ref: '#/components/schemas/State'
description: Small description of a workflow run, returned by server during listing
description: State information of a workflow run
RunSummary:
title: RunSummary
allOf:
- $ref: '#/components/schemas/RunStatus'
- type: object
properties:
name:
type: string
description: The workflow name
start_time:
type: string
description: When the run started executing, in ISO 8601 format "%Y-%m-%dT%H:%M:%SZ"
end_time:
type: string
description: When the run stopped executing (completed, failed, or cancelled), in ISO 8601 format "%Y-%m-%dT%H:%M:%SZ"
tags:
type: object
description: Arbitrary key/value tags added by the client during run creation
additionalProperties:
type: string
required:
- name
- start_time
- end_time
- tags
description: Small description of a workflow run
RunRequest:
title: RunRequest
type: object
Expand Down Expand Up @@ -813,12 +844,18 @@ components:
runs:
type: array
items:
$ref: '#/components/schemas/RunStatus'
anyOf:
- $ref: '#/components/schemas/RunStatus'
- $ref: '#/components/schemas/RunSummary'
description: A list of workflow runs that the service has executed or is executing. The list is filtered to only include runs that the caller has permission to see.
next_page_token:
type: string
description: A token which may be supplied as `page_token` in workflow run list request to get the next page of results. An empty string indicates there are no more items to return.
description: The service will return a RunListResponse when receiving a successful RunListRequest.
description: >
The service will return a RunListResponse when receiving a successful RunListRequest.
DEPRECIATION WARNING: The use of `RunStatus` as the schema for `runs` array items will
not be permitted from the next major version of the specification (2.0.0) onwards. We
encourage implementers to use `RunSummary` instead.
ErrorResponse:
title: ErrorResponse
type: object
Expand Down

0 comments on commit 9e2f986

Please sign in to comment.