@team-supercharge/oasg 13.0.0-test-export-01191261.0 → 14.0.0-remove-instant-mapping-634c95c0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -12
- package/bin/oasg +11 -14
- package/config.schema.yml +3 -3
- package/package.json +2 -2
- package/targets/android/generate.sh +2 -2
- package/targets/android/generator-config.json +6 -1
- package/targets/android/templates/build.gradle.mustache +54 -21
- package/targets/android/templates/libraries/jvm-retrofit2/api.mustache +2 -10
- package/targets/android/templates/libraries/jvm-retrofit2/infrastructure/ApiClient.kt.mustache +354 -0
- package/targets/common.sh +0 -8
- package/targets/feign/generator-config.json +4 -11
- package/targets/feign/templates/beanValidation.mustache +2 -7
- package/targets/feign/templates/formParams.mustache +2 -1
- package/targets/feign/templates/libraries/spring-cloud/clientConfiguration.mustache +118 -0
- package/targets/feign/templates/libraries/spring-cloud/pom-sb3.mustache +16 -16
- package/targets/feign/templates/libraries/spring-cloud/pom.mustache +16 -16
- package/targets/feign-kotlin/generator-config.json +3 -13
- package/targets/feign-kotlin/templates/libraries/spring-cloud/pom-sb3.mustache +2 -1
- package/targets/flutter/generate.sh +0 -5
- package/targets/nestjs/generate.sh +1 -0
- package/targets/nestjs/generator-config.json +5 -0
- package/targets/nestjs/templates/api.service.mustache +1 -1
- package/targets/nestjs/templates/reorder-operations.js +1 -1
- package/targets/nestjs/templates/rewrite-path-parameters.js +2 -2
- package/targets/react/generator-config.json +14 -0
- package/targets/spring/generator-config.json +3 -9
- package/targets/spring/templates/libraries/spring-boot/pom-sb3.mustache +247 -0
- package/targets/spring/templates/libraries/spring-boot/pom.mustache +257 -0
- package/targets/spring-kotlin/generator-config.json +3 -7
- package/targets/spring-kotlin/templates/libraries/spring-boot/pom-sb3.mustache +0 -1
- package/targets/spring-kotlin/templates/libraries/spring-boot/pom.mustache +0 -1
- package/targets/.env +0 -3
- package/targets/feign-kotlin/templates/apiInterface.mustache +0 -108
- package/targets/feign-kotlin/templates/dataClassReqVar.mustache +0 -5
- package/targets/react-native/generator-config.json +0 -7
- package/targets/spring-kotlin/templates/dataClassReqVar.mustache +0 -5
- /package/targets/{react-native → react}/generate.sh +0 -0
- /package/targets/{react-native → react}/publish.sh +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
{{! attach sources }}
|
2
|
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
3
4
|
<modelVersion>4.0.0</modelVersion>
|
4
5
|
<groupId>{{groupId}}</groupId>
|
5
6
|
<artifactId>{{artifactId}}</artifactId>
|
@@ -16,11 +16,6 @@ java -jar $binary generate \
|
|
16
16
|
-ppubRepository=$repository \
|
17
17
|
-ppubVersion=$version $generatorCustomArgs
|
18
18
|
|
19
|
-
echo '--------------------------------'
|
20
|
-
echo $DART_SDK
|
21
|
-
echo $TEST_VARIABLE
|
22
|
-
echo '--------------------------------'
|
23
|
-
|
24
19
|
cd out/$targetId
|
25
20
|
dart pub get
|
26
21
|
dart run build_runner build
|
@@ -47,7 +47,7 @@ export abstract class {{classname}} {
|
|
47
47
|
//// @{{httpMethod}}('{{path}}'){{#isMultipart}}
|
48
48
|
@UseInterceptors(FileInterceptor({{#formParams}}{{#isFile}}'{{paramName}}'{{/isFile}}{{/formParams}})){{/isMultipart}}
|
49
49
|
@HttpCode({{#responses.0}}{{code}}{{/responses.0}})
|
50
|
-
private _{{nickname}}(@Request() req{{#allParams}}{{^isBodyParam}}, {{#isQueryParam}}@Query({{/isQueryParam}}{{#isPathParam}}@Param({{/isPathParam}}{{#isHeaderParam}}@Headers({{/isHeaderParam}}{{#isFormParam}}{{^isFile}}@Body({{/isFile}}{{#isFile}}@UploadedFile({{/isFile}}{{/isFormParam}}'{{paramName}}'{{#required}}, RequiredPipe{{/required}}{{#isArray}}, new ApiParseArrayPipe({ optional: true{{#items}}{{#isNumeric}}, items: Number{{/isNumeric}}{{#isBoolean}}, items: Boolean{{/isBoolean}}{{/items}} }){{/isArray}}{{#isNumber}}, OptionalParseFloatPipe{{/isNumber}}{{#isFloat}}, OptionalParseFloatPipe{{/isFloat}}{{#isDouble}}, OptionalParseFloatPipe{{/isDouble}}{{#isInteger}}, OptionalParseIntPipe{{/isInteger}}{{#isLong}}, OptionalParseIntPipe{{/isLong}}{{#isBoolean}}, OptionalParseBoolPipe{{/isBoolean}}{{#allowableValues}}{{^enumVars.empty}}, new OptionalParseEnumPipe({{{dataType}}}){{/enumVars.empty}}{{/allowableValues}}) {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{/isBodyParam}}{{/allParams}}{{#bodyParam}}, @Body(new ApiValidationPipe({ whitelist: true, forbidNonWhitelisted: true })) requestBody{{^required}}?{{/required}}: {{{dataType}}}{{/bodyParam}}): Promise<{{#returnType}}{{#isResponseFile}}StreamableFile{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
|
50
|
+
private _{{nickname}}(@Request() req{{#allParams}}{{^isBodyParam}}, {{#isQueryParam}}@Query({{/isQueryParam}}{{#isPathParam}}@Param({{/isPathParam}}{{#isHeaderParam}}@Headers({{/isHeaderParam}}{{#isFormParam}}{{^isFile}}@Body({{/isFile}}{{#isFile}}@UploadedFile({{/isFile}}{{/isFormParam}}'{{paramName}}'{{#required}}{{#isHeaderParam}}{{/isHeaderParam}}{{^isHeaderParam}}, RequiredPipe{{/isHeaderParam}}{{/required}}{{#isArray}}, new ApiParseArrayPipe({ optional: true{{#items}}{{#isNumeric}}, items: Number{{/isNumeric}}{{#isBoolean}}, items: Boolean{{/isBoolean}}{{/items}} }){{/isArray}}{{#isNumber}}, OptionalParseFloatPipe{{/isNumber}}{{#isFloat}}, OptionalParseFloatPipe{{/isFloat}}{{#isDouble}}, OptionalParseFloatPipe{{/isDouble}}{{#isInteger}}, OptionalParseIntPipe{{/isInteger}}{{#isLong}}, OptionalParseIntPipe{{/isLong}}{{#isBoolean}}, OptionalParseBoolPipe{{/isBoolean}}{{#allowableValues}}{{^enumVars.empty}}, new OptionalParseEnumPipe({{{dataType}}}){{/enumVars.empty}}{{/allowableValues}}) {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{/isBodyParam}}{{/allParams}}{{#bodyParam}}, @Body(new ApiValidationPipe({ whitelist: true, forbidNonWhitelisted: true })) requestBody{{^required}}?{{/required}}: {{{dataType}}}{{/bodyParam}}): Promise<{{#returnType}}{{#isResponseFile}}StreamableFile{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
|
51
51
|
return this.{{nickname}}({{#allParams.0}}{ params: { {{#allParams}}{{^isBodyParam}}{{^-first}}, {{/-first}}{{paramName}}{{/isBodyParam}}{{/allParams}} }{{#bodyParam}}, body: requestBody{{/bodyParam}} }, {{/allParams.0}}req);
|
52
52
|
}
|
53
53
|
|
@@ -3,7 +3,7 @@ const fs = require('fs');
|
|
3
3
|
const apiFolder = './api';
|
4
4
|
const apiFileSuffix = '.api.ts';
|
5
5
|
const separator = '// ||||||||||\n';
|
6
|
-
const pathParamKey = '
|
6
|
+
const pathParamKey = 'this.configuration.encodeParam';
|
7
7
|
|
8
8
|
const apiFiles = fs.readdirSync(apiFolder).filter(fileName => fileName.endsWith(apiFileSuffix));
|
9
9
|
apiFiles.forEach(apiFile => reorderOperations(apiFile));
|
@@ -11,8 +11,8 @@ function rewritePathParameters(fileName) {
|
|
11
11
|
const file = `${apiFolder}/${fileName}`;
|
12
12
|
const contents = fs.readFileSync(file, 'utf-8');
|
13
13
|
|
14
|
-
var result = contents.replace(/\${
|
15
|
-
result = result.replace(
|
14
|
+
var result = contents.replace(/\${this\.configuration\.encodeParam\({name:\s"/g, ':');
|
15
|
+
result = result.replace(/".*}\)}/g, '');
|
16
16
|
|
17
17
|
var options = { flag : 'w', encoding: 'utf8' };
|
18
18
|
fs.writeFileSync(file, result, options);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"typescriptThreePlus": "true",
|
3
|
+
"supportsES6": "true",
|
4
|
+
"modelPropertyNaming": "original",
|
5
|
+
"withInterfaces": "true",
|
6
|
+
"fileNaming": "camelCase",
|
7
|
+
"stringEnums": "true",
|
8
|
+
"enumPropertyNaming": "UPPERCASE",
|
9
|
+
"inlineSchemaOptions": {
|
10
|
+
"ARRAY_ITEM_SUFFIX": "",
|
11
|
+
"MAP_ITEM_SUFFIX": "",
|
12
|
+
"SKIP_SCHEMA_REUSE": "true"
|
13
|
+
}
|
14
|
+
}
|
@@ -12,15 +12,9 @@
|
|
12
12
|
"documentationProvider": "none",
|
13
13
|
"annotationLibrary": "none",
|
14
14
|
"useSpringBoot3": true,
|
15
|
-
"
|
16
|
-
"
|
17
|
-
|
18
|
-
"importMappings": {
|
19
|
-
"java.time.OffsetDateTime": "java.time.Instant"
|
20
|
-
},
|
21
|
-
"inlineSchemaNameDefaults": {
|
22
|
-
"arrayItemSuffix": "",
|
23
|
-
"mapItemSuffix": "",
|
15
|
+
"inlineSchemaOptions": {
|
16
|
+
"ARRAY_ITEM_SUFFIX": "",
|
17
|
+
"MAP_ITEM_SUFFIX": "",
|
24
18
|
"SKIP_SCHEMA_REUSE": "true"
|
25
19
|
}
|
26
20
|
}
|
@@ -0,0 +1,247 @@
|
|
1
|
+
{{! attach sources }}
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
3
|
+
<modelVersion>4.0.0</modelVersion>
|
4
|
+
<groupId>{{groupId}}</groupId>
|
5
|
+
<artifactId>{{artifactId}}</artifactId>
|
6
|
+
<packaging>jar</packaging>
|
7
|
+
<name>{{artifactId}}</name>
|
8
|
+
<version>{{artifactVersion}}</version>
|
9
|
+
<properties>
|
10
|
+
<java.version>17</java.version>
|
11
|
+
<maven.compiler.source>${java.version}</maven.compiler.source>
|
12
|
+
<maven.compiler.target>${java.version}</maven.compiler.target>
|
13
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
14
|
+
{{#springDocDocumentationProvider}}
|
15
|
+
<springdoc.version>2.0.2</springdoc.version>
|
16
|
+
{{/springDocDocumentationProvider}}
|
17
|
+
{{^springDocDocumentationProvider}}
|
18
|
+
{{#swagger2AnnotationLibrary}}
|
19
|
+
<swagger-annotations.version>}2.2.7</swagger-annotations.version>
|
20
|
+
{{/swagger2AnnotationLibrary}}
|
21
|
+
{{/springDocDocumentationProvider}}
|
22
|
+
{{#useSwaggerUI}}
|
23
|
+
<swagger-ui.version>4.15.5</swagger-ui.version>
|
24
|
+
{{/useSwaggerUI}}
|
25
|
+
{{#virtualService}}
|
26
|
+
<virtualan.version>2.5.2</virtualan.version>
|
27
|
+
{{/virtualService}}
|
28
|
+
</properties>
|
29
|
+
{{#parentOverridden}}
|
30
|
+
<parent>
|
31
|
+
<groupId>{{{parentGroupId}}}</groupId>
|
32
|
+
<artifactId>{{{parentArtifactId}}}</artifactId>
|
33
|
+
<version>{{{parentVersion}}}</version>
|
34
|
+
</parent>
|
35
|
+
{{/parentOverridden}}
|
36
|
+
{{^parentOverridden}}
|
37
|
+
<parent>
|
38
|
+
<groupId>org.springframework.boot</groupId>
|
39
|
+
<artifactId>spring-boot-starter-parent</artifactId>
|
40
|
+
<version>3.0.0</version>
|
41
|
+
<relativePath/> <!-- lookup parent from repository -->
|
42
|
+
</parent>
|
43
|
+
{{/parentOverridden}}
|
44
|
+
|
45
|
+
<repositories>
|
46
|
+
<repository>
|
47
|
+
<id>repository.spring.milestone</id>
|
48
|
+
<name>Spring Milestone Repository</name>
|
49
|
+
<url>https://repo.spring.io/milestone</url>
|
50
|
+
</repository>
|
51
|
+
</repositories>
|
52
|
+
<pluginRepositories>
|
53
|
+
<pluginRepository>
|
54
|
+
<id>spring-milestones</id>
|
55
|
+
<url>https://repo.spring.io/milestone</url>
|
56
|
+
</pluginRepository>
|
57
|
+
</pluginRepositories>
|
58
|
+
|
59
|
+
<build>
|
60
|
+
<sourceDirectory>src/main/java</sourceDirectory>
|
61
|
+
{{#interfaceOnly}}
|
62
|
+
<plugins>
|
63
|
+
<plugin>
|
64
|
+
<groupId>org.apache.maven.plugins</groupId>
|
65
|
+
<artifactId>maven-source-plugin</artifactId>
|
66
|
+
<executions>
|
67
|
+
<execution>
|
68
|
+
<id>attach-sources</id>
|
69
|
+
<goals>
|
70
|
+
<goal>jar</goal>
|
71
|
+
</goals>
|
72
|
+
</execution>
|
73
|
+
</executions>
|
74
|
+
</plugin>
|
75
|
+
</plugins>
|
76
|
+
{{/interfaceOnly}}
|
77
|
+
{{^interfaceOnly}}
|
78
|
+
<plugins>
|
79
|
+
<plugin>
|
80
|
+
<groupId>org.springframework.boot</groupId>
|
81
|
+
<artifactId>spring-boot-maven-plugin</artifactId>
|
82
|
+
{{#classifier}}
|
83
|
+
<configuration>
|
84
|
+
<classifier>{{{classifier}}}</classifier>
|
85
|
+
</configuration>
|
86
|
+
{{/classifier}}
|
87
|
+
</plugin>
|
88
|
+
{{#apiFirst}}
|
89
|
+
<plugin>
|
90
|
+
<groupId>org.openapitools</groupId>
|
91
|
+
<artifactId>openapi-generator-maven-plugin</artifactId>
|
92
|
+
<version>{{{generatorVersion}}}</version>
|
93
|
+
<executions>
|
94
|
+
<execution>
|
95
|
+
<goals>
|
96
|
+
<goal>generate</goal>
|
97
|
+
</goals>
|
98
|
+
<configuration>
|
99
|
+
<inputSpec>src/main/resources/openapi.yaml</inputSpec>
|
100
|
+
<generatorName>spring</generatorName>
|
101
|
+
<apiPackage>{{{apiPackage}}}</apiPackage>
|
102
|
+
<modelPackage>{{{modelPackage}}}</modelPackage>
|
103
|
+
<generateSupportingFiles>false</generateSupportingFiles>
|
104
|
+
{{#modelNamePrefix}}
|
105
|
+
<modelNamePrefix>{{{.}}}</modelNamePrefix>
|
106
|
+
{{/modelNamePrefix}}
|
107
|
+
{{#modelNameSuffix}}
|
108
|
+
<modelNameSuffix>{{{.}}}</modelNameSuffix>
|
109
|
+
{{/modelNameSuffix}}
|
110
|
+
<configOptions>
|
111
|
+
{{#configOptions}}
|
112
|
+
<{{left}}>{{right}}</{{left}}>
|
113
|
+
{{/configOptions}}
|
114
|
+
</configOptions>
|
115
|
+
</configuration>
|
116
|
+
</execution>
|
117
|
+
</executions>
|
118
|
+
</plugin>
|
119
|
+
{{/apiFirst}}
|
120
|
+
</plugins>
|
121
|
+
{{/interfaceOnly}}
|
122
|
+
</build>
|
123
|
+
<dependencies>
|
124
|
+
<dependency>
|
125
|
+
<groupId>org.springframework.boot</groupId>
|
126
|
+
<artifactId>spring-boot-starter-web{{#reactive}}flux{{/reactive}}</artifactId>
|
127
|
+
</dependency>
|
128
|
+
<dependency>
|
129
|
+
<groupId>org.springframework.data</groupId>
|
130
|
+
<artifactId>spring-data-commons</artifactId>
|
131
|
+
</dependency>
|
132
|
+
{{#springDocDocumentationProvider}}
|
133
|
+
<!--SpringDoc dependencies -->
|
134
|
+
{{#useSwaggerUI}}
|
135
|
+
<dependency>
|
136
|
+
<groupId>org.springdoc</groupId>
|
137
|
+
<artifactId>springdoc-openapi-starter-{{#reactive}}webflux{{/reactive}}{{^reactive}}webmvc{{/reactive}}-ui</artifactId>
|
138
|
+
<version>${springdoc.version}</version>
|
139
|
+
</dependency>
|
140
|
+
{{/useSwaggerUI}}
|
141
|
+
{{^useSwaggerUI}}
|
142
|
+
<dependency>
|
143
|
+
<groupId>org.springdoc</groupId>
|
144
|
+
<artifactId>springdoc-openapi-starter-{{#reactive}}webflux{{/reactive}}{{^reactive}}webmvc{{/reactive}}-api</artifactId>
|
145
|
+
<version>${springdoc.version}</version>
|
146
|
+
</dependency>
|
147
|
+
{{/useSwaggerUI}}
|
148
|
+
{{/springDocDocumentationProvider}}
|
149
|
+
{{#useSwaggerUI}}
|
150
|
+
{{^springDocDocumentationProvider}}
|
151
|
+
<dependency>
|
152
|
+
<groupId>org.webjars</groupId>
|
153
|
+
<artifactId>swagger-ui</artifactId>
|
154
|
+
<version>${swagger-ui.version}</version>
|
155
|
+
</dependency>
|
156
|
+
<dependency>
|
157
|
+
<groupId>org.webjars</groupId>
|
158
|
+
<artifactId>webjars-locator-core</artifactId>
|
159
|
+
</dependency>
|
160
|
+
{{/springDocDocumentationProvider}}
|
161
|
+
{{/useSwaggerUI}}
|
162
|
+
{{^springDocDocumentationProvider}}
|
163
|
+
{{#swagger2AnnotationLibrary}}
|
164
|
+
<dependency>
|
165
|
+
<groupId>io.swagger.core.v3</groupId>
|
166
|
+
<artifactId>swagger-annotations</artifactId>
|
167
|
+
<version>${swagger-annotations.version}</version>
|
168
|
+
</dependency>
|
169
|
+
{{/swagger2AnnotationLibrary}}
|
170
|
+
{{/springDocDocumentationProvider}}
|
171
|
+
<!-- @Nullable annotation -->
|
172
|
+
<dependency>
|
173
|
+
<groupId>com.google.code.findbugs</groupId>
|
174
|
+
<artifactId>jsr305</artifactId>
|
175
|
+
<version>3.0.2</version>
|
176
|
+
</dependency>
|
177
|
+
<dependency>
|
178
|
+
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
179
|
+
<artifactId>jackson-dataformat-yaml</artifactId>
|
180
|
+
</dependency>
|
181
|
+
{{#withXml}}
|
182
|
+
<!-- XML processing: Jackson -->
|
183
|
+
<dependency>
|
184
|
+
<groupId>jakarta.xml.bind</groupId>
|
185
|
+
<artifactId>jakarta.xml.bind-api</artifactId>
|
186
|
+
</dependency>
|
187
|
+
<dependency>
|
188
|
+
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
189
|
+
<artifactId>jackson-dataformat-xml</artifactId>
|
190
|
+
</dependency>
|
191
|
+
{{/withXml}}
|
192
|
+
<dependency>
|
193
|
+
<groupId>com.fasterxml.jackson.datatype</groupId>
|
194
|
+
<artifactId>jackson-datatype-jsr310</artifactId>
|
195
|
+
</dependency>
|
196
|
+
{{#joda}}
|
197
|
+
<dependency>
|
198
|
+
<groupId>com.fasterxml.jackson.datatype</groupId>
|
199
|
+
<artifactId>jackson-datatype-joda</artifactId>
|
200
|
+
</dependency>
|
201
|
+
{{/joda}}
|
202
|
+
{{#openApiNullable}}
|
203
|
+
<dependency>
|
204
|
+
<groupId>org.openapitools</groupId>
|
205
|
+
<artifactId>jackson-databind-nullable</artifactId>
|
206
|
+
<version>0.2.6</version>
|
207
|
+
</dependency>
|
208
|
+
{{/openApiNullable}}
|
209
|
+
{{#useBeanValidation}}
|
210
|
+
<!-- Bean Validation API support -->
|
211
|
+
<dependency>
|
212
|
+
<groupId>org.springframework.boot</groupId>
|
213
|
+
<artifactId>spring-boot-starter-validation</artifactId>
|
214
|
+
</dependency>
|
215
|
+
{{/useBeanValidation}}
|
216
|
+
{{#virtualService}}
|
217
|
+
<!-- START Virtual Service API support -->
|
218
|
+
<dependency>
|
219
|
+
<groupId>io.virtualan</groupId>
|
220
|
+
<artifactId>virtualan-plugin</artifactId>
|
221
|
+
<version>${virtualan.version}</version>
|
222
|
+
</dependency>
|
223
|
+
<!-- HyperSQL DB -->
|
224
|
+
<dependency>
|
225
|
+
<groupId>org.hsqldb</groupId>
|
226
|
+
<artifactId>hsqldb</artifactId>
|
227
|
+
</dependency>
|
228
|
+
<!-- END Virtual Service API support -->
|
229
|
+
{{/virtualService}}
|
230
|
+
{{#hateoas}}
|
231
|
+
<!-- Spring HATEOAS -->
|
232
|
+
<dependency>
|
233
|
+
<groupId>org.springframework.boot</groupId>
|
234
|
+
<artifactId>spring-boot-starter-hateoas</artifactId>
|
235
|
+
</dependency>
|
236
|
+
{{/hateoas}}
|
237
|
+
<dependency>
|
238
|
+
<groupId>com.fasterxml.jackson.core</groupId>
|
239
|
+
<artifactId>jackson-databind</artifactId>
|
240
|
+
</dependency>
|
241
|
+
<dependency>
|
242
|
+
<groupId>org.springframework.boot</groupId>
|
243
|
+
<artifactId>spring-boot-starter-test</artifactId>
|
244
|
+
<scope>test</scope>
|
245
|
+
</dependency>
|
246
|
+
</dependencies>
|
247
|
+
</project>
|
@@ -0,0 +1,257 @@
|
|
1
|
+
{{! attach sources }}
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
3
|
+
<modelVersion>4.0.0</modelVersion>
|
4
|
+
<groupId>{{groupId}}</groupId>
|
5
|
+
<artifactId>{{artifactId}}</artifactId>
|
6
|
+
<packaging>jar</packaging>
|
7
|
+
<name>{{artifactId}}</name>
|
8
|
+
<version>{{artifactVersion}}</version>
|
9
|
+
<properties>
|
10
|
+
<java.version>1.8</java.version>
|
11
|
+
<maven.compiler.source>${java.version}</maven.compiler.source>
|
12
|
+
<maven.compiler.target>${java.version}</maven.compiler.target>
|
13
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
14
|
+
{{#springFoxDocumentationProvider}}
|
15
|
+
<springfox.version>2.9.2</springfox.version>
|
16
|
+
{{/springFoxDocumentationProvider}}
|
17
|
+
{{#springDocDocumentationProvider}}
|
18
|
+
<springdoc.version>1.6.14</springdoc.version>
|
19
|
+
{{/springDocDocumentationProvider}}
|
20
|
+
{{^springFoxDocumentationProvider}}
|
21
|
+
{{^springDocDocumentationProvider}}
|
22
|
+
{{#swagger1AnnotationLibrary}}
|
23
|
+
<swagger-annotations.version>1.6.6</swagger-annotations.version>
|
24
|
+
{{/swagger1AnnotationLibrary}}
|
25
|
+
{{#swagger2AnnotationLibrary}}
|
26
|
+
<swagger-annotations.version>2.2.7</swagger-annotations.version>
|
27
|
+
{{/swagger2AnnotationLibrary}}
|
28
|
+
{{/springDocDocumentationProvider}}
|
29
|
+
{{/springFoxDocumentationProvider}}
|
30
|
+
{{#virtualService}}
|
31
|
+
<virtualan.version>2.5.2</virtualan.version>
|
32
|
+
{{/virtualService}}
|
33
|
+
{{#useSwaggerUI}}
|
34
|
+
<swagger-ui.version>4.15.5</swagger-ui.version>
|
35
|
+
{{/useSwaggerUI}}
|
36
|
+
</properties>
|
37
|
+
{{#parentOverridden}}
|
38
|
+
<parent>
|
39
|
+
<groupId>{{{parentGroupId}}}</groupId>
|
40
|
+
<artifactId>{{{parentArtifactId}}}</artifactId>
|
41
|
+
<version>{{{parentVersion}}}</version>
|
42
|
+
</parent>
|
43
|
+
{{/parentOverridden}}
|
44
|
+
{{^parentOverridden}}
|
45
|
+
<parent>
|
46
|
+
<groupId>org.springframework.boot</groupId>
|
47
|
+
<artifactId>spring-boot-starter-parent</artifactId>
|
48
|
+
<version>{{#springFoxDocumentationProvider}}2.5.14{{/springFoxDocumentationProvider}}{{^springFoxDocumentationProvider}}2.7.6{{/springFoxDocumentationProvider}}</version>
|
49
|
+
<relativePath/> <!-- lookup parent from repository -->
|
50
|
+
</parent>
|
51
|
+
{{/parentOverridden}}
|
52
|
+
<build>
|
53
|
+
<sourceDirectory>src/main/java</sourceDirectory>
|
54
|
+
{{#interfaceOnly}}
|
55
|
+
<plugins>
|
56
|
+
<plugin>
|
57
|
+
<groupId>org.apache.maven.plugins</groupId>
|
58
|
+
<artifactId>maven-source-plugin</artifactId>
|
59
|
+
<executions>
|
60
|
+
<execution>
|
61
|
+
<id>attach-sources</id>
|
62
|
+
<goals>
|
63
|
+
<goal>jar</goal>
|
64
|
+
</goals>
|
65
|
+
</execution>
|
66
|
+
</executions>
|
67
|
+
</plugin>
|
68
|
+
</plugins>
|
69
|
+
{{/interfaceOnly}}
|
70
|
+
{{^interfaceOnly}}
|
71
|
+
<plugins>
|
72
|
+
<plugin>
|
73
|
+
<groupId>org.springframework.boot</groupId>
|
74
|
+
<artifactId>spring-boot-maven-plugin</artifactId>
|
75
|
+
{{#classifier}}
|
76
|
+
<configuration>
|
77
|
+
<classifier>{{{classifier}}}</classifier>
|
78
|
+
</configuration>
|
79
|
+
{{/classifier}}
|
80
|
+
</plugin>
|
81
|
+
{{#apiFirst}}
|
82
|
+
<plugin>
|
83
|
+
<groupId>org.openapitools</groupId>
|
84
|
+
<artifactId>openapi-generator-maven-plugin</artifactId>
|
85
|
+
<version>{{{generatorVersion}}}</version>
|
86
|
+
<executions>
|
87
|
+
<execution>
|
88
|
+
<goals>
|
89
|
+
<goal>generate</goal>
|
90
|
+
</goals>
|
91
|
+
<configuration>
|
92
|
+
<inputSpec>src/main/resources/openapi.yaml</inputSpec>
|
93
|
+
<generatorName>spring</generatorName>
|
94
|
+
<apiPackage>{{{apiPackage}}}</apiPackage>
|
95
|
+
<modelPackage>{{{modelPackage}}}</modelPackage>
|
96
|
+
<generateSupportingFiles>false</generateSupportingFiles>
|
97
|
+
{{#modelNamePrefix}}
|
98
|
+
<modelNamePrefix>{{{.}}}</modelNamePrefix>
|
99
|
+
{{/modelNamePrefix}}
|
100
|
+
{{#modelNameSuffix}}
|
101
|
+
<modelNameSuffix>{{{.}}}</modelNameSuffix>
|
102
|
+
{{/modelNameSuffix}}
|
103
|
+
<configOptions>
|
104
|
+
{{#configOptions}}
|
105
|
+
<{{left}}>{{right}}</{{left}}>
|
106
|
+
{{/configOptions}}
|
107
|
+
</configOptions>
|
108
|
+
</configuration>
|
109
|
+
</execution>
|
110
|
+
</executions>
|
111
|
+
</plugin>
|
112
|
+
{{/apiFirst}}
|
113
|
+
</plugins>
|
114
|
+
{{/interfaceOnly}}
|
115
|
+
</build>
|
116
|
+
<dependencies>
|
117
|
+
<dependency>
|
118
|
+
<groupId>org.springframework.boot</groupId>
|
119
|
+
<artifactId>spring-boot-starter-web{{#reactive}}flux{{/reactive}}</artifactId>
|
120
|
+
</dependency>
|
121
|
+
<dependency>
|
122
|
+
<groupId>org.springframework.data</groupId>
|
123
|
+
<artifactId>spring-data-commons</artifactId>
|
124
|
+
</dependency>
|
125
|
+
{{#springDocDocumentationProvider}}
|
126
|
+
<!--SpringDoc dependencies -->
|
127
|
+
{{#useSwaggerUI}}
|
128
|
+
<dependency>
|
129
|
+
<groupId>org.springdoc</groupId>
|
130
|
+
<artifactId>springdoc-openapi-{{#reactive}}webflux-{{/reactive}}ui</artifactId>
|
131
|
+
<version>${springdoc.version}</version>
|
132
|
+
</dependency>
|
133
|
+
{{/useSwaggerUI}}
|
134
|
+
{{^useSwaggerUI}}
|
135
|
+
<dependency>
|
136
|
+
<groupId>org.springdoc</groupId>
|
137
|
+
<artifactId>springdoc-openapi-{{#reactive}}webflux{{/reactive}}{{^reactive}}webmvc{{/reactive}}-core</artifactId>
|
138
|
+
<version>${springdoc.version}</version>
|
139
|
+
</dependency>
|
140
|
+
{{/useSwaggerUI}}
|
141
|
+
{{/springDocDocumentationProvider}}
|
142
|
+
{{#springFoxDocumentationProvider}}
|
143
|
+
<!--SpringFox dependencies -->
|
144
|
+
<dependency>
|
145
|
+
<groupId>io.springfox</groupId>
|
146
|
+
<artifactId>springfox-swagger2</artifactId>
|
147
|
+
<version>${springfox.version}</version>
|
148
|
+
</dependency>
|
149
|
+
{{/springFoxDocumentationProvider}}
|
150
|
+
{{#useSwaggerUI}}
|
151
|
+
{{^springDocDocumentationProvider}}
|
152
|
+
<dependency>
|
153
|
+
<groupId>org.webjars</groupId>
|
154
|
+
<artifactId>swagger-ui</artifactId>
|
155
|
+
<version>${swagger-ui.version}</version>
|
156
|
+
</dependency>
|
157
|
+
<dependency>
|
158
|
+
<groupId>org.webjars</groupId>
|
159
|
+
<artifactId>webjars-locator-core</artifactId>
|
160
|
+
</dependency>
|
161
|
+
{{/springDocDocumentationProvider}}
|
162
|
+
{{/useSwaggerUI}}
|
163
|
+
{{^springFoxDocumentationProvider}}
|
164
|
+
{{^springDocDocumentationProvider}}
|
165
|
+
{{#swagger1AnnotationLibrary}}
|
166
|
+
<dependency>
|
167
|
+
<groupId>io.swagger</groupId>
|
168
|
+
<artifactId>swagger-annotations</artifactId>
|
169
|
+
<version>${swagger-annotations.version}</version>
|
170
|
+
</dependency>
|
171
|
+
{{/swagger1AnnotationLibrary}}
|
172
|
+
{{#swagger2AnnotationLibrary}}
|
173
|
+
<dependency>
|
174
|
+
<groupId>io.swagger.core.v3</groupId>
|
175
|
+
<artifactId>swagger-annotations</artifactId>
|
176
|
+
<version>${swagger-annotations.version}</version>
|
177
|
+
</dependency>
|
178
|
+
{{/swagger2AnnotationLibrary}}
|
179
|
+
{{/springDocDocumentationProvider}}
|
180
|
+
{{/springFoxDocumentationProvider}}
|
181
|
+
<!-- @Nullable annotation -->
|
182
|
+
<dependency>
|
183
|
+
<groupId>com.google.code.findbugs</groupId>
|
184
|
+
<artifactId>jsr305</artifactId>
|
185
|
+
<version>3.0.2</version>
|
186
|
+
</dependency>
|
187
|
+
<dependency>
|
188
|
+
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
189
|
+
<artifactId>jackson-dataformat-yaml</artifactId>
|
190
|
+
</dependency>
|
191
|
+
{{#withXml}}
|
192
|
+
<!-- XML processing: Jackson -->
|
193
|
+
<dependency>
|
194
|
+
<groupId>jakarta.xml.bind</groupId>
|
195
|
+
<artifactId>jakarta.xml.bind-api</artifactId>
|
196
|
+
</dependency>
|
197
|
+
<dependency>
|
198
|
+
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
199
|
+
<artifactId>jackson-dataformat-xml</artifactId>
|
200
|
+
</dependency>
|
201
|
+
{{/withXml}}
|
202
|
+
<dependency>
|
203
|
+
<groupId>com.fasterxml.jackson.datatype</groupId>
|
204
|
+
<artifactId>jackson-datatype-jsr310</artifactId>
|
205
|
+
</dependency>
|
206
|
+
{{#joda}}
|
207
|
+
<dependency>
|
208
|
+
<groupId>com.fasterxml.jackson.datatype</groupId>
|
209
|
+
<artifactId>jackson-datatype-joda</artifactId>
|
210
|
+
</dependency>
|
211
|
+
{{/joda}}
|
212
|
+
{{#openApiNullable}}
|
213
|
+
<dependency>
|
214
|
+
<groupId>org.openapitools</groupId>
|
215
|
+
<artifactId>jackson-databind-nullable</artifactId>
|
216
|
+
<version>0.2.6</version>
|
217
|
+
</dependency>
|
218
|
+
{{/openApiNullable}}
|
219
|
+
{{#useBeanValidation}}
|
220
|
+
<!-- Bean Validation API support -->
|
221
|
+
<dependency>
|
222
|
+
<groupId>org.springframework.boot</groupId>
|
223
|
+
<artifactId>spring-boot-starter-validation</artifactId>
|
224
|
+
</dependency>
|
225
|
+
{{/useBeanValidation}}
|
226
|
+
{{#virtualService}}
|
227
|
+
<!-- START Virtual Service API support -->
|
228
|
+
<dependency>
|
229
|
+
<groupId>io.virtualan</groupId>
|
230
|
+
<artifactId>virtualan-plugin</artifactId>
|
231
|
+
<version>${virtualan.version}</version>
|
232
|
+
</dependency>
|
233
|
+
<!-- HyperSQL DB -->
|
234
|
+
<dependency>
|
235
|
+
<groupId>org.hsqldb</groupId>
|
236
|
+
<artifactId>hsqldb</artifactId>
|
237
|
+
</dependency>
|
238
|
+
<!-- END Virtual Service API support -->
|
239
|
+
{{/virtualService}}
|
240
|
+
{{#hateoas}}
|
241
|
+
<!-- Spring HATEOAS -->
|
242
|
+
<dependency>
|
243
|
+
<groupId>org.springframework.boot</groupId>
|
244
|
+
<artifactId>spring-boot-starter-hateoas</artifactId>
|
245
|
+
</dependency>
|
246
|
+
{{/hateoas}}
|
247
|
+
<dependency>
|
248
|
+
<groupId>com.fasterxml.jackson.core</groupId>
|
249
|
+
<artifactId>jackson-databind</artifactId>
|
250
|
+
</dependency>
|
251
|
+
<dependency>
|
252
|
+
<groupId>org.springframework.boot</groupId>
|
253
|
+
<artifactId>spring-boot-starter-test</artifactId>
|
254
|
+
<scope>test</scope>
|
255
|
+
</dependency>
|
256
|
+
</dependencies>
|
257
|
+
</project>
|
@@ -9,18 +9,14 @@
|
|
9
9
|
"documentationProvider": "none",
|
10
10
|
"useSpringBoot3": true,
|
11
11
|
"typeMappings": {
|
12
|
-
"DateTime": "java.time.Instant",
|
13
|
-
"OffsetDateTime": "java.time.Instant",
|
14
12
|
"org.springframework.core.io.Resource": "org.springframework.web.multipart.MultipartFile"
|
15
13
|
},
|
16
14
|
"importMappings": {
|
17
|
-
"DateTime": "java.time.Instant",
|
18
|
-
"java.time.OffsetDateTime": "java.time.Instant",
|
19
15
|
"org.springframework.core.io.Resource": "org.springframework.web.multipart.MultipartFile"
|
20
16
|
},
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
17
|
+
"inlineSchemaOptions": {
|
18
|
+
"ARRAY_ITEM_SUFFIX": "",
|
19
|
+
"MAP_ITEM_SUFFIX": "",
|
24
20
|
"SKIP_SCHEMA_REUSE": "true"
|
25
21
|
}
|
26
22
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
{{! optionally removes spring boot plugin if interfaceOnly flag is set }}
|
2
1
|
{{! attach sources }}
|
3
2
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
4
3
|
<modelVersion>4.0.0</modelVersion>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
{{! optionally removes spring boot plugin if interfaceOnly flag is set }}
|
2
1
|
{{! attach sources }}
|
3
2
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
4
3
|
<modelVersion>4.0.0</modelVersion>
|
package/targets/.env
DELETED