class NetworkController {

    @Path("/peer/blacklist")
    @POST
    @Produces(MediaType.TEXT_HTML)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @Operation(
        summary = "Blacklist a peer.",
        description = "Blacklist a peer for the default blacklisting period.",
        security = @SecurityRequirement(name = "admin_api_key"),
        method = "POST",
        tags = {"networking"},
        responses = {
            @ApiResponse(responseCode = "200", description = "Successful execution",
                content = @Content(mediaType = "text/html",
                    schema = @Schema(implementation = ResponseDone.class)))
        }
    )
    @RolesAllowed("admin")
    public Response addPeerInBlackList(@Parameter(schema = @Schema(implementation = String.class, description = "the IP address or domain name of the peer"))
                                       @FormParam("peer")
                                       @NotNull
                                           String peerAddress) {
        ResponseBuilder response = ResponseBuilder.done();

        Peer peer = service.putPeerInBlackList(peerAddress);

        if (peer == null) {
            return response.error(ApiErrors.UNKNOWN_VALUE, "peer", peerAddress).build();
        }

        return response.build();
    }

    public  NetworkController(Converter<Peer, PeerDTO> peerConverter, NetworkService service);

}