From b27d0819c0d1e9c8b976c19bfb6076475c804a6c Mon Sep 17 00:00:00 2001 From: wes-smith Date: Tue, 16 Jul 2024 14:53:51 -0400 Subject: [PATCH 1/4] Allow initiation of exchange to contain a VPR. - allows a client to get information about what the server will need to complete an exchange before making calls that might result in issuance. --- exchanges.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/exchanges.yml b/exchanges.yml index adde76f..7fff793 100644 --- a/exchanges.yml +++ b/exchanges.yml @@ -131,7 +131,11 @@ paths: "500": description: Internal Error post: - summary: Participate in an exchange. Posting an empty body will start the exchange or return what the exchange is expecting to complete the next step. + summary: Participate in an exchange. Posting an empty body will start the exchange or return + what the exchange is expecting to complete the next step. Posting a Verifiable Presentation Request with `query.type` + set to "VerifiablePresentationRequest" to start the exchange will result in either a Verifiable Presentation Request + response from the server, if the server will need a Verifiable Presentation from the client during the exchange, or a + 400 error if the server will issue in response to an empty body. tags: - Credentials security: @@ -148,9 +152,15 @@ paths: content: application/json: schema: - properties: - verifiablePresentation: - $ref: "./components/VerifiablePresentation.yml#/components/schemas/VerifiablePresentation" + oneOf: + - type: object + properties: + verifiablePresentationRequest: + $ref: "./components/VerifiablePresentationRequest.yml#/components/schemas/VerifiablePresentationRequest" + - type: object + properties: + verifiablePresentation: + $ref: "./components/VerifiablePresentation.yml#/components/schemas/VerifiablePresentation" responses: "200": description: Exchange progressed. From 62539eda139fafed02a15e57e28c53788a5f7e66 Mon Sep 17 00:00:00 2001 From: wes-smith Date: Tue, 16 Jul 2024 15:15:23 -0400 Subject: [PATCH 2/4] Reword description of posting VPR to initiate exchange. --- exchanges.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exchanges.yml b/exchanges.yml index 7fff793..9863b2f 100644 --- a/exchanges.yml +++ b/exchanges.yml @@ -132,10 +132,10 @@ paths: description: Internal Error post: summary: Participate in an exchange. Posting an empty body will start the exchange or return - what the exchange is expecting to complete the next step. Posting a Verifiable Presentation Request with `query.type` - set to "VerifiablePresentationRequest" to start the exchange will result in either a Verifiable Presentation Request - response from the server, if the server will need a Verifiable Presentation from the client during the exchange, or a - 400 error if the server will issue in response to an empty body. + what the exchange is expecting to complete the next step. Posting a Verifiable Presentation Request + to start the exchange will result in either a Verifiable Presentation Request response from the server, + if the server will need a Verifiable Presentation from the client during the exchange, or a + 4XX error if the server will issue in response to an empty body. tags: - Credentials security: From 05cbd2ef9f5a2ee36f3fbd5506978386888cd54b Mon Sep 17 00:00:00 2001 From: Manu Sporny Date: Tue, 16 Jul 2024 15:25:34 -0400 Subject: [PATCH 3/4] Clarify return types for exchange initiation. --- exchanges.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/exchanges.yml b/exchanges.yml index 9863b2f..308886e 100644 --- a/exchanges.yml +++ b/exchanges.yml @@ -133,9 +133,8 @@ paths: post: summary: Participate in an exchange. Posting an empty body will start the exchange or return what the exchange is expecting to complete the next step. Posting a Verifiable Presentation Request - to start the exchange will result in either a Verifiable Presentation Request response from the server, - if the server will need a Verifiable Presentation from the client during the exchange, or a - 4XX error if the server will issue in response to an empty body. + to start the exchange will result in either a Verifiable Presentation or a Verifiable + Presentation Request that conforms to the client's request, or a 4xx error. tags: - Credentials security: From cedf79ea8e46bd2d2663e5c7ad3266f37c48247d Mon Sep 17 00:00:00 2001 From: Manu Sporny Date: Tue, 16 Jul 2024 15:30:28 -0400 Subject: [PATCH 4/4] Fix grammar in initiation of exchange that contains a VPR. Co-authored-by: Ted Thibodeau Jr --- exchanges.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/exchanges.yml b/exchanges.yml index 308886e..42c68d8 100644 --- a/exchanges.yml +++ b/exchanges.yml @@ -132,8 +132,7 @@ paths: description: Internal Error post: summary: Participate in an exchange. Posting an empty body will start the exchange or return - what the exchange is expecting to complete the next step. Posting a Verifiable Presentation Request - to start the exchange will result in either a Verifiable Presentation or a Verifiable + to start the exchange will result in either a Verifiable Presentation, a Verifiable Presentation Request that conforms to the client's request, or a 4xx error. tags: - Credentials