From 7b4a55ad4d8bc52ca4983d61a7a2bf3c9df797b1 Mon Sep 17 00:00:00 2001 From: BigBlueHat Date: Tue, 29 Oct 2024 16:04:23 -0400 Subject: [PATCH 1/3] Add `state` & `variables` to GetExhangeResponse. --- exchanges.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/exchanges.yml b/exchanges.yml index 87573e0..b26e9a4 100644 --- a/exchanges.yml +++ b/exchanges.yml @@ -400,6 +400,21 @@ components: description: The steps completed by the exchange previously. items: type: string + state: + type: string + description: The status ("pending" | "complete" | "invalid") of the exchange, set to "pending" on creation. + variables: + type: array + description: Template variables to be used in the exchange. + items: + type: object + properties: + type: + type: string + description: The type of template. + template: + type: string + description: The template itself. WorkflowStep: type: object description: Object containing information about a workflow step. From dd9a48292cc0ee986bca81f67e4c6c611e966095 Mon Sep 17 00:00:00 2001 From: BigBlueHat Date: Tue, 29 Oct 2024 20:12:51 +0000 Subject: [PATCH 2/3] Put exchange response in `exchange` key. --- exchanges.yml | 60 +++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/exchanges.yml b/exchanges.yml index b26e9a4..1cfd513 100644 --- a/exchanges.yml +++ b/exchanges.yml @@ -386,35 +386,39 @@ components: additionalProperties: false description: Object containing information about an active exchange. properties: - exchangeId: - type: string - description: The URL that uniquely identifies the exchange. - ttl: - type: string - description: The time to live for the exchange. - nextStep: - type: string - description: The interaction the exchange is expecting to happen next. - completedSteps: - type: array - description: The steps completed by the exchange previously. - items: - type: string - state: - type: string - description: The status ("pending" | "complete" | "invalid") of the exchange, set to "pending" on creation. - variables: - type: array - description: Template variables to be used in the exchange. - items: - type: object - properties: - type: - type: string - description: The type of template. - template: + exchange: + type: object + description: The active exchange. + properties: + exchangeId: + type: string + description: The URL that uniquely identifies the exchange. + ttl: + type: string + description: The time to live for the exchange. + nextStep: + type: string + description: The interaction the exchange is expecting to happen next. + completedSteps: + type: array + description: The steps completed by the exchange previously. + items: type: string - description: The template itself. + state: + type: string + description: The status ("pending" | "complete" | "invalid") of the exchange, set to "pending" on creation. + variables: + type: array + description: Template variables to be used in the exchange. + items: + type: object + properties: + type: + type: string + description: The type of template. + template: + type: string + description: The template itself. WorkflowStep: type: object description: Object containing information about a workflow step. From 41a25c14301b2d3b9910b7d1a7b946c42dd88725 Mon Sep 17 00:00:00 2001 From: BigBlueHat Date: Wed, 30 Oct 2024 09:46:15 -0400 Subject: [PATCH 3/3] Apply @dlongley suggestions from review. Co-authored-by: Dave Longley --- exchanges.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/exchanges.yml b/exchanges.yml index 1cfd513..e116722 100644 --- a/exchanges.yml +++ b/exchanges.yml @@ -390,35 +390,21 @@ components: type: object description: The active exchange. properties: - exchangeId: + id: type: string - description: The URL that uniquely identifies the exchange. + description: The local exchange ID that identifies the exchange. ttl: type: string description: The time to live for the exchange. - nextStep: + step: type: string - description: The interaction the exchange is expecting to happen next. - completedSteps: - type: array - description: The steps completed by the exchange previously. - items: - type: string + description: The current step in the exchange. state: type: string description: The status ("pending" | "complete" | "invalid") of the exchange, set to "pending" on creation. variables: - type: array + type: object description: Template variables to be used in the exchange. - items: - type: object - properties: - type: - type: string - description: The type of template. - template: - type: string - description: The template itself. WorkflowStep: type: object description: Object containing information about a workflow step.