class CertificateController {

    @ApiOperation(value = "Create a new base64 encoded X509 certificate for authentication at the "
                              + "XS2A API with the corresponding private key and meta data", response = CertificateResponse.class)
    @PostMapping
    public ResponseEntity<CertificateResponse> createCert(@ApiParam(value = "JSON request body for a certificate generation request message.", required = true)
                                                          @Valid @RequestBody CertificateRequest certificateRequest) {
        return ResponseEntity.status(HttpStatus.OK)
                   .body(certificateService.newCertificate(certificateRequest));
    }

}