Skip to content

Commit

Permalink
Define exchange-id and transaction-uuid path parameters in separate f…
Browse files Browse the repository at this point in the history
…iles.
  • Loading branch information
msporny committed Feb 4, 2022
1 parent fdf675e commit 748d5be
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
8 changes: 8 additions & 0 deletions components/parameters/path/ExchangeId.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: exchange-id
description: A potentially human-readable identifier for an exchange.
in: path
required: true
schema:
type: string
minimum: 3
pattern: "[a-z0-9][a-z0-9\\-]{2,}"
6 changes: 6 additions & 0 deletions components/parameters/path/TransactionUuid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
in: path
name: transaction-uuid
required: true
schema:
type: string
pattern: "([0-9a-f]{8}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{12}){0,1}"
24 changes: 3 additions & 21 deletions holder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,7 @@ paths:
the request, it returns a Verifiable Presentation Request. A request
that the server cannot understand results in an error.
parameters:
- in: path
name: exchange-id
required: true
schema:
type: string
minimum: 3
pattern: "[a-z0-9\\-]{3,}"
- $ref: "./components/parameters/path/ExchangeId.yml"
requestBody:
description:
Information related to the type of exchange the client would like
Expand Down Expand Up @@ -120,20 +114,8 @@ paths:
Presentation Request. A request that the server cannot understand
results in an error.
parameters:
- in: path
name: exchange-id
description:
A human readable exchange type identifier such as "diplomas".
required: true
schema:
type: string
pattern: "[a-z0-9\\-]{3,}"
- in: path
name: transaction-uuid
required: true
schema:
type: string
pattern: "([0-9a-f]{8}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{12}){0,1}"
- $ref: "./components/parameters/path/ExchangeId.yml"
- $ref: "./components/parameters/path/TransactionUuid.yml"
requestBody:
description:
A Verifiable Presentation.
Expand Down

0 comments on commit 748d5be

Please sign in to comment.