Skip to content

Commit

Permalink
fix api
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Dec 27, 2023
1 parent 9d01206 commit 730452a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/apidoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:
jobs:
Publish-To-SwaggerHub:
# do NOT run on forks. The Org ("edc") is unique all across SwaggerHub
# if: github.repository == 'eclipse-edc/IdentityHub'
if: github.repository == 'eclipse-edc/IdentityHub'
runs-on: ubuntu-latest
env:
rootDir: resources/openapi/yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.media.ArraySchema;
Expand All @@ -37,9 +36,8 @@
@SecurityScheme(name = "Authentication",
description = "Self-Issued ID token containing an access_token",
type = SecuritySchemeType.HTTP,
scheme = "Bearer",
bearerFormat = "JWT",
in = SecuritySchemeIn.HEADER)
scheme = "bearer",
bearerFormat = "JWT")
public interface PresentationApi {

@Tag(name = "Resolution API")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package org.eclipse.edc.identityhub.api.didmanagement.v1;

import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
Expand Down Expand Up @@ -84,7 +83,8 @@ public void updateDid(DidDocument document, @QueryParam("republish") boolean rep
}

@Override
@DELETE
@POST
@Path("/delete")
public void deleteDidFromBody(DidRequestPayload request) {
documentService.deleteById(request.did())
.orElseThrow(exceptionMapper(DidDocument.class, request.did()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void deleteDid_success() {
when(didDocumentServiceMock.deleteById(eq(TEST_DID))).thenReturn(ServiceResult.success());
baseRequest()
.body(new DidRequestPayload(TEST_DID))
.delete("/")
.post("/delete")
.then()
.log().ifError()
.statusCode(204);
Expand All @@ -270,7 +270,7 @@ void deleteDid_whenNotExist_expect404() {
when(didDocumentServiceMock.deleteById(eq(TEST_DID))).thenReturn(ServiceResult.notFound("test-message"));
baseRequest()
.body(new DidRequestPayload(TEST_DID))
.delete("/")
.post("/delete")
.then()
.log().ifError()
.statusCode(404);
Expand All @@ -284,7 +284,7 @@ void deleteDid_whenAlreadyPublished_expect409() {
when(didDocumentServiceMock.deleteById(eq(TEST_DID))).thenReturn(ServiceResult.conflict("test-message"));
baseRequest()
.body(new DidRequestPayload(TEST_DID))
.delete("/")
.post("/delete")
.then()
.log().ifError()
.statusCode(409);
Expand Down

0 comments on commit 730452a

Please sign in to comment.