Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
[OSE-167] Scaffolding for /v1/operations (#172)
Browse files Browse the repository at this point in the history
* The simplest scaffolding possible

* rename

Co-authored-by: Gabe <[email protected]>
  • Loading branch information
andresuribe87 and Gabe authored Nov 14, 2022
1 parent e4bcef7 commit 3c91cb6
Show file tree
Hide file tree
Showing 8 changed files with 367 additions and 89 deletions.
228 changes: 140 additions & 88 deletions doc/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,6 @@ definitions:
- id
- type
type: object
dwn.PublishManifestResponse:
properties:
response:
type: string
status:
type: integer
required:
- response
- status
type: object
exchange.ClaimFormat:
properties:
jwt:
Expand Down Expand Up @@ -297,6 +287,10 @@ definitions:
$ref: '#/definitions/exchange.Filter'
id:
type: string
intent_to_retain:
type: boolean
name:
type: string
optional:
type: boolean
path:
Expand Down Expand Up @@ -525,12 +519,16 @@ definitions:
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.CreateManifestRequest:
properties:
description:
type: string
format:
$ref: '#/definitions/exchange.ClaimFormat'
issuerDid:
type: string
issuerName:
type: string
name:
type: string
outputDescriptors:
items:
$ref: '#/definitions/manifest.OutputDescriptor'
Expand All @@ -551,10 +549,22 @@ definitions:
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.CreatePresentationDefinitionRequest:
properties:
presentation_definition:
$ref: '#/definitions/exchange.PresentationDefinition'
format:
$ref: '#/definitions/exchange.ClaimFormat'
inputDescriptors:
items:
$ref: '#/definitions/exchange.InputDescriptor'
type: array
name:
type: string
purpose:
type: string
submissionRequirements:
items:
$ref: '#/definitions/exchange.SubmissionRequirement'
type: array
required:
- presentation_definition
- inputDescriptors
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.CreatePresentationDefinitionResponse:
properties:
Expand Down Expand Up @@ -668,10 +678,22 @@ definitions:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetManifestResponse'
type: array
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.GetPresentationDefinitionResponse:
github.com_tbd54566975_ssi-service_pkg_server_router.GetOperationsRequest:
properties:
id:
filter:
type: string
parent:
type: string
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.GetOperationsResponse:
properties:
operations:
items:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.Operation'
type: array
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.GetPresentationDefinitionResponse:
properties:
presentation_definition:
$ref: '#/definitions/exchange.PresentationDefinition'
type: object
Expand Down Expand Up @@ -703,22 +725,7 @@ definitions:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetSchemaResponse'
type: array
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.PublishManifestRequest:
properties:
manifestId:
type: string
required:
- manifestId
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.PublishManifestResponse:
properties:
dwnResponse:
$ref: '#/definitions/dwn.PublishManifestResponse'
manifest:
$ref: '#/definitions/manifest.CredentialManifest'
required:
- dwnResponse
- manifest
github.com_tbd54566975_ssi-service_pkg_server_router.Operation:
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.ResolveDIDResponse:
properties:
Expand Down Expand Up @@ -813,12 +820,16 @@ definitions:
type: object
manifest.CredentialManifest:
properties:
description:
type: string
format:
$ref: '#/definitions/exchange.ClaimFormat'
id:
type: string
issuer:
$ref: '#/definitions/manifest.Issuer'
name:
type: string
output_descriptors:
items:
$ref: '#/definitions/manifest.OutputDescriptor'
Expand Down Expand Up @@ -952,12 +963,16 @@ definitions:
type: object
pkg_server_router.CreateManifestRequest:
properties:
description:
type: string
format:
$ref: '#/definitions/exchange.ClaimFormat'
issuerDid:
type: string
issuerName:
type: string
name:
type: string
outputDescriptors:
items:
$ref: '#/definitions/manifest.OutputDescriptor'
Expand All @@ -978,10 +993,22 @@ definitions:
type: object
pkg_server_router.CreatePresentationDefinitionRequest:
properties:
presentation_definition:
$ref: '#/definitions/exchange.PresentationDefinition'
format:
$ref: '#/definitions/exchange.ClaimFormat'
inputDescriptors:
items:
$ref: '#/definitions/exchange.InputDescriptor'
type: array
name:
type: string
purpose:
type: string
submissionRequirements:
items:
$ref: '#/definitions/exchange.SubmissionRequirement'
type: array
required:
- presentation_definition
- inputDescriptors
type: object
pkg_server_router.CreatePresentationDefinitionResponse:
properties:
Expand Down Expand Up @@ -1095,10 +1122,22 @@ definitions:
$ref: '#/definitions/pkg_server_router.GetManifestResponse'
type: array
type: object
pkg_server_router.GetPresentationDefinitionResponse:
pkg_server_router.GetOperationsRequest:
properties:
id:
filter:
type: string
parent:
type: string
type: object
pkg_server_router.GetOperationsResponse:
properties:
operations:
items:
$ref: '#/definitions/pkg_server_router.Operation'
type: array
type: object
pkg_server_router.GetPresentationDefinitionResponse:
properties:
presentation_definition:
$ref: '#/definitions/exchange.PresentationDefinition'
type: object
Expand Down Expand Up @@ -1130,22 +1169,7 @@ definitions:
$ref: '#/definitions/pkg_server_router.GetSchemaResponse'
type: array
type: object
pkg_server_router.PublishManifestRequest:
properties:
manifestId:
type: string
required:
- manifestId
type: object
pkg_server_router.PublishManifestResponse:
properties:
dwnResponse:
$ref: '#/definitions/dwn.PublishManifestResponse'
manifest:
$ref: '#/definitions/manifest.CredentialManifest'
required:
- dwnResponse
- manifest
pkg_server_router.Operation:
type: object
pkg_server_router.ResolveDIDResponse:
properties:
Expand Down Expand Up @@ -1354,7 +1378,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
Expand Down Expand Up @@ -1655,36 +1679,6 @@ paths:
summary: Resolve a DID
tags:
- DecentralizedIdentityAPI
/v1/dwn/manifest:
put:
consumes:
- application/json
description: Publish Manifest to DWN
parameters:
- description: request body
in: body
name: request
required: true
schema:
$ref: '#/definitions/pkg_server_router.PublishManifestRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/pkg_server_router.PublishManifestResponse'
"400":
description: Bad request
schema:
type: string
"500":
description: Internal server error
schema:
type: string
summary: Publish Manifest to DWN
tags:
- DWNAPI
/v1/keys:
put:
consumes:
Expand All @@ -1696,7 +1690,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:
Expand Down Expand Up @@ -1730,7 +1724,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:
Expand Down Expand Up @@ -2041,6 +2035,64 @@ paths:
summary: Get response
tags:
- ResponseAPI
/v1/operations:
get:
consumes:
- application/json
description: Cancels an ongoing operation, if possible.
parameters:
- description: ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/pkg_server_router.GetOperationsResponse'
"400":
description: Bad request
schema:
type: string
"500":
description: Internal server error
schema:
type: string
summary: Cancel an ongoing operation
tags:
- OperationAPI
/v1/operations/{id}:
get:
consumes:
- application/json
description: Get operation by its ID
parameters:
- description: ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/pkg_server_router.Operation'
"400":
description: Bad request
schema:
type: string
"500":
description: Internal server error
schema:
type: string
summary: Get an operation
tags:
- OperationAPI
/v1/presentation/definition:
put:
consumes:
Expand All @@ -2052,14 +2104,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:
Expand Down Expand Up @@ -2116,7 +2168,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:
Expand Down
Loading

0 comments on commit 3c91cb6

Please sign in to comment.