Skip to content

Commit

Permalink
feat(impl): [#559] add OpenAPI annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmf committed May 11, 2024
1 parent 7e61c02 commit 862c647
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,30 @@ public void deleteAllowedPolicy(@PathVariable("policyId") final String policyId)
service.deletePolicy(policyId);
}

@Operation(operationId = "removeAllowedPolicyFromBpnl",
summary = "Removes a policy from BPNL that should no longer be accepted in EDC negotiation.",
security = @SecurityRequirement(name = "api_key"), tags = { "Item Relationship Service" },
description = "Removes a policy from BPNL that should no longer be accepted in EDC negotiation.")
@ApiResponses(value = { @ApiResponse(responseCode = "200"),
@ApiResponse(responseCode = "400", description = "Policy deletion failed.",
content = { @Content(mediaType = APPLICATION_JSON_VALUE,
schema = @Schema(implementation = ErrorResponse.class),
examples = @ExampleObject(name = "error",
ref = "#/components/examples/error-response-400"))
}),
@ApiResponse(responseCode = "401", description = UNAUTHORIZED_DESC,
content = { @Content(mediaType = APPLICATION_JSON_VALUE,
schema = @Schema(implementation = ErrorResponse.class),
examples = @ExampleObject(name = "error",
ref = "#/components/examples/error-response-401"))
}),
@ApiResponse(responseCode = "403", description = FORBIDDEN_DESC,
content = { @Content(mediaType = APPLICATION_JSON_VALUE,
schema = @Schema(implementation = ErrorResponse.class),
examples = @ExampleObject(name = "error",
ref = "#/components/examples/error-response-403"))
}),
})
@DeleteMapping("/policies/{policyId}/bpnl/{bpnl}")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')")
Expand Down

0 comments on commit 862c647

Please sign in to comment.