Skip to content

Commit

Permalink
remove swaggertype and fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
andresuribe87 committed Jul 12, 2023
1 parent 9ed2063 commit 558913d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions doc/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1041,13 +1041,12 @@ definitions:
alumniOf: did_for_uni
type: object
evidence:
additionalProperties:
type: string
description: Optional. Corresponds to `evidence` in https://www.w3.org/TR/vc-data-model-2.0/#evidence
example:
' {''type''': ' [''DocumentVerification''}]'
'[{''id''': ' ''https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231''}'
type: object
- '[{"id":"https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231"'
- '"type":["DocumentVerification"]}]'
items: {}
type: array
expiry:
description: Optional. Corresponds to `expirationDate` in https://www.w3.org/TR/vc-data-model/#expiration.
example: "2029-01-01T19:23:24Z"
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/router/credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ type CreateCredentialRequest struct {
Suspendable bool `json:"suspendable,omitempty" example:"false"`

// Optional. Corresponds to `evidence` in https://www.w3.org/TR/vc-data-model-2.0/#evidence
Evidence []any `json:"evidence" swaggertype:"object,string" example:"[{'id': 'https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231'}, {'type': ['DocumentVerification'}]"`
Evidence []any `json:"evidence" example:"[{\"id\":\"https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231\",\"type\":[\"DocumentVerification\"]}]"`
// TODO(gabe) support more capabilities like signature type, format, and more.
}

Expand Down

0 comments on commit 558913d

Please sign in to comment.