Repository: TBD54566975/ssi-service
Pull request #258 (2023-01-18 05:12:46)

Adding ListDefinitions endpoint
See title. Pretty straighforward change. 

Note that some formatting seems to be out of sync when running `mage spec`. This change also fixes that. 

codecov-commenter: # [Codecov](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) Report
> Merging [#258](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) (09841b5) into [main](https://codecov.io/gh/TBD54566975/ssi-service/commit/bf882d1990e55f6e4b9e347eedf10eecc5701557?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) (bf882d1) will **decrease** coverage by `0.08%`.
> The diff coverage is `7.69%`.

> :exclamation: Current head 09841b5 differs from pull request most recent head ab1724e. Consider uploading reports for the commit ab1724e to get more accurate results

```diff
@@            Coverage Diff             @@
##             main     #258      +/-   ##
==========================================
- Coverage   24.95%   24.87%   -0.08%     
==========================================
  Files          31       31              
  Lines        3050     3063      +13     
==========================================
+ Hits          761      762       +1     
- Misses       2172     2184      +12     
  Partials      117      117              
```


| [Impacted Files](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | Coverage Δ | |
|---|---|---|
| [pkg/server/router/credential.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvY3JlZGVudGlhbC5nbw==) | `3.57% <ø> (ø)` | |
| [pkg/server/router/did.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvZGlkLmdv) | `7.92% <ø> (ø)` | |
| [pkg/server/router/health.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvaGVhbHRoLmdv) | `0.00% <ø> (ø)` | |
| [pkg/server/router/issuance.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvaXNzdWFuY2UuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/server/router/keystore.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIva2V5c3RvcmUuZ28=) | `12.69% <ø> (ø)` | |
| [pkg/server/router/manifest.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvbWFuaWZlc3QuZ28=) | `9.74% <ø> (ø)` | |
| [pkg/server/router/operation.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvb3BlcmF0aW9uLmdv) | `0.00% <ø> (ø)` | |
| [pkg/server/router/presentation.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvcHJlc2VudGF0aW9uLmdv) | `3.46% <0.00%> (-0.19%)` | :arrow_down: |
| [pkg/server/router/readiness.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvcmVhZGluZXNzLmdv) | `0.00% <ø> (ø)` | |
| [pkg/server/router/schema.go](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975#diff-cGtnL3NlcnZlci9yb3V0ZXIvc2NoZW1hLmdv) | `9.19% <ø> (ø)` | |
| ... and [1 more](https://codecov.io/gh/TBD54566975/ssi-service/pull/258?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | |

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975)


Patch:
diff --git a/doc/swagger.yaml b/doc/swagger.yaml
index 56298ac..bf25f15 100644
--- a/doc/swagger.yaml
+++ b/doc/swagger.yaml
@@ -836,10 +836,13 @@ definitions:
     type: object
   github_com_tbd54566975_ssi-service_pkg_server_router.GetResponseResponse:
     properties:
-      id:
-        type: string
-      response:
+      credential_response:
         $ref: '#/definitions/manifest.CredentialResponse'
+      responseJwt:
+        type: string
+      verifiableCredentials:
+        description: this is an interface type to union Data Integrity and JWT style
+          VCs
     type: object
   github_com_tbd54566975_ssi-service_pkg_server_router.GetResponsesResponse:
     properties:
@@ -884,6 +887,15 @@ definitions:
     - id
     - status
     type: object
+  github_com_tbd54566975_ssi-service_pkg_server_router.ListDefinitionsRequest:
+    type: object
+  github_com_tbd54566975_ssi-service_pkg_server_router.ListDefinitionsResponse:
+    properties:
+      definitions:
+        items:
+          $ref: '#/definitions/exchange.PresentationDefinition'
+        type: array
+    type: object
   github_com_tbd54566975_ssi-service_pkg_server_router.ListIssuanceTemplatesResponse:
     properties:
       issuanceTemplates:
@@ -941,6 +953,13 @@ definitions:
     properties:
       approved:
         type: boolean
+      credential_overrides:
+        additionalProperties:
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride'
+        description: |-
+          Overrides to apply to the credentials that will be created. Keys are the ID that corresponds to an
+          OutputDescriptor.ID from the manifest.
+        type: object
       reason:
         type: string
     type: object
@@ -1049,20 +1068,26 @@ definitions:
         type: boolean
     type: object
   github_com_tbd54566975_ssi-service_pkg_service_issuing.ClaimTemplates:
-    properties:
-      data:
-        additionalProperties: {}
-        description: |-
-          Values may be json path like strings, or any other JSON primitive. Each entry will be used to come up with a
-          claim about the credentialSubject in the credential that will be issued.
-        type: object
+    additionalProperties: {}
     type: object
   github_com_tbd54566975_ssi-service_pkg_service_issuing.CredentialTemplate:
     properties:
+      credentialInputDescriptor:
+        description: |-
+          Optional.
+          When present, it's the ID of the input descriptor in the application. Corresponds to one of the
+          PresentationDefinition.InputDescriptors[].ID in the credential manifest. When creating a credential, the base
+          data will be populated from the provided submission that matches this ID.
+          When absent, there will be no base data for the credentials created. Additionally, no JSON path strings in
+          ClaimTemplates.Data will be resolved.
+        type: string
       data:
         allOf:
-        - $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuing.CredentialTemplateData'
-        description: Date that will be used to determine credential claims.
+        - $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuing.ClaimTemplates'
+        description: |-
+          Data that will be used to determine credential claims.
+          Values may be json path like strings, or any other JSON primitive. Each entry will be used to come up with a
+          claim about the credentialSubject in the credential that will be issued.
       expiry:
         allOf:
         - $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuing.TimeLike'
@@ -1077,18 +1102,6 @@ definitions:
         description: ID of the CredentialSchema to be used for the issued credential.
         type: string
     type: object
-  github_com_tbd54566975_ssi-service_pkg_service_issuing.CredentialTemplateData:
-    properties:
-      claims:
-        allOf:
-        - $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuing.ClaimTemplates'
-        description: The set of information that will be used to create claims.
-      credentialInputDescriptor:
-        description: |-
-          Optional. When present, it's the ID of the input descriptor in the application. Corresponds to one of the
-          PresentationDefinition.InputDescriptors[].ID in the credential manifest.
-        type: string
-    type: object
   github_com_tbd54566975_ssi-service_pkg_service_issuing.IssuanceTemplate:
     properties:
       credentialManifest:
@@ -1119,6 +1132,19 @@ definitions:
         description: For fixed time in the future.
         type: string
     type: object
+  github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride:
+    properties:
+      data:
+        additionalProperties: {}
+        description: Data that will be used to determine credential claims.
+        type: object
+      expiry:
+        description: Parameter to determine the expiry of the credential.
+        type: string
+      revocable:
+        description: Whether the credentials created should be revocable.
+        type: boolean
+    type: object
   github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission:
     properties:
       definition_id:
@@ -1538,10 +1564,13 @@ definitions:
     type: object
   pkg_server_router.GetResponseResponse:
     properties:
-      id:
-        type: string
-      response:
+      credential_response:
         $ref: '#/definitions/manifest.CredentialResponse'
+      responseJwt:
+        type: string
+      verifiableCredentials:
+        description: this is an interface type to union Data Integrity and JWT style
+          VCs
     type: object
   pkg_server_router.GetResponsesResponse:
     properties:
@@ -1586,6 +1615,15 @@ definitions:
     - id
     - status
     type: object
+  pkg_server_router.ListDefinitionsRequest:
+    type: object
+  pkg_server_router.ListDefinitionsResponse:
+    properties:
+      definitions:
+        items:
+          $ref: '#/definitions/exchange.PresentationDefinition'
+        type: array
+    type: object
   pkg_server_router.ListIssuanceTemplatesResponse:
     properties:
       issuanceTemplates:
@@ -1643,6 +1681,13 @@ definitions:
     properties:
       approved:
         type: boolean
+      credential_overrides:
+        additionalProperties:
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride'
+        description: |-
+          Overrides to apply to the credentials that will be created. Keys are the ID that corresponds to an
+          OutputDescriptor.ID from the manifest.
+        type: object
       reason:
         type: string
     type: object
@@ -1885,7 +1930,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.GetHealthCheckResponse'
+            $ref: '#/definitions/pkg_server_router.GetHealthCheckResponse'
       summary: Health Check
       tags:
       - HealthCheck
@@ -2359,7 +2404,7 @@ paths:
         name: request
         required: true
         schema:
-          $ref: '#/definitions/pkg_server_router.StoreKeyRequest'
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.StoreKeyRequest'
       produces:
       - application/json
       responses:
@@ -2393,7 +2438,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.GetKeyDetailsResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.GetKeyDetailsResponse'
         "400":
           description: Bad request
           schema:
@@ -2834,14 +2879,14 @@ paths:
         name: request
         required: true
         schema:
-          $ref: '#/definitions/pkg_server_router.CreatePresentationDefinitionRequest'
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.CreatePresentationDefinitionRequest'
       produces:
       - application/json
       responses:
         "201":
           description: Created
           schema:
-            $ref: '#/definitions/pkg_server_router.CreatePresentationDefinitionResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.CreatePresentationDefinitionResponse'
         "400":
           description: Bad request
           schema:
@@ -2898,7 +2943,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.GetPresentationDefinitionResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.GetPresentationDefinitionResponse'
         "400":
           description: Bad request
           schema:
@@ -2906,6 +2951,36 @@ paths:
       summary: Get PresentationDefinition
       tags:
       - PresentationDefinitionAPI
+  /v1/presentations/definitions:
+    get:
+      consumes:
+      - application/json
+      description: Lists all the existing presentation definitions
+      parameters:
+      - description: request body
+        in: body
+        name: request
+        required: true
+        schema:
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.ListDefinitionsRequest'
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.ListDefinitionsResponse'
+        "400":
+          description: Bad request
+          schema:
+            type: string
+        "500":
+          description: Internal server error
+          schema:
+            type: string
+      summary: List Presentation Definitions
+      tags:
+      - PresentationDefinitionAPI
   /v1/presentations/submissions:
     get:
       consumes:
@@ -2918,14 +2993,14 @@ paths:
         name: request
         required: true
         schema:
-          $ref: '#/definitions/pkg_server_router.ListSubmissionRequest'
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.ListSubmissionRequest'
       produces:
       - application/json
       responses:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.ListSubmissionResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.ListSubmissionResponse'
         "400":
           description: Bad request
           schema:
@@ -2947,14 +3022,14 @@ paths:
         name: request
         required: true
         schema:
-          $ref: '#/definitions/pkg_server_router.CreateSubmissionRequest'
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.CreateSubmissionRequest'
       produces:
       - application/json
       responses:
         "201":
           description: The type of response is Submission once the operation has finished.
           schema:
-            $ref: '#/definitions/pkg_server_router.Operation'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.Operation'
         "400":
           description: Bad request
           schema:
@@ -2983,7 +3058,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.GetSubmissionResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.GetSubmissionResponse'
         "400":
           description: Bad request
           schema:
@@ -3004,14 +3079,14 @@ paths:
         name: request
         required: true
         schema:
-          $ref: '#/definitions/pkg_server_router.ReviewSubmissionRequest'
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.ReviewSubmissionRequest'
       produces:
       - application/json
       responses:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.ReviewSubmissionResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.ReviewSubmissionResponse'
         "400":
           description: Bad request
           schema:
@@ -3020,7 +3095,7 @@ paths:
           description: Internal server error
           schema:
             type: string
-      summary: Review a pending submissions
+      summary: Review a pending submission
       tags:
       - SubmissionAPI
   /v1/schemas:
@@ -3034,7 +3109,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.GetSchemasResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.GetSchemasResponse'
         "500":
           description: Internal server error
           schema:
@@ -3052,14 +3127,14 @@ paths:
         name: request
         required: true
         schema:
-          $ref: '#/definitions/pkg_server_router.CreateSchemaRequest'
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.CreateSchemaRequest'
       produces:
       - application/json
       responses:
         "201":
           description: Created
           schema:
-            $ref: '#/definitions/pkg_server_router.CreateSchemaResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.CreateSchemaResponse'
         "400":
           description: Bad request
           schema:
@@ -3116,7 +3191,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.GetSchemaResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.GetSchemaResponse'
         "400":
           description: Bad request
           schema:
@@ -3135,14 +3210,14 @@ paths:
         name: request
         required: true
         schema:
-          $ref: '#/definitions/pkg_server_router.VerifySchemaRequest'
+          $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.VerifySchemaRequest'
       produces:
       - application/json
       responses:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/pkg_server_router.VerifySchemaResponse'
+            $ref: '#/definitions/github_com_tbd54566975_ssi-service_pkg_server_router.VerifySchemaResponse'
         "400":
           description: Bad request
           schema:
diff --git a/pkg/server/router/credential.go b/pkg/server/router/credential.go
index 087c302..71ff7da 100644
--- a/pkg/server/router/credential.go
+++ b/pkg/server/router/credential.go
@@ -71,16 +71,17 @@ type CreateCredentialResponse struct {
 }
 
 // CreateCredential godoc
-// @Summary      Create Credential
-// @Description  Create a credential
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreateCredentialRequest  true  "request body"
-// @Success      201      {object}  CreateCredentialResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/credentials [put]
+//
+//	@Summary		Create Credential
+//	@Description	Create a credential
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreateCredentialRequest	true	"request body"
+//	@Success		201		{object}	CreateCredentialResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/credentials [put]
 func (cr CredentialRouter) CreateCredential(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request CreateCredentialRequest
 	invalidCreateCredentialRequest := "invalid create credential request"
@@ -115,15 +116,16 @@ type GetCredentialResponse struct {
 }
 
 // GetCredential godoc
-// @Summary      Get Credential
-// @Description  Get credential by id
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetCredentialResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/credentials/{id} [get]
+//
+//	@Summary		Get Credential
+//	@Description	Get credential by id
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetCredentialResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/credentials/{id} [get]
 func (cr CredentialRouter) GetCredential(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -152,15 +154,16 @@ type GetCredentialStatusResponse struct {
 }
 
 // GetCredentialStatus godoc
-// @Summary      Get Credential Status
-// @Description  Get credential status by id
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetCredentialStatusResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/credentials/{id}/status [get]
+//
+//	@Summary		Get Credential Status
+//	@Description	Get credential status by id
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetCredentialStatusResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/credentials/{id}/status [get]
 func (cr CredentialRouter) GetCredentialStatus(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -190,15 +193,16 @@ type GetCredentialStatusListResponse struct {
 }
 
 // GetCredentialStatusList godoc
-// @Summary      Get Credential Status List
-// @Description  Get credential status list by id
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetCredentialStatusListResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/credentials/status/{id} [get]
+//
+//	@Summary		Get Credential Status List
+//	@Description	Get credential status list by id
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetCredentialStatusListResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/credentials/status/{id} [get]
 func (cr CredentialRouter) GetCredentialStatusList(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -239,16 +243,17 @@ type UpdateCredentialStatusResponse struct {
 }
 
 // UpdateCredentialStatus godoc
-// @Summary      Update Credential Status
-// @Description  Update a credential's status
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      UpdateCredentialStatusRequest  true  "request body"
-// @Success      201      {object}  UpdateCredentialStatusResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/credentials/{id}/status [put]
+//
+//	@Summary		Update Credential Status
+//	@Description	Update a credential's status
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		UpdateCredentialStatusRequest	true	"request body"
+//	@Success		201		{object}	UpdateCredentialStatusResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/credentials/{id}/status [put]
 func (cr CredentialRouter) UpdateCredentialStatus(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -303,15 +308,16 @@ type VerifyCredentialResponse struct {
 }
 
 // VerifyCredential godoc
-// @Summary      Verify Credential
-// @Description  Verify a given credential by its id
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      VerifyCredentialRequest  true  "request body"
-// @Success      200  {object}  VerifyCredentialResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/credentials/verification [put]
+//
+//	@Summary		Verify Credential
+//	@Description	Verify a given credential by its id
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		VerifyCredentialRequest	true	"request body"
+//	@Success		200		{object}	VerifyCredentialResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Router			/v1/credentials/verification [put]
 func (cr CredentialRouter) VerifyCredential(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request VerifyCredentialRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -345,18 +351,19 @@ type GetCredentialsResponse struct {
 }
 
 // GetCredentials godoc
-// @Summary      Get Credentials
-// @Description  Checks for the presence of a query parameter and calls the associated filtered get method
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        issuer   query     string  false  "string issuer"
-// @Param        schema   query     string  false  "string schema"
-// @Param        subject  query     string  false  "string subject"
-// @Success      200      {object}  GetCredentialsResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/credentials [get]
+//
+//	@Summary		Get Credentials
+//	@Description	Checks for the presence of a query parameter and calls the associated filtered get method
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			issuer	query		string	false	"string issuer"
+//	@Param			schema	query		string	false	"string schema"
+//	@Param			subject	query		string	false	"string subject"
+//	@Success		200		{object}	GetCredentialsResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/credentials [get]
 func (cr CredentialRouter) GetCredentials(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	issuer := framework.GetQueryValue(r, IssuerParam)
 	schema := framework.GetQueryValue(r, SchemaParam)
@@ -418,16 +425,17 @@ func (cr CredentialRouter) getCredentialsBySchema(ctx context.Context, schema st
 }
 
 // DeleteCredential godoc
-// @Summary      Delete Credentials
-// @Description  Delete credential by ID
-// @Tags         CredentialAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {string}  string  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/credentials/{id} [delete]
+//
+//	@Summary		Delete Credentials
+//	@Description	Delete credential by ID
+//	@Tags			CredentialAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{string}	string	"OK"
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/credentials/{id} [delete]
 func (cr CredentialRouter) DeleteCredential(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
diff --git a/pkg/server/router/did.go b/pkg/server/router/did.go
index 5685ca1..9a4cf52 100644
--- a/pkg/server/router/did.go
+++ b/pkg/server/router/did.go
@@ -44,13 +44,14 @@ type GetDIDMethodsResponse struct {
 }
 
 // GetDIDMethods godoc
-// @Summary      Get DID Methods
-// @Description  Get supported DID methods
-// @Tags         DecentralizedIdentityAPI
-// @Accept       json
-// @Produce      json
-// @Success      200  {object}  GetDIDMethodsResponse
-// @Router       /v1/dids [get]
+//
+//	@Summary		Get DID Methods
+//	@Description	Get supported DID methods
+//	@Tags			DecentralizedIdentityAPI
+//	@Accept			json
+//	@Produce		json
+//	@Success		200	{object}	GetDIDMethodsResponse
+//	@Router			/v1/dids [get]
 func (dr DIDRouter) GetDIDMethods(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	methods := dr.service.GetSupportedMethods()
 	response := GetDIDMethodsResponse{DIDMethods: methods.Methods}
@@ -69,17 +70,18 @@ type CreateDIDByMethodResponse struct {
 }
 
 // CreateDIDByMethod godoc
-// @Summary      Create DID
-// @Description  create DID by method
-// @Tags         DecentralizedIdentityAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreateDIDByMethodRequest  true  "request body"
-// @Param        method   path      string                    true  "Method"
-// @Success      201      {object}  CreateDIDByMethodResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/dids/{method} [put]
+//
+//	@Summary		Create DID
+//	@Description	create DID by method
+//	@Tags			DecentralizedIdentityAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreateDIDByMethodRequest	true	"request body"
+//	@Param			method	path		string						true	"Method"
+//	@Success		201		{object}	CreateDIDByMethodResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/dids/{method} [put]
 func (dr DIDRouter) CreateDIDByMethod(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	method := framework.GetParam(ctx, MethodParam)
 	if method == nil {
@@ -124,17 +126,18 @@ type GetDIDByMethodResponse struct {
 }
 
 // GetDIDByMethod godoc
-// @Summary      Get DID
-// @Description  Get DID by method
-// @Tags         DecentralizedIdentityAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreateDIDByMethodRequest  true  "request body"
-// @Param        method   path      string                    true  "Method"
-// @Param        id       path      string                    true  "ID"
-// @Success      200      {object}  GetDIDByMethodResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Router       /v1/dids/{method}/{id} [get]
+//
+//	@Summary		Get DID
+//	@Description	Get DID by method
+//	@Tags			DecentralizedIdentityAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreateDIDByMethodRequest	true	"request body"
+//	@Param			method	path		string						true	"Method"
+//	@Param			id		path		string						true	"ID"
+//	@Success		200		{object}	GetDIDByMethodResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Router			/v1/dids/{method}/{id} [get]
 func (dr DIDRouter) GetDIDByMethod(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	method := framework.GetParam(ctx, MethodParam)
 	if method == nil {
@@ -168,15 +171,16 @@ type GetDIDsByMethodResponse struct {
 }
 
 // GetDIDsByMethod godoc
-// @Summary      Get DIDs
-// @Description  Get DIDs by method
-// @Tags         DecentralizedIdentityAPI
-// @Accept       json
-// @Produce      json
-// @Param        method   path      string                    true  "Method"
-// @Success      200      {object}  GetDIDsByMethodResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Router       /v1/dids/{method} [get]
+//
+//	@Summary		Get DIDs
+//	@Description	Get DIDs by method
+//	@Tags			DecentralizedIdentityAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			method	path		string	true	"Method"
+//	@Success		200		{object}	GetDIDsByMethodResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Router			/v1/dids/{method} [get]
 func (dr DIDRouter) GetDIDsByMethod(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	method := framework.GetParam(ctx, MethodParam)
 	if method == nil {
@@ -206,15 +210,16 @@ type ResolveDIDResponse struct {
 }
 
 // ResolveDID godoc
-// @Summary      Resolve a DID
-// @Description  Resolve a DID that may not be stored in this service
-// @Tags         DecentralizedIdentityAPI
-// @Accept       json
-// @Produce      json
-// @Param        id       path      string                    true  "ID"
-// @Success      200      {object}  ResolveDIDResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Router       /v1/dids/resolver/{id} [get]
+//
+//	@Summary		Resolve a DID
+//	@Description	Resolve a DID that may not be stored in this service
+//	@Tags			DecentralizedIdentityAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	ResolveDIDResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/dids/resolver/{id} [get]
 func (dr DIDRouter) ResolveDID(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
diff --git a/pkg/server/router/health.go b/pkg/server/router/health.go
index b7676da..f3f5220 100644
--- a/pkg/server/router/health.go
+++ b/pkg/server/router/health.go
@@ -16,13 +16,14 @@ const (
 )
 
 // Health godoc
-// @Summary      Health Check
-// @Description  Health is a simple handler that always responds with a 200 OK
-// @Tags         HealthCheck
-// @Accept       json
-// @Produce      json
-// @Success      200  {object}  GetHealthCheckResponse
-// @Router       /health [get]
+//
+//	@Summary		Health Check
+//	@Description	Health is a simple handler that always responds with a 200 OK
+//	@Tags			HealthCheck
+//	@Accept			json
+//	@Produce		json
+//	@Success		200	{object}	GetHealthCheckResponse
+//	@Router			/health [get]
 func Health(_ context.Context, w http.ResponseWriter, _ *http.Request) error {
 	status := GetHealthCheckResponse{Status: HealthOK}
 	return json.NewEncoder(w).Encode(status)
diff --git a/pkg/server/router/issuance.go b/pkg/server/router/issuance.go
index 7f44d7e..45671bf 100644
--- a/pkg/server/router/issuance.go
+++ b/pkg/server/router/issuance.go
@@ -24,15 +24,16 @@ func NewIssuanceRouter(svc svcframework.Service) (*IssuanceRouter, error) {
 }
 
 // GetIssuanceTemplate godoc
-// @Summary      Get issuance template
-// @Description  Get an issuance template by its id
-// @Tags         IssuingAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  issuing.IssuanceTemplate
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/issuancetemplates/{id} [get]
+//
+//	@Summary		Get issuance template
+//	@Description	Get an issuance template by its id
+//	@Tags			IssuingAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	issuing.IssuanceTemplate
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/issuancetemplates/{id} [get]
 func (ir IssuanceRouter) GetIssuanceTemplate(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -59,16 +60,17 @@ func (r CreateIssuanceTemplateRequest) ToServiceRequest() *issuing.CreateIssuanc
 }
 
 // CreateIssuanceTemplate godoc
-// @Summary      Create issuance template
-// @Description  Create issuance template
-// @Tags         IssuingAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreateIssuanceTemplateRequest  true  "request body"
-// @Success      201      {object}  issuing.IssuanceTemplate
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/issuancetemplates [put]
+//
+//	@Summary		Create issuance template
+//	@Description	Create issuance template
+//	@Tags			IssuingAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreateIssuanceTemplateRequest	true	"request body"
+//	@Success		201		{object}	issuing.IssuanceTemplate
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/issuancetemplates [put]
 func (ir IssuanceRouter) CreateIssuanceTemplate(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request CreateIssuanceTemplateRequest
 	errMsg := "Invalid Issuance Template Request"
@@ -87,16 +89,17 @@ func (ir IssuanceRouter) CreateIssuanceTemplate(ctx context.Context, w http.Resp
 }
 
 // DeleteIssuanceTemplate godoc
-// @Summary      Delete issuance template
-// @Description  Delete issuance template by ID
-// @Tags         IssuingAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {string}  string  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/issuancetemplates/{id} [delete]
+//
+//	@Summary		Delete issuance template
+//	@Description	Delete issuance template by ID
+//	@Tags			IssuingAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{string}	string	"OK"
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/issuancetemplates/{id} [delete]
 func (ir IssuanceRouter) DeleteIssuanceTemplate(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -117,15 +120,16 @@ type ListIssuanceTemplatesResponse struct {
 }
 
 // ListIssuanceTemplates godoc
-// @Summary      Lists issuance templates
-// @Description  Lists all issuance templates stored in this service.
-// @Tags         IssuingAPI
-// @Accept       json
-// @Produce      json
-// @Success      200      {object}  ListIssuanceTemplatesResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/manifests [get]
+//
+//	@Summary		Lists issuance templates
+//	@Description	Lists all issuance templates stored in this service.
+//	@Tags			IssuingAPI
+//	@Accept			json
+//	@Produce		json
+//	@Success		200	{object}	ListIssuanceTemplatesResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/manifests [get]
 func (ir IssuanceRouter) ListIssuanceTemplates(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	gotManifests, err := ir.service.ListIssuanceTemplates(ctx, &issuing.ListIssuanceTemplatesRequest{})
 
diff --git a/pkg/server/router/keystore.go b/pkg/server/router/keystore.go
index 2d79637..a34d174 100644
--- a/pkg/server/router/keystore.go
+++ b/pkg/server/router/keystore.go
@@ -55,16 +55,17 @@ func (sk StoreKeyRequest) ToServiceRequest() (*keystore.StoreKeyRequest, error)
 }
 
 // StoreKey godoc
-// @Summary      Store Key
-// @Description  Stores a key to be used by the service
-// @Tags         KeyStoreAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      StoreKeyRequest  true  "request body"
-// @Success      201
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/keys [put]
+//
+//	@Summary		Store Key
+//	@Description	Stores a key to be used by the service
+//	@Tags			KeyStoreAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body	StoreKeyRequest	true	"request body"
+//	@Success		201
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/keys [put]
 func (ksr *KeyStoreRouter) StoreKey(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request StoreKeyRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -97,15 +98,16 @@ type GetKeyDetailsResponse struct {
 }
 
 // GetKeyDetails godoc
-// @Summary      Get Details For Key
-// @Description  Get details about a stored key
-// @Tags         KeyStoreAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetKeyDetailsResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/keys/{id} [get]
+//
+//	@Summary		Get Details For Key
+//	@Description	Get details about a stored key
+//	@Tags			KeyStoreAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetKeyDetailsResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/keys/{id} [get]
 func (ksr *KeyStoreRouter) GetKeyDetails(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
diff --git a/pkg/server/router/manifest.go b/pkg/server/router/manifest.go
index 8f7dc6d..a2a1d11 100644
--- a/pkg/server/router/manifest.go
+++ b/pkg/server/router/manifest.go
@@ -69,16 +69,17 @@ type CreateManifestResponse struct {
 }
 
 // CreateManifest godoc
-// @Summary      Create manifest
-// @Description  Create manifest
-// @Tags         ManifestAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreateManifestRequest  true  "request body"
-// @Success      201      {object}  CreateManifestResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/manifests [put]
+//
+//	@Summary		Create manifest
+//	@Description	Create manifest
+//	@Tags			ManifestAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreateManifestRequest	true	"request body"
+//	@Success		201		{object}	CreateManifestResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/manifests [put]
 func (mr ManifestRouter) CreateManifest(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request CreateManifestRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -112,15 +113,16 @@ type GetManifestResponse struct {
 }
 
 // GetManifest godoc
-// @Summary      Get manifest
-// @Description  Get a credential manifest by its id
-// @Tags         ManifestAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetManifestResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/manifests/{id} [get]
+//
+//	@Summary		Get manifest
+//	@Description	Get a credential manifest by its id
+//	@Tags			ManifestAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetManifestResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/manifests/{id} [get]
 func (mr ManifestRouter) GetManifest(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -149,18 +151,19 @@ type GetManifestsResponse struct {
 }
 
 // GetManifests godoc
-// @Summary      Get manifests
-// @Description  Checks for the presence of a query parameter and calls the associated filtered get method
-// @Tags         ManifestAPI
-// @Accept       json
-// @Produce      json
-// @Param        issuer   query     string  false  "string issuer"
-// @Param        schema   query     string  false  "string schema"
-// @Param        subject  query     string  false  "string subject"
-// @Success      200      {object}  GetManifestsResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/manifests [get]
+//
+//	@Summary		Get manifests
+//	@Description	Checks for the presence of a query parameter and calls the associated filtered get method
+//	@Tags			ManifestAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			issuer	query		string	false	"string issuer"
+//	@Param			schema	query		string	false	"string schema"
+//	@Param			subject	query		string	false	"string subject"
+//	@Success		200		{object}	GetManifestsResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/manifests [get]
 func (mr ManifestRouter) GetManifests(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	gotManifests, err := mr.service.GetManifests(ctx)
 
@@ -184,16 +187,17 @@ func (mr ManifestRouter) GetManifests(ctx context.Context, w http.ResponseWriter
 }
 
 // DeleteManifest godoc
-// @Summary      Delete manifests
-// @Description  Delete manifest by ID
-// @Tags         ManifestAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {string}  string  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/manifests/{id} [delete]
+//
+//	@Summary		Delete manifests
+//	@Description	Delete manifest by ID
+//	@Tags			ManifestAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{string}	string	"OK"
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/manifests/{id} [delete]
 func (mr ManifestRouter) DeleteManifest(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -288,17 +292,20 @@ type SubmitApplicationResponse struct {
 }
 
 // SubmitApplication godoc
-// @Summary      Submit application
-// @Description  Submit a credential application in response to a credential manifest. The request body is expected to
+//
+//	@Summary		Submit application
+//	@Description	Submit a credential application in response to a credential manifest. The request body is expected to
+//
 // be a valid JWT signed by the applicant's DID, containing two top level properties: credential_application and vcs.
-// @Tags         ApplicationAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      SubmitApplicationRequest  true  "request body"
-// @Success      201      {object}  Operation "Operation with a SubmitApplicationResponse type in the `result.response` field."
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/manifests/applications [put]
+//
+//	@Tags			ApplicationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		SubmitApplicationRequest	true	"request body"
+//	@Success		201		{object}	Operation					"Operation with a SubmitApplicationResponse type in the `result.response` field."
+//	@Failure		400		{string}	string						"Bad request"
+//	@Failure		500		{string}	string						"Internal server error"
+//	@Router			/v1/manifests/applications [put]
 func (mr ManifestRouter) SubmitApplication(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request SubmitApplicationRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -330,15 +337,16 @@ type GetApplicationResponse struct {
 }
 
 // GetApplication godoc
-// @Summary      Get application
-// @Description  Get application by id
-// @Tags         ApplicationAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetApplicationResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/manifests/applications/{id} [get]
+//
+//	@Summary		Get application
+//	@Description	Get application by id
+//	@Tags			ApplicationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetApplicationResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/manifests/applications/{id} [get]
 func (mr ManifestRouter) GetApplication(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -366,15 +374,16 @@ type GetApplicationsResponse struct {
 }
 
 // GetApplications godoc
-// @Summary      Get applications
-// @Description  Checks for the presence of a query parameter and calls the associated filtered get method
-// @Tags         ApplicationAPI
-// @Accept       json
-// @Produce      json
-// @Success      200      {object}  GetApplicationsResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/manifests/applications [get]
+//
+//	@Summary		Get applications
+//	@Description	Checks for the presence of a query parameter and calls the associated filtered get method
+//	@Tags			ApplicationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Success		200	{object}	GetApplicationsResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/manifests/applications [get]
 func (mr ManifestRouter) GetApplications(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	gotApplications, err := mr.service.GetApplications(ctx)
 
@@ -392,16 +401,17 @@ func (mr ManifestRouter) GetApplications(ctx context.Context, w http.ResponseWri
 }
 
 // DeleteApplication godoc
-// @Summary      Delete applications
-// @Description  Delete application by ID
-// @Tags         ApplicationAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {string}  string  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/manifests/applications/{id} [delete]
+//
+//	@Summary		Delete applications
+//	@Description	Delete application by ID
+//	@Tags			ApplicationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{string}	string	"OK"
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/manifests/applications/{id} [delete]
 func (mr ManifestRouter) DeleteApplication(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -427,15 +437,16 @@ type GetResponseResponse struct {
 }
 
 // GetResponse godoc
-// @Summary      Get response
-// @Description  Get response by id
-// @Tags         ResponseAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetResponseResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/manifests/responses/{id} [get]
+//
+//	@Summary		Get response
+//	@Description	Get response by id
+//	@Tags			ResponseAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetResponseResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/manifests/responses/{id} [get]
 func (mr ManifestRouter) GetResponse(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -464,15 +475,16 @@ type GetResponsesResponse struct {
 }
 
 // GetResponses godoc
-// @Summary      Get responses
-// @Description  Checks for the presence of a query parameter and calls the associated filtered get method
-// @Tags         ResponseAPI
-// @Accept       json
-// @Produce      json
-// @Success      200      {object}  GetResponsesResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/manifests/responses [get]
+//
+//	@Summary		Get responses
+//	@Description	Checks for the presence of a query parameter and calls the associated filtered get method
+//	@Tags			ResponseAPI
+//	@Accept			json
+//	@Produce		json
+//	@Success		200	{object}	GetResponsesResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/manifests/responses [get]
 func (mr ManifestRouter) GetResponses(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	gotResponses, err := mr.service.GetResponses(ctx)
 
@@ -490,16 +502,17 @@ func (mr ManifestRouter) GetResponses(ctx context.Context, w http.ResponseWriter
 }
 
 // DeleteResponse godoc
-// @Summary      Delete responses
-// @Description  Delete response by ID
-// @Tags         ResponseAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {string}  string  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/manifests/responses/{id} [delete]
+//
+//	@Summary		Delete responses
+//	@Description	Delete response by ID
+//	@Tags			ResponseAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{string}	string	"OK"
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/manifests/responses/{id} [delete]
 func (mr ManifestRouter) DeleteResponse(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -536,16 +549,17 @@ func (r ReviewApplicationRequest) toServiceRequest(id string) model.ReviewApplic
 }
 
 // ReviewApplication godoc
-// @Summary      Reviews an application
-// @Description  Reviewing an application either fulfills or denies the credential.
-// @Tags         ApplicationAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      ReviewApplicationRequest  true  "request body"
-// @Success      201      {object}  SubmitApplicationResponse "Credential Response"
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/manifests/applications/{id}/review [put]
+//
+//	@Summary		Reviews an application
+//	@Description	Reviewing an application either fulfills or denies the credential.
+//	@Tags			ApplicationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		ReviewApplicationRequest	true	"request body"
+//	@Success		201		{object}	SubmitApplicationResponse	"Credential Response"
+//	@Failure		400		{string}	string						"Bad request"
+//	@Failure		500		{string}	string						"Internal server error"
+//	@Router			/v1/manifests/applications/{id}/review [put]
 func (mr ManifestRouter) ReviewApplication(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
diff --git a/pkg/server/router/operation.go b/pkg/server/router/operation.go
index 82a0d82..c963a16 100644
--- a/pkg/server/router/operation.go
+++ b/pkg/server/router/operation.go
@@ -31,16 +31,17 @@ func NewOperationRouter(s svcframework.Service) (*OperationRouter, error) {
 }
 
 // GetOperation godoc
-// @Summary      Get an operation
-// @Description  Get operation by its ID
-// @Tags         OperationAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  Operation  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/operations/{id} [get]
+//
+//	@Summary		Get an operation
+//	@Description	Get operation by its ID
+//	@Tags			OperationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string		true	"ID"
+//	@Success		200	{object}	Operation	"OK"
+//	@Failure		400	{string}	string		"Bad request"
+//	@Failure		500	{string}	string		"Internal server error"
+//	@Router			/v1/operations/{id} [get]
 func (o OperationRouter) GetOperation(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -112,16 +113,17 @@ type GetOperationsResponse struct {
 }
 
 // GetOperations godoc
-// @Summary      List operations
-// @Description  List operations according to the request
-// @Tags         OperationAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body  GetOperationsRequest  true  "request body"
-// @Success      200  {object}  GetOperationsResponse  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/operations [get]
+//
+//	@Summary		List operations
+//	@Description	List operations according to the request
+//	@Tags			OperationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		GetOperationsRequest	true	"request body"
+//	@Success		200		{object}	GetOperationsResponse	"OK"
+//	@Failure		400		{string}	string					"Bad request"
+//	@Failure		500		{string}	string					"Internal server error"
+//	@Router			/v1/operations [get]
 func (o OperationRouter) GetOperations(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request GetOperationsRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -176,16 +178,17 @@ func routerModel(op operation.Operation) Operation {
 }
 
 // CancelOperation godoc
-// @Summary      Cancel an ongoing operation
-// @Description  Cancels an ongoing operation, if possible.
-// @Tags         OperationAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  Operation  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/operations/cancel/{id} [get]
+//
+//	@Summary		Cancel an ongoing operation
+//	@Description	Cancels an ongoing operation, if possible.
+//	@Tags			OperationAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string		true	"ID"
+//	@Success		200	{object}	Operation	"OK"
+//	@Failure		400	{string}	string		"Bad request"
+//	@Failure		500	{string}	string		"Internal server error"
+//	@Router			/v1/operations/cancel/{id} [get]
 func (o OperationRouter) CancelOperation(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
diff --git a/pkg/server/router/presentation.go b/pkg/server/router/presentation.go
index 3dc6b2a..af4659f 100644
--- a/pkg/server/router/presentation.go
+++ b/pkg/server/router/presentation.go
@@ -48,16 +48,17 @@ type CreatePresentationDefinitionResponse struct {
 }
 
 // CreatePresentationDefinition godoc
-// @Summary      Create PresentationDefinition
-// @Description  Create presentation definition
-// @Tags         PresentationDefinitionAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreatePresentationDefinitionRequest  true  "request body"
-// @Success      201      {object}  CreatePresentationDefinitionResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/presentation/definition [put]
+//
+//	@Summary		Create PresentationDefinition
+//	@Description	Create presentation definition
+//	@Tags			PresentationDefinitionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreatePresentationDefinitionRequest	true	"request body"
+//	@Success		201		{object}	CreatePresentationDefinitionResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/presentation/definition [put]
 func (pr PresentationRouter) CreatePresentationDefinition(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request CreatePresentationDefinitionRequest
 	errMsg := "Invalid Presentation Definition Request"
@@ -124,15 +125,16 @@ type GetPresentationDefinitionResponse struct {
 }
 
 // GetPresentationDefinition godoc
-// @Summary      Get PresentationDefinition
-// @Description  Get a presentation definition by its ID
-// @Tags         PresentationDefinitionAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetPresentationDefinitionResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/presentation/definition/{id} [get]
+//
+//	@Summary		Get PresentationDefinition
+//	@Description	Get a presentation definition by its ID
+//	@Tags			PresentationDefinitionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetPresentationDefinitionResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/presentation/definition/{id} [get]
 func (pr PresentationRouter) GetPresentationDefinition(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -154,17 +156,52 @@ func (pr PresentationRouter) GetPresentationDefinition(ctx context.Context, w ht
 	return framework.Respond(ctx, w, resp, http.StatusOK)
 }
 
+type ListDefinitionsRequest struct {
+}
+
+type ListDefinitionsResponse struct {
+	Definitions []*exchange.PresentationDefinition `json:"definitions"`
+}
+
+// ListDefinitions godoc
+//
+//	@Summary		List Presentation Definitions
+//	@Description	Lists all the existing presentation definitions
+//	@Tags			PresentationDefinitionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		ListDefinitionsRequest	true	"request body"
+//	@Success		200		{object}	ListDefinitionsResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/presentations/definitions [get]
+func (pr PresentationRouter) ListDefinitions(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
+	svcResponse, err := pr.service.ListDefinitions(ctx)
+	if err != nil {
+		errMsg := "could not get definitions"
+		logrus.WithError(err).Error(errMsg)
+		return framework.NewRequestError(errors.Wrap(err, errMsg), http.StatusInternalServerError)
+	}
+
+	resp := ListDefinitionsResponse{
+		Definitions: svcResponse.Definitions,
+	}
+
+	return framework.Respond(ctx, w, resp, http.StatusOK)
+}
+
 // DeletePresentationDefinition godoc
-// @Summary      Delete PresentationDefinition
-// @Description  Delete a presentation definition by its ID
-// @Tags         PresentationDefinitionAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {string}  string  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/presentation/definition/{id} [delete]
+//
+//	@Summary		Delete PresentationDefinition
+//	@Description	Delete a presentation definition by its ID
+//	@Tags			PresentationDefinitionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{string}	string	"OK"
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/presentation/definition/{id} [delete]
 func (pr PresentationRouter) DeletePresentationDefinition(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -221,16 +258,17 @@ func (r CreateSubmissionRequest) toServiceRequest() (*model.CreateSubmissionRequ
 }
 
 // CreateSubmission godoc
-// @Summary      Create Submission
-// @Description  Creates a submission in this server ready to be reviewed.
-// @Tags         SubmissionAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreateSubmissionRequest  true  "request body"
-// @Success      201      {object}  Operation  "The type of response is Submission once the operation has finished."
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/presentations/submissions [put]
+//
+//	@Summary		Create Submission
+//	@Description	Creates a submission in this server ready to be reviewed.
+//	@Tags			SubmissionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreateSubmissionRequest	true	"request body"
+//	@Success		201		{object}	Operation				"The type of response is Submission once the operation has finished."
+//	@Failure		400		{string}	string					"Bad request"
+//	@Failure		500		{string}	string					"Internal server error"
+//	@Router			/v1/presentations/submissions [put]
 func (pr PresentationRouter) CreateSubmission(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request CreateSubmissionRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -258,18 +296,20 @@ func (pr PresentationRouter) CreateSubmission(ctx context.Context, w http.Respon
 
 type GetSubmissionResponse struct {
 	*model.Submission
+	// TODO(OSE-334): Actually add the credentials that were sent.
 }
 
 // GetSubmission godoc
-// @Summary      Get Submission
-// @Description  Get a submission by its ID
-// @Tags         SubmissionAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetSubmissionResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/presentations/submissions/{id} [get]
+//
+//	@Summary		Get Submission
+//	@Description	Get a submission by its ID
+//	@Tags			SubmissionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetSubmissionResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/presentations/submissions/{id} [get]
 func (pr PresentationRouter) GetSubmission(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -304,16 +344,17 @@ type ListSubmissionResponse struct {
 }
 
 // ListSubmissions godoc
-// @Summary      List Submissions
-// @Description  List existing submissions according to a filtering query. The `filter` field follows the syntax described in https://google.aip.dev/160.
-// @Tags         SubmissionAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      ListSubmissionRequest  true  "request body"
-// @Success      200  {object}  ListSubmissionResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/presentations/submissions [get]
+//
+//	@Summary		List Submissions
+//	@Description	List existing submissions according to a filtering query. The `filter` field follows the syntax described in https://google.aip.dev/160.
+//	@Tags			SubmissionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		ListSubmissionRequest	true	"request body"
+//	@Success		200		{object}	ListSubmissionResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/presentations/submissions [get]
 func (pr PresentationRouter) ListSubmissions(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request ListSubmissionRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -374,16 +415,17 @@ type ReviewSubmissionResponse struct {
 }
 
 // ReviewSubmission godoc
-// @Summary      Review a pending submission
-// @Description  Reviews a pending submission. After this method is called, the operation with `id==presentations/submissions/{submission_id}` will be updated with the result of this invocation.
-// @Tags         SubmissionAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      ReviewSubmissionRequest  true  "request body"
-// @Success      200  {object}  ReviewSubmissionResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/presentations/submissions/{id}/review [put]
+//
+//	@Summary		Review a pending submission
+//	@Description	Reviews a pending submission. After this method is called, the operation with `id==presentations/submissions/{submission_id}` will be updated with the result of this invocation.
+//	@Tags			SubmissionAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		ReviewSubmissionRequest	true	"request body"
+//	@Success		200		{object}	ReviewSubmissionResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/presentations/submissions/{id}/review [put]
 func (pr PresentationRouter) ReviewSubmission(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
diff --git a/pkg/server/router/readiness.go b/pkg/server/router/readiness.go
index 676cd41..9b91f7d 100644
--- a/pkg/server/router/readiness.go
+++ b/pkg/server/router/readiness.go
@@ -25,14 +25,15 @@ type GetReadinessResponse struct {
 }
 
 // Readiness godoc
-// @Summary      Readiness
-// @Description  ready runs a number of application specific checks to see if all the
-// @Description  relied upon service are healthy. Should return a 500 if not ready.
-// @Tags         Readiness
-// @Accept       json
-// @Produce      json
-// @Success      200  {string}  string  "OK"
-// @Router       /readiness [get]
+//
+//	@Summary		Readiness
+//	@Description	ready runs a number of application specific checks to see if all the
+//	@Description	relied upon service are healthy. Should return a 500 if not ready.
+//	@Tags			Readiness
+//	@Accept			json
+//	@Produce		json
+//	@Success		200	{string}	string	"OK"
+//	@Router			/readiness [get]
 func (r readiness) ready(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	services := r.getter.getServices()
 	numServices := len(services)
diff --git a/pkg/server/router/schema.go b/pkg/server/router/schema.go
index 53bc27f..882dde6 100644
--- a/pkg/server/router/schema.go
+++ b/pkg/server/router/schema.go
@@ -45,16 +45,17 @@ type CreateSchemaResponse struct {
 }
 
 // CreateSchema godoc
-// @Summary      Create Schema
-// @Description  Create schema
-// @Tags         SchemaAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      CreateSchemaRequest  true  "request body"
-// @Success      201      {object}  CreateSchemaResponse
-// @Failure      400      {string}  string  "Bad request"
-// @Failure      500      {string}  string  "Internal server error"
-// @Router       /v1/schemas [put]
+//
+//	@Summary		Create Schema
+//	@Description	Create schema
+//	@Tags			SchemaAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		CreateSchemaRequest	true	"request body"
+//	@Success		201		{object}	CreateSchemaResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Failure		500		{string}	string	"Internal server error"
+//	@Router			/v1/schemas [put]
 func (sr SchemaRouter) CreateSchema(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request CreateSchemaRequest
 	invalidCreateSchemaRequest := "invalid create schema request"
@@ -83,15 +84,16 @@ func (sr SchemaRouter) CreateSchema(ctx context.Context, w http.ResponseWriter,
 }
 
 // GetSchema godoc
-// @Summary      Get Schema
-// @Description  Get a schema by its ID
-// @Tags         SchemaAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {object}  GetSchemaResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/schemas/{id} [get]
+//
+//	@Summary		Get Schema
+//	@Description	Get a schema by its ID
+//	@Tags			SchemaAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{object}	GetSchemaResponse
+//	@Failure		400	{string}	string	"Bad request"
+//	@Router			/v1/schemas/{id} [get]
 func (sr SchemaRouter) GetSchema(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
@@ -117,14 +119,15 @@ type GetSchemasResponse struct {
 }
 
 // GetSchemas godoc
-// @Summary      Get Schemas
-// @Description  Get schemas
-// @Tags         SchemaAPI
-// @Accept       json
-// @Produce      json
-// @Success      200  {object}  GetSchemasResponse
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/schemas [get]
+//
+//	@Summary		Get Schemas
+//	@Description	Get schemas
+//	@Tags			SchemaAPI
+//	@Accept			json
+//	@Produce		json
+//	@Success		200	{object}	GetSchemasResponse
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/schemas [get]
 func (sr SchemaRouter) GetSchemas(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	gotSchemas, err := sr.service.GetSchemas(ctx)
 	if err != nil {
@@ -157,15 +160,16 @@ type VerifySchemaResponse struct {
 }
 
 // VerifySchema godoc
-// @Summary      Verify Schema
-// @Description  Verify a given schema by its id
-// @Tags         SchemaAPI
-// @Accept       json
-// @Produce      json
-// @Param        request  body      VerifySchemaRequest  true  "request body"
-// @Success      200  {object}  VerifySchemaResponse
-// @Failure      400  {string}  string  "Bad request"
-// @Router       /v1/schemas/verification [put]
+//
+//	@Summary		Verify Schema
+//	@Description	Verify a given schema by its id
+//	@Tags			SchemaAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			request	body		VerifySchemaRequest	true	"request body"
+//	@Success		200		{object}	VerifySchemaResponse
+//	@Failure		400		{string}	string	"Bad request"
+//	@Router			/v1/schemas/verification [put]
 func (sr SchemaRouter) VerifySchema(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
 	var request VerifySchemaRequest
 	if err := framework.Decode(r, &request); err != nil {
@@ -186,16 +190,17 @@ func (sr SchemaRouter) VerifySchema(ctx context.Context, w http.ResponseWriter,
 }
 
 // DeleteSchema godoc
-// @Summary      Delete Schema
-// @Description  Delete a schema by its ID
-// @Tags         SchemaAPI
-// @Accept       json
-// @Produce      json
-// @Param        id   path      string  true  "ID"
-// @Success      200  {string}  string  "OK"
-// @Failure      400  {string}  string  "Bad request"
-// @Failure      500  {string}  string  "Internal server error"
-// @Router       /v1/schemas/{id} [delete]
+//
+//	@Summary		Delete Schema
+//	@Description	Delete a schema by its ID
+//	@Tags			SchemaAPI
+//	@Accept			json
+//	@Produce		json
+//	@Param			id	path		string	true	"ID"
+//	@Success		200	{string}	string	"OK"
+//	@Failure		400	{string}	string	"Bad request"
+//	@Failure		500	{string}	string	"Internal server error"
+//	@Router			/v1/schemas/{id} [delete]
 func (sr SchemaRouter) DeleteSchema(ctx context.Context, w http.ResponseWriter, _ *http.Request) error {
 	id := framework.GetParam(ctx, IDParam)
 	if id == nil {
diff --git a/pkg/server/server.go b/pkg/server/server.go
index 64918ca..6fb3ee0 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -183,6 +183,7 @@ func (s *SSIServer) PresentationAPI(service svcframework.Service) (err error) {
 
 	s.Handle(http.MethodPut, handlerPath, pRouter.CreatePresentationDefinition)
 	s.Handle(http.MethodGet, path.Join(handlerPath, "/:id"), pRouter.GetPresentationDefinition)
+	s.Handle(http.MethodGet, handlerPath, pRouter.ListDefinitions)
 	s.Handle(http.MethodDelete, path.Join(handlerPath, "/:id"), pRouter.DeletePresentationDefinition)
 
 	submissionHandlerPath := V1Prefix + PresentationsPrefix + SubmissionsPrefix
diff --git a/pkg/service/presentation/model/model.go b/pkg/service/presentation/model/model.go
index edbbfa6..df70e94 100644
--- a/pkg/service/presentation/model/model.go
+++ b/pkg/service/presentation/model/model.go
@@ -78,6 +78,10 @@ type ListSubmissionResponse struct {
 	Submissions []Submission `json:"submissions"`
 }
 
+type ListDefinitionsResponse struct {
+	Definitions []*exchange.PresentationDefinition `json:"definitions"`
+}
+
 type ReviewSubmissionRequest struct {
 	ID       string `json:"id" validate:"required"`
 	Approved bool   `json:"approved"`
diff --git a/pkg/service/presentation/service.go b/pkg/service/presentation/service.go
index 5979233..4bdf8e1 100644
--- a/pkg/service/presentation/service.go
+++ b/pkg/service/presentation/service.go
@@ -245,3 +245,21 @@ func (s Service) ReviewSubmission(ctx context.Context, request model.ReviewSubmi
 	m := model.ServiceModel(&updatedSubmission)
 	return &m, nil
 }
+
+func (s Service) ListDefinitions(ctx context.Context) (*model.ListDefinitionsResponse, error) {
+	logrus.Debug("listing presentation definitions")
+
+	defs, err := s.storage.ListDefinitions(ctx)
+	if err != nil {
+		return nil, errors.Wrap(err, "fetching definitions from storage")
+	}
+
+	resp := &model.ListDefinitionsResponse{Definitions: make([]*exchange.PresentationDefinition, 0, len(defs))}
+	for _, def := range defs {
+		// What's this?? see https://github.com/golang/go/wiki/CommonMistakes#using-reference-to-loop-iterator-variable
+		def := def
+		resp.Definitions = append(resp.Definitions, &def.PresentationDefinition)
+	}
+
+	return resp, nil
+}
diff --git a/pkg/service/presentation/storage.go b/pkg/service/presentation/storage.go
index 0ea7e1b..ef8fb2f 100644
--- a/pkg/service/presentation/storage.go
+++ b/pkg/service/presentation/storage.go
@@ -30,7 +30,7 @@ type Storage struct {
 	db storage.ServiceStorage
 }
 
-func (ps Storage) UpdateSubmission(ctx context.Context, id string, approved bool, reason string, opID string) (prestorage.StoredSubmission, opstorage.StoredOperation, error) {
+func (ps *Storage) UpdateSubmission(ctx context.Context, id string, approved bool, reason string, opID string) (prestorage.StoredSubmission, opstorage.StoredOperation, error) {
 	m := map[string]any{
 		"status": opsubmission.StatusDenied,
 		"reason": reason,
@@ -139,7 +139,7 @@ func (ps *Storage) DeletePresentation(ctx context.Context, id string) error {
 	return nil
 }
 
-func (ps Storage) StoreSubmission(ctx context.Context, s prestorage.StoredSubmission) error {
+func (ps *Storage) StoreSubmission(ctx context.Context, s prestorage.StoredSubmission) error {
 	id := s.Submission.ID
 	if id == "" {
 		err := errors.New("could not store submission definition without an ID")
@@ -167,3 +167,19 @@ func (ps *Storage) GetSubmission(ctx context.Context, id string) (*prestorage.St
 	}
 	return &stored, nil
 }
+
+func (ps *Storage) ListDefinitions(ctx context.Context) ([]prestorage.StoredPresentation, error) {
+	m, err := ps.db.ReadAll(ctx, presentationDefinitionNamespace)
+	if err != nil {
+		return nil, errors.Wrap(err, "reading all")
+	}
+	ts := make([]prestorage.StoredPresentation, len(m))
+	i := 0
+	for k, v := range m {
+		if err = json.Unmarshal(v, &ts[i]); err != nil {
+			return nil, errors.Wrapf(err, "unmarshalling template with key <%s>", k)
+		}
+		i++
+	}
+	return ts, nil
+}


Test patch:
diff --git a/pkg/server/server_presentation_test.go b/pkg/server/server_presentation_test.go
index a86908b..0d2ecbf 100644
--- a/pkg/server/server_presentation_test.go
+++ b/pkg/server/server_presentation_test.go
@@ -51,28 +51,11 @@ func TestPresentationAPI(t *testing.T) {
 
 		var createdID string
 		{
-			// Create returns the expected PD.
-			request := router.CreatePresentationDefinitionRequest{
-				Name:                   "name",
-				Purpose:                "purpose",
-				Format:                 nil,
-				SubmissionRequirements: nil,
-				InputDescriptors:       inputDescriptors,
-			}
-			value := newRequestValue(tt, request)
-			req := httptest.NewRequest(http.MethodPut, "https://ssi-service.com/v1/presentations/definitions", value)
-			w := httptest.NewRecorder()
-
-			err = pRouter.CreatePresentationDefinition(newRequestContext(), w, req)
-			assert.NoError(tt, err)
-
-			var resp router.CreatePresentationDefinitionResponse
-			assert.NoError(tt, json.NewDecoder(w.Body).Decode(&resp))
+			resp := createPresentationDefinition(tt, pRouter, WithInputDescriptors(inputDescriptors))
 			if diff := cmp.Diff(*pd, resp.PresentationDefinition, cmpopts.IgnoreFields(exchange.PresentationDefinition{}, "ID")); diff != "" {
 				t.Errorf("PresentationDefinition mismatch (-want +got):\n%s", diff)
 			}
 
-			w.Flush()
 			createdID = resp.PresentationDefinition.ID
 		}
 		{
@@ -88,14 +71,27 @@ func TestPresentationAPI(t *testing.T) {
 				t.Errorf("PresentationDefinition mismatch (-want +got):\n%s", diff)
 			}
 
-			w.Flush()
+		}
+		{
+			// And it can also be listed
+			req := httptest.NewRequest(http.MethodGet, "https://ssi-service.com/v1/presentations/definitions", nil)
+			w := httptest.NewRecorder()
+
+			assert.NoError(tt, pRouter.ListDefinitions(newRequestContext(), w, req))
+
+			var resp router.ListDefinitionsResponse
+			assert.NoError(tt, json.NewDecoder(w.Body).Decode(&resp))
+			assert.Len(tt, resp.Definitions, 1)
+			assert.Equal(tt, createdID, resp.Definitions[0].ID)
+			if diff := cmp.Diff(pd, resp.Definitions[0], cmpopts.IgnoreFields(exchange.PresentationDefinition{}, "ID")); diff != "" {
+				t.Errorf("PresentationDefinition mismatch (-want +got):\n%s", diff)
+			}
 		}
 		{
 			// The PD can be deleted.
 			req := httptest.NewRequest(http.MethodDelete, fmt.Sprintf("https://ssi-service.com/v1/presentations/definitions/%s", createdID), nil)
 			w := httptest.NewRecorder()
 			assert.NoError(t, pRouter.DeletePresentationDefinition(newRequestContextWithParams(map[string]string{"id": createdID}), w, req))
-			w.Flush()
 		}
 		{
 			// And we cannot get the PD after it's been deleted.
@@ -105,6 +101,39 @@ func TestPresentationAPI(t *testing.T) {
 		}
 	})
 
+	t.Run("List returns empty", func(tt *testing.T) {
+		s := setupTestDB(tt)
+		pRouter := setupPresentationRouter(tt, s)
+		req := httptest.NewRequest(http.MethodGet, "https://ssi-service.com/v1/presentations/definitions", nil)
+		w := httptest.NewRecorder()
+
+		assert.NoError(tt, pRouter.ListDefinitions(newRequestContext(), w, req))
+
+		var resp router.ListDefinitionsResponse
+		assert.NoError(tt, json.NewDecoder(w.Body).Decode(&resp))
+		assert.Empty(tt, resp.Definitions)
+	})
+
+	t.Run("List returns many definitions", func(tt *testing.T) {
+		s := setupTestDB(tt)
+		pRouter := setupPresentationRouter(tt, s)
+		def1 := createPresentationDefinition(tt, pRouter)
+		def2 := createPresentationDefinition(tt, pRouter)
+
+		req := httptest.NewRequest(http.MethodGet, "https://ssi-service.com/v1/presentations/definitions", nil)
+		w := httptest.NewRecorder()
+
+		assert.NoError(tt, pRouter.ListDefinitions(newRequestContext(), w, req))
+
+		var resp router.ListDefinitionsResponse
+		assert.NoError(tt, json.NewDecoder(w.Body).Decode(&resp))
+		assert.Len(tt, resp.Definitions, 2)
+		assert.ElementsMatch(tt, resp.Definitions, []*exchange.PresentationDefinition{
+			&def1.PresentationDefinition,
+			&def2.PresentationDefinition,
+		})
+	})
+
 	t.Run("Create returns error without input descriptors", func(tt *testing.T) {
 		s := setupTestDB(tt)
 		pRouter := setupPresentationRouter(tt, s)
@@ -545,7 +574,14 @@ func WithCredentialSubject(subject credential.CredentialSubject) VCOption {
 
 type VCOption func(verifiableCredential *credential.VerifiableCredential)
 
-func createPresentationDefinition(t *testing.T, pRouter *router.PresentationRouter) router.CreatePresentationDefinitionResponse {
+type DefinitionOption func(*router.CreatePresentationDefinitionRequest)
+
+func WithInputDescriptors(inputDescriptors []exchange.InputDescriptor) DefinitionOption {
+	return func(r *router.CreatePresentationDefinitionRequest) {
+		r.InputDescriptors = inputDescriptors
+	}
+}
+func createPresentationDefinition(t *testing.T, pRouter *router.PresentationRouter, opts ...DefinitionOption) router.CreatePresentationDefinitionResponse {
 	request := router.CreatePresentationDefinitionRequest{
 		Name:                   "name",
 		Purpose:                "purpose",
@@ -573,6 +609,9 @@ func createPresentationDefinition(t *testing.T, pRouter *router.PresentationRout
 			},
 		},
 	}
+	for _, o := range opts {
+		o(&request)
+	}
 	value := newRequestValue(t, request)
 	req := httptest.NewRequest(http.MethodPut, "https://ssi-service.com/v1/presentations/definitions", value)
 	w := httptest.NewRecorder()