Skip to content

Commit

Permalink
fix: 336-invalid-openapi-file-for-custodian-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeplotean committed Sep 17, 2023
1 parent 7d7119a commit 003f101
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/kotlin/id/walt/rest/custodian/CustodianController.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package id.walt.rest.custodian

import com.beust.klaxon.JsonObject
import id.walt.common.KlaxonWithConverters
import id.walt.common.VCObjectList
import id.walt.credentials.w3c.PresentableCredential
Expand Down Expand Up @@ -158,7 +159,7 @@ object CustodianController {

fun storeCredentialsDocs() = document()
.operation { it.summary("Stores a credential").operationId("storeCredential").addTagsItem("Credentials") }
.body<Map<String, Any>> {
.body<JsonObject> {
it.description(
"The body should contain, the VC you want to store. If you don't want to adjust anything in the VC." +
"You can simply paste the response you've got from the create VC endpoint and ignore the described parameters."
Expand Down Expand Up @@ -189,7 +190,7 @@ object CustodianController {
.addTagsItem("Credentials")
}
.body<PresentCredentialsRequest>()
.json<Map<String, Any>>("200") { it.description("The newly created VerifiablePresentation") }
.json<JsonObject>("200") { it.description("The newly created VerifiablePresentation") }


fun presentCredentials(ctx: Context) {
Expand All @@ -213,7 +214,7 @@ object CustodianController {
.addTagsItem("Credentials")
}
.body<PresentCredentialIdsRequest>()
.json<Map<String, Any>>("200") { it.description("The newly created VerifiablePresentation") }
.json<JsonObject>("200") { it.description("The newly created VerifiablePresentation") }


fun presentCredentialIds(ctx: Context) {
Expand Down

0 comments on commit 003f101

Please sign in to comment.