Skip to content

Commit e15ba1f

Browse files
issue-496 make the code consistent with documentation and improve test (#497) (#501)
1 parent 7fdcd6f commit e15ba1f

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/OpenApiClientGeneratorWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public OpenApiClientGeneratorWrapper withAdditionalModelTypeAnnotationsConfig(fi
172172
*/
173173
public OpenApiClientGeneratorWrapper withAdditionalApiTypeAnnotationsConfig(final String additionalApiTypeAnnotations) {
174174
if (additionalApiTypeAnnotations != null) {
175-
this.configurator.addAdditionalProperty("additionalApiTypeAnnotations", additionalApiTypeAnnotations.split(","));
175+
this.configurator.addAdditionalProperty("additionalApiTypeAnnotations", additionalApiTypeAnnotations.split(";"));
176176
}
177177
return this;
178178
}

deployment/src/test/java/io/quarkiverse/openapi/generator/deployment/wrapper/OpenApiClientGeneratorWrapperTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,7 @@ private void verifyModelAdditionalAnnotations(File file) {
514514
void verifyAdditionalApiTypeAnnotations() throws URISyntaxException {
515515
List<File> generatedFiles = createGeneratorWrapper("petstore-openapi.json")
516516
.withEnabledSecurityGeneration(false)
517-
.withAdditionalApiTypeAnnotationsConfig(
518-
"@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders")
517+
.withAdditionalApiTypeAnnotationsConfig("@org.test.Foo;@org.test.Bar")
519518
.generate("org.additionalapitypeannotations");
520519
assertFalse(generatedFiles.isEmpty());
521520

@@ -529,9 +528,8 @@ private void verifyApiAdditionalAnnotations(File file) {
529528
CompilationUnit compilationUnit = StaticJavaParser.parse(file);
530529
compilationUnit.findAll(ClassOrInterfaceDeclaration.class)
531530
.forEach(c -> {
532-
assertThat(
533-
c.getAnnotationByName("RegisterClientHeaders"))
534-
.isPresent();
531+
assertThat(c.getAnnotationByName("Foo")).isPresent();
532+
assertThat(c.getAnnotationByName("Bar")).isPresent();
535533
});
536534
} catch (FileNotFoundException e) {
537535
throw new RuntimeException(e.getMessage());

integration-tests/security/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Authentication properties
22
org.acme.openapi.security.auth.basic_auth/username=john
33
org.acme.openapi.security.auth.basic_auth/password=test
4-
customAuth.additionalApiTypeAnnotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders,@org.eclipse.microprofile.rest.client.annotation.RegisterProvider(io.quarkiverse.openapi.generator.it.security.auth.DummyApiKeyAuthenticationProvider.class)
4+
customAuth.additionalApiTypeAnnotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;@org.eclipse.microprofile.rest.client.annotation.RegisterProvider(io.quarkiverse.openapi.generator.it.security.auth.DummyApiKeyAuthenticationProvider.class)
55

66
# since the file name has a space, we use the URI representation of this space here to not break the properties file
77
# see the RFC3986 for more info https://datatracker.ietf.org/doc/html/rfc3986

0 commit comments

Comments
 (0)