Skip to content

Commit

Permalink
fix: pr174 (#178)
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <[email protected]>
Co-authored-by: Mirko Mollik <[email protected]>
  • Loading branch information
mikeplotean and cre8 authored Oct 29, 2023
1 parent 5f02452 commit b1cfd08
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
15 changes: 9 additions & 6 deletions src/main/kotlin/id/walt/issuer/backend/IssuerController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import id.walt.multitenancy.Tenant
import id.walt.multitenancy.TenantId
import id.walt.rest.core.DidController
import id.walt.rest.core.KeyController
import id.walt.rest.core.VcController
import id.walt.services.oidc.OIDC4CIService
import id.walt.signatory.rest.SignatoryController
import id.walt.verifier.backend.WalletConfiguration
Expand Down Expand Up @@ -60,7 +61,10 @@ object IssuerController {
fun OpenApiDocumentation.describeTenantId() =
this.run { pathParam<String>("tenantId") { it.example(TenantId.DEFAULT_TENANT) } }

path("did") {
path("did") {
get("list", documented(DidController.listDocs().describeTenantId(), DidController::list))
get("{id}", documented(DidController.loadDocs().describeTenantId(), DidController::load))
delete("{id}", documented(DidController.deleteDocs().describeTenantId(), DidController::delete))
post("create", documented(DidController.createDocs().describeTenantId(), DidController::create))
post("createAdvanced",
documented(document().operation {
Expand All @@ -74,18 +78,17 @@ object IssuerController {
WalletController::createDid
)
)
post("resolve", documented(DidController.resolveDocs().describeTenantId(), DidController::resolve))
post("import", documented(DidController.importDocs().describeTenantId(), DidController::import))
get("list", documented(DidController.listDocs().describeTenantId(), DidController::list))
post("delete", documented(DidController.deleteDocs().describeTenantId(), DidController::delete))
}

path("key") {
get("list", documented(KeyController.listDocs().describeTenantId(), KeyController::list))
get("{id}", documented(KeyController.loadDocs().describeTenantId(), KeyController::load))
delete("{id}", documented(KeyController.deleteDocs().describeTenantId(), KeyController::delete))
post("gen", documented(KeyController.genDocs().describeTenantId(), KeyController::gen))
post("import", documented(KeyController.importDocs().describeTenantId(), KeyController::import))
post("export", documented(KeyController.exportDocs().describeTenantId(), KeyController::export))
delete("delete", documented(KeyController.deleteDocs().describeTenantId(), KeyController::delete))
get("list", documented(KeyController.listDocs().describeTenantId(), KeyController::list))
post("load", documented(KeyController.loadDocs().describeTenantId(), KeyController::load))
}

post("setConfiguration", documented(document().operation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object MultitenancyController {
it.summary("List multitenancy *LOADED* tenants. If no tenants are loaded (e.g. right after a restart) this method will indeed return an empty list.")
.addTagsItem("Multitenancy")
.operationId("listLoadedTenants")
}.json<List<TenantId>>("200"),
}.jsonArray<TenantId>("200"),
MultitenancyController::listLoadedTenants
)
)
Expand All @@ -36,7 +36,7 @@ object MultitenancyController {
)
.addTagsItem("Multitenancy")
.operationId("listAllTenantIdsByType")
}.json<List<String>>("200"),
}.jsonArray<String>("200"),
MultitenancyController::listAllTenantIdsByType
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ object WalletController {
documented(CustodianController.storeCredentialsDocs(), CustodianController::storeCredential),
UserRole.AUTHORIZED
)
get(
"{id}",
documented(CustodianController.getCredentialDocs(), CustodianController::getCredential),
UserRole.AUTHORIZED
)
}
path("keys") {
get(
Expand Down

0 comments on commit b1cfd08

Please sign in to comment.