Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal committed Oct 24, 2023
1 parent 909caf0 commit ee8dbb5
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ components:
items:
type: string
issuer:
$ref: "#/components/schemas/CredentialIssuer"
type: string
issuanceDate:
type: string
expirationDate:
Expand Down
7 changes: 1 addition & 6 deletions openapi/openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/web5-js/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export interface components {
"@context": string[];
id: string;
type: string[];
issuer: components["schemas"]["CredentialIssuer"];
issuer: string;
issuanceDate: string;
expirationDate: string;
credentialSubject: components["schemas"]["CredentialSubject"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data class CredentialIssuanceRequestCredential(
val `@context`: List<String>?,
val id: kotlin.String,
val type: kotlin.collections.List<kotlin.String>,
val issuer: CredentialIssuer,
val issuer: kotlin.String,
val issuanceDate: kotlin.String?,
val expirationDate: kotlin.String?,
val credentialSubject: kotlin.collections.Map<kotlin.String, kotlin.Any>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ data class VerifiableCredential(
val `@context`: List<String>,
val id: kotlin.String,
val type: kotlin.collections.List<kotlin.String>,
val issuer: CredentialIssuer,
val issuer: kotlin.String,
val issuanceDate: kotlin.String,
val expirationDate: kotlin.String,
val credentialSubject: kotlin.collections.Map<kotlin.String, kotlin.Any>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ suspend fun ApplicationCall.credentialIssue() {

val vcDataModel = VcDataModel.builder()
.id(URI.create(reqVc.id))
.issuer(URI.create(reqVc.issuer.id))
.issuer(URI.create(reqVc.issuer))
.issuanceDate(Date())
.credentialSubject(credentialSubject)
.build()
Expand Down
6 changes: 5 additions & 1 deletion tests/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func vcCreate(ctx context.Context, serverURL string) []error {
// ExpirationDate: ,
Id: expectedID,
// IssuanceDate: ,
Issuer: openapi.CredentialIssuer{Id: expectedIssuer},
Issuer: expectedIssuer,
Type: expectedType,
},
})
Expand Down Expand Up @@ -104,6 +104,10 @@ func vcCreate(ctx context.Context, serverURL string) []error {
errs = append(errs, err)
}

if err := compareStrings(payload.Vc.Issuer, expectedIssuer, "issuer"); err != nil {
errs = append(errs, err)
}

//switch issuer := payload.Vc.Issuer.(type) {
//case string:
// if err := compareStrings(issuer, expectedIssuer, "issuer"); err != nil {
Expand Down

0 comments on commit ee8dbb5

Please sign in to comment.