Skip to content

Commit 29ee1d5

Browse files
committed
Merge remote-tracking branch 'upstream/master' into serializer
2 parents 6f70a95 + 9191ce2 commit 29ee1d5

File tree

7 files changed

+10
-166
lines changed

7 files changed

+10
-166
lines changed

http-generator-core/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<dependency>
1616
<groupId>io.avaje</groupId>
1717
<artifactId>avaje-prisms</artifactId>
18-
<version>1.3</version>
18+
<version>1.4</version>
1919
<optional>true</optional>
2020
<scope>provided</scope>
2121
</dependency>
@@ -37,7 +37,7 @@
3737
<dependency>
3838
<groupId>io.swagger.core.v3</groupId>
3939
<artifactId>swagger-models</artifactId>
40-
<version>${swagger.version}</version>
40+
<version>${swagger.version}</version>
4141
<exclusions>
4242
<exclusion>
4343
<groupId>com.fasterxml.jackson.core</groupId>
@@ -63,9 +63,9 @@
6363
</dependency>
6464

6565
<dependency>
66-
<groupId>jakarta.inject</groupId>
67-
<artifactId>jakarta.inject-api</artifactId>
68-
<version>2.0.1</version>
66+
<groupId>io.swagger.core.v3</groupId>
67+
<artifactId>swagger-annotations</artifactId>
68+
<version>${swagger.version}</version>
6969
<optional>true</optional>
7070
<scope>provided</scope>
7171
</dependency>
@@ -83,7 +83,7 @@
8383
<path>
8484
<groupId>io.avaje</groupId>
8585
<artifactId>avaje-prisms</artifactId>
86-
<version>1.3</version>
86+
<version>1.4</version>
8787
</path>
8888
</annotationProcessorPaths>
8989
</configuration>

http-generator-core/src/main/java/io/avaje/http/generator/core/ControllerReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private List<Element> initInterfaces() {
107107
final Element ifaceElement = ctx.asElement(anInterface);
108108
final var controller = ControllerPrism.getInstanceOn(ifaceElement);
109109
if (controller != null && !controller.value().isBlank()
110-
|| PathPrism.getInstanceOn(ifaceElement) != null) {
110+
|| PathPrism.isPresent(ifaceElement)) {
111111
interfaces.add(ifaceElement);
112112
}
113113
}

http-generator-core/src/main/java/io/avaje/http/generator/core/ElementReader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ private boolean useValidation() {
6262
}
6363
final var elementType = ctx.typeElement(rawType);
6464
return elementType != null
65-
&& (ValidPrism.getInstanceOn(elementType) != null
66-
|| JavaxValidPrism.getInstanceOn(elementType) != null);
65+
&& (ValidPrism.isPresent(elementType) || JavaxValidPrism.isPresent(elementType));
6766
}
6867

6968
private void readAnnotations(Element element, ParamType defaultType) {

http-generator-core/src/main/java/io/avaje/http/generator/core/JavaxInjectPrism.java

Lines changed: 0 additions & 152 deletions
This file was deleted.

http-generator-core/src/main/java/io/avaje/http/generator/core/openapi/SchemaDocBuilder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ private <T> void populateObjectSchema(TypeMirror objectType, Schema<T> objectSch
232232
}
233233

234234
private void setFormatFromValidation(Element element, Schema<?> propSchema) {
235-
if (EmailPrism.getOptionalOn(element).isPresent()
236-
|| JavaxEmailPrism.getOptionalOn(element).isPresent()) {
235+
if (EmailPrism.isPresent(element) || JavaxEmailPrism.isPresent(element)) {
237236
propSchema.setFormat("email");
238237
}
239238
}
@@ -311,7 +310,7 @@ private boolean ignoreField(VariableElement field) {
311310
}
312311

313312
private boolean isHiddenField(VariableElement field) {
314-
if (HiddenPrism.getOptionalOn(field).isPresent()) {
313+
if (HiddenPrism.isPresent(field)) {
315314
return true;
316315
}
317316
for (AnnotationMirror annotationMirror : field.getAnnotationMirrors()) {

http-generator-core/src/main/java/io/avaje/http/generator/core/package-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
@GeneratePrism(value = io.avaje.http.api.Post.class, publicAccess = true)
1717
@GeneratePrism(value = io.avaje.http.api.Produces.class, publicAccess = true)
1818
@GeneratePrism(value = io.avaje.http.api.Put.class, publicAccess = true)
19-
@GeneratePrism(value = jakarta.inject.Inject.class)
2019
@GeneratePrism(value = io.swagger.v3.oas.annotations.OpenAPIDefinition.class, publicAccess = true)
2120
@GeneratePrism(value = io.swagger.v3.oas.annotations.tags.Tag.class, publicAccess = true)
2221
@GeneratePrism(value = io.swagger.v3.oas.annotations.tags.Tags.class, publicAccess = true)

http-generator-core/src/main/java/module-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@
1313
requires static transitive io.swagger.v3.oas.models;
1414
requires static transitive io.swagger.v3.oas.annotations;
1515
requires static transitive java.validation;
16-
requires static transitive jakarta.inject;
1716
requires static transitive jakarta.validation;
1817
}

0 commit comments

Comments
 (0)