Skip to content

Commit 487db21

Browse files
committed
Replace qualified names with class import for JsonProperty
1 parent 63ca022 commit 487db21

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

client/integration-tests/jsonproperty-getter-and-setter/src/test/java/io/quarkiverse/openapi/generator/it/JsonPropertyGetterSetterTest.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.junit.jupiter.api.BeforeAll;
1515
import org.junit.jupiter.api.Test;
1616

17+
import com.fasterxml.jackson.annotation.JsonProperty;
1718
import com.fasterxml.jackson.databind.ObjectMapper;
1819

1920
import io.quarkus.test.junit.QuarkusTest;
@@ -67,8 +68,8 @@ void verifyJavaReflectionIndicatesJsonPropertyOnSettersAndGetters() {
6768
var getter = Animal.class.getMethod("getAnimalName");
6869
var setter = Animal.class.getMethod("setAnimalName", String.class);
6970

70-
var getterAnnotation = getter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
71-
var setterAnnotation = setter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
71+
var getterAnnotation = getter.getAnnotation(JsonProperty.class);
72+
var setterAnnotation = setter.getAnnotation(JsonProperty.class);
7273

7374
assertEquals("animal_name", getterAnnotation.value());
7475
assertEquals("animal_name", setterAnnotation.value());
@@ -79,8 +80,8 @@ void verifyJavaReflectionIndicatesJsonPropertyOnSettersAndGetters() {
7980
var getter = Primate.class.getMethod("getAnimalName");
8081
var setter = Primate.class.getMethod("setAnimalName", String.class);
8182

82-
var getterAnnotation = getter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
83-
var setterAnnotation = setter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
83+
var getterAnnotation = getter.getAnnotation(JsonProperty.class);
84+
var setterAnnotation = setter.getAnnotation(JsonProperty.class);
8485

8586
assertEquals("animal_name", getterAnnotation.value());
8687
assertEquals("animal_name", setterAnnotation.value());
@@ -91,8 +92,8 @@ void verifyJavaReflectionIndicatesJsonPropertyOnSettersAndGetters() {
9192
var getter = Mammal.class.getMethod("getAnimalName");
9293
var setter = Mammal.class.getMethod("setAnimalName", String.class);
9394

94-
var getterAnnotation = getter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
95-
var setterAnnotation = setter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
95+
var getterAnnotation = getter.getAnnotation(JsonProperty.class);
96+
var setterAnnotation = setter.getAnnotation(JsonProperty.class);
9697

9798
assertEquals("animal_name", getterAnnotation.value());
9899
assertEquals("animal_name", setterAnnotation.value());
@@ -107,8 +108,8 @@ void verifyJavaReflectionIndicatesJsonPropertyOnSettersAndGettersQueryParam() {
107108
var getter = Animal.AnimalQueryParam.class.getMethod("getAnimalName");
108109
var setter = Animal.AnimalQueryParam.class.getMethod("setAnimalName", String.class);
109110

110-
var getterAnnotation = getter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
111-
var setterAnnotation = setter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
111+
var getterAnnotation = getter.getAnnotation(JsonProperty.class);
112+
var setterAnnotation = setter.getAnnotation(JsonProperty.class);
112113

113114
assertEquals("animal_name", getterAnnotation.value());
114115
assertEquals("animal_name", setterAnnotation.value());
@@ -120,8 +121,8 @@ void verifyJavaReflectionIndicatesJsonPropertyOnSettersAndGettersQueryParam() {
120121
var getter = Mammal.MammalQueryParam.class.getMethod("getAnimalName");
121122
var setter = Mammal.MammalQueryParam.class.getMethod("setAnimalName", String.class);
122123

123-
var getterAnnotation = getter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
124-
var setterAnnotation = setter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
124+
var getterAnnotation = getter.getAnnotation(JsonProperty.class);
125+
var setterAnnotation = setter.getAnnotation(JsonProperty.class);
125126

126127
assertEquals("animal_name", getterAnnotation.value());
127128
assertEquals("animal_name", setterAnnotation.value());
@@ -133,8 +134,8 @@ void verifyJavaReflectionIndicatesJsonPropertyOnSettersAndGettersQueryParam() {
133134
var getter = Primate.PrimateQueryParam.class.getMethod("getAnimalName");
134135
var setter = Primate.PrimateQueryParam.class.getMethod("setAnimalName", String.class);
135136

136-
var getterAnnotation = getter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
137-
var setterAnnotation = setter.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class);
137+
var getterAnnotation = getter.getAnnotation(JsonProperty.class);
138+
var setterAnnotation = setter.getAnnotation(JsonProperty.class);
138139

139140
assertEquals("animal_name", getterAnnotation.value());
140141
assertEquals("animal_name", setterAnnotation.value());

0 commit comments

Comments
 (0)