From 41e97e6d2bd817c39e0ce6593acea8b9b290ddd6 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 12 May 2020 18:57:25 -0700 Subject: [PATCH 1/2] Mustache template should use invokerPackage tag to generate import --- .../Java/libraries/jersey2/AbstractOpenApiSchema.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache index cdba3be84552..c924650e6c0a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache @@ -2,7 +2,7 @@ package {{invokerPackage}}.model; -import org.openapitools.client.ApiException; +import {{invokerPackage}}.ApiException; import java.lang.reflect.Type; import java.util.Map; import javax.ws.rs.core.GenericType; From 4a605ac43c688cf828478167004bfefa3ca64e87 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 27 May 2020 22:27:23 -0700 Subject: [PATCH 2/2] fix typo and improve code comments --- .../libraries/jersey2/auth/HttpSignatureAuth.mustache | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache index 75adbdbba3fd..3e1c0f0e7f71 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache @@ -181,7 +181,7 @@ public class HttpSignatureAuth implements Authentication { /** * Returns the signer instance used to sign HTTP messages. * - * @returrn the signer instance. + * @return the signer instance. */ public Signer getSigner() { return signer; @@ -200,12 +200,14 @@ public class HttpSignatureAuth implements Authentication { * Set the private key used to sign HTTP requests using the HTTP signature scheme. * * @param key The private key. + * + * @throws InvalidKeyException Unable to parse the key, or the security provider for this key + * is not installed. */ - public void setPrivateKey(Key key) throws ApiException { + public void setPrivateKey(Key key) throws InvalidKeyException { if (key == null) { throw new ApiException("Private key (java.security.Key) cannot be null"); } - signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers)); }