aboutsummaryrefslogtreecommitdiffstats
path: root/certService/src/main
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-02-12 07:49:02 +0100
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-02-12 08:02:28 +0100
commitc88b66b45d24af033587f3c5020991460ac58302 (patch)
treefc81812bedb7c31c6eae04301d82084995a1f9de /certService/src/main
parentab3855c97a649398d75e31e68528f9c82f0f9e4f (diff)
Generate openAPI 3.0 specification.
Issue-ID: AAF-995 Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> Change-Id: I3de5dae9688d89b3bac0d86beff982247667854d
Diffstat (limited to 'certService/src/main')
-rw-r--r--certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java6
-rw-r--r--certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java2
-rw-r--r--certService/src/main/resources/application.properties1
3 files changed, 5 insertions, 4 deletions
diff --git a/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java b/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java
index 80858f4d..98daa6eb 100644
--- a/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java
+++ b/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java
@@ -39,14 +39,14 @@ public class CsrModelFactory {
private final PemObjectFactory pemObjectFactory = new PemObjectFactory();
public CsrModel createCsrModel(StringBase64 csr, StringBase64 privateKey) throws CsrDecryptionException {
- LOGGER.debug("Decoded CSR: \n{}", csr.asString());
+ LOGGER.debug("Decoded CSR: \n{}", csr);
try {
- PemObject pemObject = pemObjectFactory.createPmObject(csr.asString());
+ PemObject pemObject = pemObjectFactory.createPemObject(csr.asString());
PKCS10CertificationRequest decodedCsr = new PKCS10CertificationRequest(
pemObject.getContent()
);
- PemObject decodedPrivateKey = pemObjectFactory.createPmObject(privateKey.asString());
+ PemObject decodedPrivateKey = pemObjectFactory.createPemObject(privateKey.asString());
return new CsrModel(decodedCsr, decodedPrivateKey);
} catch (IOException e) {
throw new CsrDecryptionException("Incorrect CSR, decryption failed", e);
diff --git a/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java b/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java
index e3339cc4..08ffc56d 100644
--- a/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java
+++ b/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java
@@ -31,7 +31,7 @@ import org.onap.aaf.certservice.certification.exceptions.CsrDecryptionException;
public class PemObjectFactory {
- public PemObject createPmObject(String pem) throws CsrDecryptionException {
+ public PemObject createPemObject(String pem) throws CsrDecryptionException {
try (StringReader stringReader = new StringReader(pem);
PemReader pemReader = new PemReader(stringReader)) {
diff --git a/certService/src/main/resources/application.properties b/certService/src/main/resources/application.properties
index a157ae66..b9ce108a 100644
--- a/certService/src/main/resources/application.properties
+++ b/certService/src/main/resources/application.properties
@@ -2,3 +2,4 @@
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
springdoc.swagger-ui.path=/docs
+springdoc.show-actuator=true