Skip to content

Commit

Permalink
Add path parameters, remove unneeded template per code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
wes-smith committed May 29, 2024
1 parent c4f4b2e commit f93bbce
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
7 changes: 7 additions & 0 deletions components/parameters/path/LocalExchangeId.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: local-exchange-id
description: A local identifier for an exchange instance.
in: path
required: true
schema:
type: string
pattern: "[a-z0-9][a-z0-9\\-]{2,}"
7 changes: 7 additions & 0 deletions components/parameters/path/LocalWorkflowId.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: local-workflow-id
description: A local identifier for a workflow instance.
in: path
required: true
schema:
type: string
pattern: "[a-z0-9][a-z0-9\\-]{2,}"
20 changes: 8 additions & 12 deletions exchanges.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
version: "0.0.3-unstable"
title: VC Exchanges API
title: VC Exchanges and Workflows API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
Expand Down Expand Up @@ -50,6 +50,8 @@ paths:
- zCap: []
operationId: getWorkflowConfiguration
description: Gets the configuration of an existing workflow and returns it in the response body.
parameters:
- $ref: "./components/parameters/path/LocalWorkflowId.yml"
responses:
"200":
description: Workflow configuration retrieved!
Expand All @@ -74,6 +76,8 @@ paths:
- zCap: []
operationId: createExchange
description: Creates a new exchange and returns exchangeId and time to live in the response body.
parameters:
- $ref: "./components/parameters/path/LocalWorkflowId.yml"
requestBody:
content:
application/json:
Expand Down Expand Up @@ -103,6 +107,9 @@ paths:
- zCap: []
operationId: getExchangeConfiguration
description: Gets the configuration of an existing exchange and returns it in the response body.
parameters:
- $ref: "./components/parameters/path/LocalWorkflowId.yml"
- $ref: "./components/parameters/path/LocalExchangeId.yml"
responses:
"200":
description: Exchange configuration retrieved!
Expand Down Expand Up @@ -350,17 +357,6 @@ components:
properties:
stepTemplate:
$ref: "#/components/schemas/StepTemplate"
VerifiableCredentialTemplate:
type: object
additionalProperties: false
description: A Verifiable Credential template.
properties:
type:
type: string
description: The type of template.
template:
type: string
description: The VC template.
StepTemplate:
type: object
additionalProperties: false
Expand Down

0 comments on commit f93bbce

Please sign in to comment.