Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit 9205e13

Browse files
authored
Merge pull request #834 from linwumingshi/feature/jsonformat-and-jsonSerialize
Feature/jsonformat and json serialize
2 parents df75888 + fe7f070 commit 9205e13

9 files changed

Lines changed: 851 additions & 78 deletions

File tree

src/main/java/com/ly/doc/constants/DocAnnotationConstants.java

Lines changed: 109 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,27 @@
2727
*/
2828
public interface DocAnnotationConstants {
2929

30-
30+
/**
31+
* jackson JsonIgnore annotation
32+
* {@code com.fasterxml.jackson.annotation.JsonIgnore}
33+
*/
3134
String SHORT_JSON_IGNORE = "JsonIgnore";
3235

3336
/**
3437
* jackson JsonIgnoreProperties annotation
38+
* {@code com.fasterxml.jackson.annotation.JsonIgnoreProperties}
3539
*/
3640
String SHORT_JSON_IGNORE_PROPERTIES = "JsonIgnoreProperties";
3741

42+
/**
43+
* jackson JsonProperty annotation
44+
* {@code com.fasterxml.jackson.annotation.JsonProperty}
45+
*/
3846
String SHORT_JSON_PROPERTY = "JsonProperty";
3947

4048
/**
41-
* com.fasterxml.jackson.databind.annotation.JsonSerialize
49+
* jackson JsonSerialize annotation
50+
* {@code com.fasterxml.jackson.databind.annotation.JsonSerialize}
4251
*/
4352
String SHORT_JSON_SERIALIZE = "JsonSerialize";
4453

@@ -52,50 +61,147 @@ public interface DocAnnotationConstants {
5261
*/
5362
String GSON_ALIAS_NAME = "SerializedName";
5463

64+
/**
65+
* fastjson annotation
66+
* {@code com.alibaba.fastjson.annotation.JSONField}
67+
*/
5568
String SHORT_JSON_FIELD = "JSONField";
5669

70+
/**
71+
* required
72+
*/
5773
String REQUIRED_PROP = "required";
5874

75+
/**
76+
* com.alibaba.fastjson.annotation.JSONField serialize prop
77+
* {@code com.alibaba.fastjson2.annotation.JSONField#serialize}
78+
*/
5979
String SERIALIZE_PROP = "serialize";
80+
81+
/**
82+
* com.alibaba.fastjson.annotation.JSONField deserialize prop
83+
* {@code com.alibaba.fastjson2.annotation.JSONField#deserialize}
84+
*/
6085
String DESERIALIZE_PROP = "deserialize";
6186

87+
/**
88+
* annotation name prop
89+
*/
6290
String NAME_PROP = "name";
6391

92+
/**
93+
* annotation value prop
94+
*/
6495
String VALUE_PROP = "value";
6596

97+
/**
98+
* annotation path prop
99+
*/
66100
String PATH_PROP = "path";
67101

102+
/**
103+
* annotation groups prop
104+
*/
68105
String GROUP_PROP = "groups";
69106

107+
/**
108+
* annotation defaultValue prop
109+
*/
70110
String DEFAULT_VALUE_PROP = "defaultValue";
71111

112+
/**
113+
* Deprecated annotation
114+
*/
72115
String DEPRECATED = "Deprecated";
73116

117+
/**
118+
* Jackson JsonValue annotation
119+
* {@code com.fasterxml.jackson.annotation.JsonValue}
120+
*/
74121
String JSON_VALUE = "JsonValue";
75122

123+
/**
124+
* Jackson JsonCreator annotation
125+
* {@code com.fasterxml.jackson.annotation.JsonCreator}
126+
*/
76127
String JSON_CREATOR = "JsonCreator";
77128

78-
129+
/**
130+
* Jackson JsonProperty annotation
131+
* {@code com.fasterxml.jackson.annotation.JsonProperty}
132+
*/
79133
String JSON_PROPERTY = "JsonProperty";
80134

135+
/**
136+
* Jackson JsonNaming annotation
137+
* {@code com.fasterxml.jackson.databind.annotation.JsonNaming}
138+
*/
81139
String JSON_NAMING = "JsonNaming";
82140

141+
/**
142+
* Jackson JsonFormat annotation
143+
* {@code com.fasterxml.jackson.annotation.JsonFormat}
144+
*/
145+
String JSON_FORMAT = "JsonFormat";
146+
147+
/**
148+
* Jackson JsonFormat annotation pattern prop
149+
* {@code com.fasterxml.jackson.annotation.JsonFormat#pattern}
150+
*/
151+
String JSON_FORMAT_PATTERN_PROP = "pattern";
152+
153+
/**
154+
* Jackson JsonFormat annotation shape prop
155+
* {@code com.fasterxml.jackson.annotation.JsonFormat#shape}
156+
*/
157+
String JSON_FORMAT_SHAPE_PROP = "shape";
158+
159+
/**
160+
* Jackson JsonFormat annotation timezone prop
161+
* {@code com.fasterxml.jackson.annotation.JsonFormat#timezone}
162+
*/
163+
String JSON_FORMAT_TIMEZONE_PROP = "timezone";
164+
165+
/**
166+
* Jackson JsonFormat annotation locale prop
167+
* {@code com.fasterxml.jackson.annotation.JsonFormat#locale}
168+
*/
169+
String JSON_FORMAT_LOCALE_PROP = "locale";
170+
171+
/**
172+
* Jackson JsonFormat annotation shape prop number
173+
* {@code com.fasterxml.jackson.annotation.JsonFormat.Shape#NUMBER}
174+
*/
175+
String JSON_FORMAT_SHAPE_NUMBER = "JsonFormat.Shape.NUMBER";
176+
177+
/**
178+
* Jackson JsonFormat annotation shape prop string
179+
* {@code com.fasterxml.jackson.annotation.JsonFormat.Shape#STRING}
180+
*/
181+
String JSON_FORMAT_SHAPE_STRING = "JsonFormat.Shape.STRING";
182+
83183
/**
84184
* Fastjson JSONType annotation
185+
* {@code com.alibaba.fastjson2.annotation.JSONType}
85186
*/
86187
String SHORT_JSON_TYPE = "JSONType";
87188

88189
/**
89190
* Fastjson JSONType annotation ignores prop
191+
* {@code com.alibaba.fastjson2.annotation.JSONType#ignores}
90192
*/
91193
String IGNORE_PROP = "ignores";
92194

93195
/**
94196
* `@javax.websocket.OnOpen` or `@jakarta.websocket.OnOpen` annotation name
197+
* {@code javax.websocket.OnOpen}
198+
* {@code jakarta.websocket.OnOpen}
95199
*/
96200
String ON_OPEN = "OnOpen";
97201
/**
98202
* `@javax.websocket.server.PathParam` or `@jakarta.websocket.PathParam` annotation name
203+
* {@code javax.websocket.server.PathParam}
204+
* {@code jakarta.websocket.server.PathParam}
99205
*/
100206
String PATH_PARAM = "PathParam";
101207
}

0 commit comments

Comments
 (0)