File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
src/main/java/io/avaje/http/generator/core/openapi Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 34
34
<scope >provided</scope >
35
35
</dependency >
36
36
37
- <dependency >
38
- <groupId >io.swagger.core.v3</groupId >
39
- <artifactId >swagger-annotations</artifactId >
40
- <version >${swagger.version} </version >
41
- <scope >provided</scope >
42
- </dependency >
43
37
<dependency >
44
38
<groupId >io.swagger.core.v3</groupId >
45
39
<artifactId >swagger-models</artifactId >
Original file line number Diff line number Diff line change 3
3
import java .lang .reflect .Field ;
4
4
import java .util .Collection ;
5
5
import java .util .Map ;
6
+ import java .util .Set ;
6
7
7
8
final class OpenAPISerializer {
8
9
10
+ private static final Set <String > IGNORED_FIELDS = Set .of (
11
+ "SCHEMA_RESOLUTION_PROPERTY" ,
12
+ "BIND_TYPE_AND_TYPES" ,
13
+ "BINARY_STRING_CONVERSION_PROPERTY" ,
14
+ "COMPONENTS_SCHEMAS_REF" ,
15
+ "APPLY_SCHEMA_RESOLUTION_PROPERTY" ,
16
+ "exampleSetFlag" ,
17
+ "types" ,
18
+ "specVersion" );
19
+
9
20
private OpenAPISerializer () {}
10
21
11
22
/**
@@ -65,13 +76,8 @@ static String serialize(Object obj) throws IllegalAccessException {
65
76
for (final Field field : fields ) {
66
77
67
78
// skip JsonIgnored fields
68
- if ("SCHEMA_RESOLUTION_PROPERTY" .equals (field .getName ())
69
- || "BIND_TYPE_AND_TYPES" .equals (field .getName ())
70
- || "BINARY_STRING_CONVERSION_PROPERTY" .equals (field .getName ())
71
- || "COMPONENTS_SCHEMAS_REF" .equals (field .getName ())
72
- || "exampleSetFlag" .equals (field .getName ())
73
- || "types" .equals (field .getName ())
74
- || "specVersion" .equals (field .getName ())) {
79
+ if (IGNORED_FIELDS
80
+ .contains (field .getName ())) {
75
81
continue ;
76
82
}
77
83
You can’t perform that action at this time.
0 commit comments