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

[OSE-170][OSE-169] Create Submission Implementation #183

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8b7a1d0
Initial create, delete, get for submissions
andresuribe87 Nov 8, 2022
18c6eab
Basic tests for the router
andresuribe87 Nov 10, 2022
4820940
Added the rest of the scaffolding
andresuribe87 Nov 10, 2022
1988345
Added List and Review
andresuribe87 Nov 11, 2022
b485e80
Removed the delete method
andresuribe87 Nov 11, 2022
9ed5231
Simplified for scaffolding
andresuribe87 Nov 11, 2022
00b0a41
Merge branch 'main' into ose_166_scaffolding_for_submission
Nov 11, 2022
0ad2cbb
Merge branch 'main' into ose_166_scaffolding_for_submission
andresuribe87 Nov 14, 2022
fdbbd62
Merge branch 'main' into ose_166_scaffolding_for_submission
Nov 14, 2022
8a0a1e5
spec
andresuribe87 Nov 11, 2022
8ddd3c5
zero structs
andresuribe87 Nov 14, 2022
8b0732b
Consolidate under the same API
andresuribe87 Nov 14, 2022
f51d248
mage spec
andresuribe87 Nov 14, 2022
462be9d
Minor updates
andresuribe87 Nov 14, 2022
358e957
[OSE-167] Scaffolding for /v1/operations (#172)
andresuribe87 Nov 14, 2022
8feaff6
Fix lint and compilation
andresuribe87 Nov 14, 2022
736fbd6
PR fixes
andresuribe87 Nov 14, 2022
021e0d4
rename
andresuribe87 Nov 14, 2022
8b1ec94
regen
andresuribe87 Nov 14, 2022
5cb9d16
Merge branch 'andresuribe87-ose_166_scaffolding_for_submission'
andresuribe87 Nov 14, 2022
641c2c0
Merge remote-tracking branch 'upstream/main'
andresuribe87 Nov 28, 2022
e7f32e4
Removed unused config
andresuribe87 Nov 14, 2022
6917461
The simplest scaffolding possible
andresuribe87 Nov 11, 2022
09c1570
Implemented ops storage
andresuribe87 Nov 11, 2022
90e137a
Simple impl
andresuribe87 Nov 14, 2022
318ae8d
Submission implementation with test
andresuribe87 Nov 28, 2022
7738acb
Swagger spec
andresuribe87 Nov 28, 2022
df62d0f
Neatly wrapping up
andresuribe87 Nov 29, 2022
fd3f197
Upgrade mod
andresuribe87 Nov 29, 2022
5becb82
minor improvements
andresuribe87 Nov 29, 2022
55b5e3b
PR comments.
andresuribe87 Nov 29, 2022
b507927
PR comments.
andresuribe87 Nov 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 155 additions & 18 deletions doc/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ definitions:
id:
description: Credential ID
type: string
revoked:
type: boolean
type: object
credential.CredentialSchema:
properties:
Expand Down Expand Up @@ -483,6 +485,8 @@ definitions:
type: string
issuer:
type: string
revocable:
type: boolean
schema:
description: A schema is optional. If present, we'll attempt to look it up
and validate the data against it.
Expand Down Expand Up @@ -627,6 +631,20 @@ definitions:
id:
type: string
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.GetCredentialStatusListResponse:
properties:
credential:
$ref: '#/definitions/credential.VerifiableCredential'
credentialJwt:
type: string
id:
type: string
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.GetCredentialStatusResponse:
properties:
revoked:
type: boolean
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.GetCredentialsResponse:
properties:
credentials:
Expand Down Expand Up @@ -823,6 +841,18 @@ definitions:
items: {}
type: array
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.UpdateCredentialStatusRequest:
properties:
revoked:
type: boolean
required:
- revoked
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.UpdateCredentialStatusResponse:
properties:
revoked:
type: boolean
type: object
github.com_tbd54566975_ssi-service_pkg_server_router.VerifyCredentialRequest:
properties:
credential:
Expand Down Expand Up @@ -979,6 +1009,8 @@ definitions:
type: string
issuer:
type: string
revocable:
type: boolean
schema:
description: A schema is optional. If present, we'll attempt to look it up
and validate the data against it.
Expand Down Expand Up @@ -1123,6 +1155,20 @@ definitions:
id:
type: string
type: object
pkg_server_router.GetCredentialStatusListResponse:
properties:
credential:
$ref: '#/definitions/credential.VerifiableCredential'
credentialJwt:
type: string
id:
type: string
type: object
pkg_server_router.GetCredentialStatusResponse:
properties:
revoked:
type: boolean
type: object
pkg_server_router.GetCredentialsResponse:
properties:
credentials:
Expand Down Expand Up @@ -1319,6 +1365,18 @@ definitions:
items: {}
type: array
type: object
pkg_server_router.UpdateCredentialStatusRequest:
properties:
revoked:
type: boolean
required:
- revoked
type: object
pkg_server_router.UpdateCredentialStatusResponse:
properties:
revoked:
type: boolean
type: object
pkg_server_router.VerifyCredentialRequest:
properties:
credential:
Expand Down Expand Up @@ -1622,6 +1680,85 @@ paths:
summary: Get Credential
tags:
- CredentialAPI
/v1/credentials/{id}/status:
get:
consumes:
- application/json
description: Get credential status by id
parameters:
- description: ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetCredentialStatusResponse'
"400":
description: Bad request
schema:
type: string
summary: Get Credential Status
tags:
- CredentialAPI
put:
consumes:
- application/json
description: Update a credential's status
parameters:
- description: request body
in: body
name: request
required: true
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.UpdateCredentialStatusRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.UpdateCredentialStatusResponse'
"400":
description: Bad request
schema:
type: string
"500":
description: Internal server error
schema:
type: string
summary: Update Credential Status
tags:
- CredentialAPI
/v1/credentials/status/{id}:
get:
consumes:
- application/json
description: Get credential status list by id
parameters:
- description: ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetCredentialStatusListResponse'
"400":
description: Bad request
schema:
type: string
summary: Get Credential Status List
tags:
- CredentialAPI
/v1/credentials/verification:
put:
consumes:
Expand Down Expand Up @@ -1794,7 +1931,7 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.StoreKeyRequest'
$ref: '#/definitions/pkg_server_router.StoreKeyRequest'
produces:
- application/json
responses:
Expand Down Expand Up @@ -1828,7 +1965,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetKeyDetailsResponse'
$ref: '#/definitions/pkg_server_router.GetKeyDetailsResponse'
"400":
description: Bad request
schema:
Expand Down Expand Up @@ -2156,7 +2293,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/pkg_server_router.GetOperationsResponse'
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetOperationsResponse'
"400":
description: Bad request
schema:
Expand Down Expand Up @@ -2185,7 +2322,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/pkg_server_router.Operation'
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.Operation'
"400":
description: Bad request
schema:
Expand All @@ -2208,14 +2345,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 @@ -2272,7 +2409,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 All @@ -2297,7 +2434,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:
Expand All @@ -2318,14 +2455,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:
Expand All @@ -2347,14 +2484,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: Created
schema:
$ref: '#/definitions/pkg_server_router.Operation'
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.Operation'
"400":
description: Bad request
schema:
Expand All @@ -2377,7 +2514,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetSchemasResponse'
$ref: '#/definitions/pkg_server_router.GetSchemasResponse'
"500":
description: Internal server error
schema:
Expand All @@ -2395,14 +2532,14 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.CreateSchemaRequest'
$ref: '#/definitions/pkg_server_router.CreateSchemaRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.CreateSchemaResponse'
$ref: '#/definitions/pkg_server_router.CreateSchemaResponse'
"400":
description: Bad request
schema:
Expand Down Expand Up @@ -2459,7 +2596,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.GetSchemaResponse'
$ref: '#/definitions/pkg_server_router.GetSchemaResponse'
"400":
description: Bad request
schema:
Expand All @@ -2478,14 +2615,14 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.VerifySchemaRequest'
$ref: '#/definitions/pkg_server_router.VerifySchemaRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/github.com_tbd54566975_ssi-service_pkg_server_router.VerifySchemaResponse'
$ref: '#/definitions/pkg_server_router.VerifySchemaResponse'
"400":
description: Bad request
schema:
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/BurntSushi/toml v1.2.1
github.com/TBD54566975/ssi-sdk v0.0.2-alpha.0.20221110170444-a9e67907c8f9
github.com/TBD54566975/ssi-sdk v0.0.2-alpha.0.20221129172807-92be548d54be
github.com/ardanlabs/conf v1.5.0
github.com/dimfeld/httptreemux/v5 v5.5.0
github.com/go-playground/locales v0.14.0
Expand All @@ -31,7 +31,7 @@ require (
)

require (
github.com/bits-and-blooms/bitset v1.3.3 // indirect
github.com/bits-and-blooms/bitset v1.4.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
Expand All @@ -46,11 +46,11 @@ require (
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multicodec v0.7.0 // indirect
github.com/piprate/json-gold v0.4.2 // indirect
github.com/piprate/json-gold v0.5.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.0.2 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.1.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/term v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
Expand Down
Loading