File tree Expand file tree Collapse file tree 4 files changed +163
-0
lines changed
templates/libraries/jersey3 Expand file tree Collapse file tree 4 files changed +163
-0
lines changed Original file line number Diff line number Diff line change
1
+ { {! 不生成API } }
Original file line number Diff line number Diff line change
1
+ templateDir : ./templates/libraries/jersey3
2
+ files :
3
+ # api_single.mustache:
4
+ # folder: api
5
+ # templateType: API
6
+ # destinationFilename: Single.java
7
+ additionalProperties :
8
+ isRequestClass : true # 先用固定值测试
Original file line number Diff line number Diff line change
1
+ { {> licenseInfo} }
2
+
3
+ package { {package} };
4
+
5
+ import java.util.Objects;
6
+ import java.util.Arrays;
7
+ import java.util.Map;
8
+ import java.util.HashMap;
9
+ import lombok.*;
10
+ import io.swagger.annotations.ApiModel;
11
+ import com.alipay.global.api.request.AlipayRequest;
12
+ import com.alipay.global.api.response.AlipayResponse;
13
+ import com.alipay.global.api.model.ams.*;
14
+ import com.alipay.global.api.model.Result;
15
+ { {#lambdas.skipResultImport} }
16
+ { {#imports} }
17
+ import { {import} };
18
+ { {/imports} }
19
+ { {/lambdas.skipResultImport} }
20
+
21
+ { {#serializableModel} }
22
+ import java.io.Serializable;
23
+ { {/serializableModel} }
24
+
25
+ { {#withXml} }
26
+ import javax.xml.bind.annotation.*;
27
+ { {/withXml} }
28
+ { {#parcelableModel} }
29
+ import android.os.Parcelable;
30
+ import android.os.Parcel;
31
+ { {/parcelableModel} }
32
+ { {#useBeanValidation} }
33
+ import javax.validation.constraints.*;
34
+ import javax.validation.Valid;
35
+ { {/useBeanValidation} }
36
+ { {#performBeanValidation} }
37
+ import org.hibernate.validator.constraints.*;
38
+ { {/performBeanValidation} }
39
+
40
+ { {#models} }
41
+ { {#model} }
42
+ { {#oneOf} }
43
+ { {#first} }
44
+ import com.fasterxml.jackson.core.type.TypeReference;
45
+ { {/first} }
46
+ { {/oneOf} }
47
+
48
+ { {#isEnum} }
49
+ { {> modelEnum} }
50
+ { {/isEnum} }
51
+
52
+ { {^isEnum} }
53
+ { {#oneOf} }
54
+ { {! 将oneOf的逻辑内容放置此处 } }
55
+ { {/oneOf} }
56
+
57
+ { {^oneOf} }
58
+ { {#anyOf} }
59
+ { {! 将anyOf的逻辑内容放置此处 } }
60
+ { {/anyOf} }
61
+
62
+ { {^anyOf} }
63
+ { {> pojo} }
64
+ { {/anyOf} }
65
+ { {/oneOf} }
66
+ { {/isEnum} }
67
+ { {/model} }
68
+ { {/models} }
69
+
Original file line number Diff line number Diff line change
1
+ /**
2
+ * { {description} }{ {^description} }{ {classname} }{ {/description} }
3
+ */
4
+ { {#isDeprecated} }
5
+ @Deprecated{ {/isDeprecated} }
6
+ { {#description} }
7
+ @ApiModel(description = "{ {{.} }}")
8
+ { {/description} }
9
+ { {#lambdas.lombokRequest} }
10
+ { {classname} }
11
+ { {/lambdas.lombokRequest} }
12
+ { {> additionalModelTypeAnnotations} }{ {#discriminator} }{ {> typeInfoAnnotation} }{ {/discriminator} }{ {> xmlAnnotation} }
13
+ { {#vendorExtensions.x-class-extra-annotation} }
14
+ { {{vendorExtensions.x-class-extra-annotation} }}
15
+ { {/vendorExtensions.x-class-extra-annotation} }
16
+ public class { {classname} } { {#lambdas.parent} }{ {classname} } 1 { {/lambdas.parent} } {
17
+ {{#serializableModel} }
18
+ private static final long serialVersionUID = 1L;
19
+ { {/serializableModel} }
20
+
21
+
22
+ { {#vars} }
23
+ { {#lambdas.skipResult} }
24
+ { {#shouldRender} }
25
+
26
+ { {#isEnum} }
27
+ { {^isContainer} }
28
+ { {^vendorExtensions.x-enum-as-string} }
29
+ { {> modelInnerEnum} }
30
+ { {/vendorExtensions.x-enum-as-string} }
31
+ { {/isContainer} }
32
+ { {#isContainer} }
33
+ { {#mostInnerItems} }
34
+ { {> modelInnerEnum} }
35
+ { {/mostInnerItems} }
36
+ { {/isContainer} }
37
+ { {/isEnum} }
38
+
39
+
40
+ { {^vendorExtensions.x-is-jackson-optional-nullable} }
41
+ { {#isContainer} }
42
+ { {#deprecated} }
43
+ @Deprecated // deprecated { {#vendorExtensions.x-deprecatedInVersion} }since { {#appName} }{ {{.} }}{ {/appName} } v{ {.} }{ {/vendorExtensions.x-deprecatedInVersion} }{ {#vendorExtensions.x-deprecatedMessage} }: { {{.} }}{ {/vendorExtensions.x-deprecatedMessage} }
44
+ { {/deprecated} }
45
+ { {#description} }
46
+ /**
47
+ * { {.} }
48
+ */
49
+ { {/description} }
50
+ private { {{datatypeWithEnum} }} { {#lambdas.camelCase} } { {name} } { {/lambdas.camelCase} };
51
+ { {/isContainer} }
52
+ { {^isContainer} }
53
+ { {#deprecated} }
54
+ @Deprecated // d
55
+ eprecated { {#vendorExtensions.x-deprecatedInVersion} }since { {#appName} }{ {{.} }}{ {/appName} } v{ {.} }{ {/vendorExtensions.x-deprecatedInVersion} }{ {#vendorExtensions.x-deprecatedMessage} }: { {{.} }}{ {/vendorExtensions.x-deprecatedMessage} }
56
+ { {/deprecated} }
57
+ { {#description} }
58
+ /**
59
+ * { {.} }
60
+ */
61
+ { {/description} }
62
+ private { {{datatypeWithEnum} }} { {#lambdas.camelCase} } { {name} } { {/lambdas.camelCase} };
63
+ { {/isContainer} }
64
+ { {/vendorExtensions.x-is-jackson-optional-nullable} }
65
+
66
+ { {/shouldRender} }
67
+ { {/lambdas.skipResult} }
68
+
69
+
70
+ { {/vars} }
71
+
72
+
73
+
74
+
75
+ { {#lambdas.equals} }{ {classname} } { {serverUrl} }
76
+ { {/lambdas.equals} }
77
+
78
+
79
+ { {#lambdas.parent} }{ {classname} } 2
80
+ { {/lambdas.parent} }
81
+
82
+
83
+
84
+
85
+ }
You can’t perform that action at this time.
0 commit comments