diff --git a/components/parameters/path/ExchangeId.yml b/components/parameters/path/ExchangeId.yml new file mode 100644 index 00000000..5f58676e --- /dev/null +++ b/components/parameters/path/ExchangeId.yml @@ -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,}" diff --git a/components/parameters/path/TransactionUuid.yml b/components/parameters/path/TransactionUuid.yml new file mode 100644 index 00000000..1aa2c3df --- /dev/null +++ b/components/parameters/path/TransactionUuid.yml @@ -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}" diff --git a/holder.yml b/holder.yml index 01e461d2..9ea01a28 100644 --- a/holder.yml +++ b/holder.yml @@ -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 @@ -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.