@team-supercharge/oasg 16.8.1 → 17.0.1

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 CHANGED
@@ -128,38 +128,38 @@ include:
128
128
 
129
129
  The table below gives an overview of the changes (breaking, non-breaking, bug fixes) introduced in various major versions. For the resolution of breaking changes please consult the [Migration Guide](#migration-guide).
130
130
 
131
- | Component | | | | | | | | | | | | | | | | |
132
- |------------------------------|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
133
- | **Internal** | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
134
- | _Core_ |✨ |🐛 |💥 |✨ |🐛 |✨ |➖ |✨ |🐛 |🐛 |➖ |💥 |💥 |✨ |💥 |🆕 |
135
- | _Linter_ |🐛 |➖ |➖ |➖ |➖ |💥 |➖ |➖ |➖ |➖ |🐛 |➖ |✨ |💥 |🆕 |
136
- | **Client Targets** | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
137
- | `android` |➖ |➖ |🐛 |💥 |➖ |➖ |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
138
- | `angular` |✨ |➖ |🐛 |💥 |➖ |➖ |➖ |🐛 |➖ |➖ |➖ |💥 |➖ |➖ |➖ |🆕 |
139
- | `dotnet` |➖ |➖ |🆕 |
140
- | `feign` |✨ |➖ |➖ |➖ |➖ |➖ |✨ |💥 |💥 |➖ |➖ |🐛 |🐛 |🆕 |
141
- | `feign-kotlin` |✨ |➖ |➖ |➖ |➖ |➖ |🆕 |
142
- | `plain-java` |🆕 |
143
- | `flutter` |➖ |➖ |➖ |🆕 |
144
- | `ios` |➖ |➖ |➖ |💥 |🐛 |➖ |➖ |➖ |✨ |➖ |💥 |➖ |➖ |✨ |🆕 |
145
- | `apple-swift` |🆕 |
146
- | `kmp` |➖ |➖ |🆕 |
147
- | `python` |🆕 |
148
- | `python-legacy` |💥 |➖ |🐛 |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
149
- | `react` |🐛 |🐛 |➖ |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
150
- | `typescript-axios` |🆕 |
151
- | `typescript-fetch` |🆕 |
152
- | **Server Targets** | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
153
- | `nestjs` |💥 |💥 |➖ |💥 |✨ |➖ |➖ |🐛 |➖ |➖ |✨ |🆕 |
154
- | `python-fastapi` |➖ |➖ |🆕 |
155
- | `python-fastapi-raw-request` |➖ |➖ |🆕 |
156
- | `spring` |✨ |➖ |➖ |➖ |➖ |➖ |✨ |💥 |💥 |➖ |➖ |➖ |✨ |➖ |🆕 |
157
- | `spring-kotlin` |✨ |➖ |➖ |➖ |➖ |➖ |✨ |💥 |💥 |➖ |➖ |🐛 |✨ |➖ |🆕 |
158
- | **Misc Targets** | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
159
- | `contract-testing` |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
160
- | `openapi` |➖ |➖ |➖ |➖ |💥 |➖ |➖ |✨ |➖ |🆕 |
161
- | `stubby` |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |💥 |➖ |➖ |➖ |➖ |🆕 |
162
- | `postman` |➖ |🆕 |
131
+ | Component | | | | | | | | | | | | | | | | | |
132
+ |------------------------------|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
133
+ | **Internal** | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
134
+ | _Core_ |💥 |✨ |🐛 |💥 |✨ |🐛 |✨ |➖ |✨ |🐛 |🐛 |➖ |💥 |💥 |✨ |💥 |🆕 |
135
+ | _Linter_ |➖ |🐛 |➖ |➖ |➖ |➖ |💥 |➖ |➖ |➖ |➖ |🐛 |➖ |✨ |💥 |🆕 |
136
+ | **Client Targets** | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
137
+ | `android` |➖ |➖ |➖ |🐛 |💥 |➖ |➖ |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
138
+ | `angular` |➖ |✨ |➖ |🐛 |💥 |➖ |➖ |➖ |🐛 |➖ |➖ |➖ |💥 |➖ |➖ |➖ |🆕 |
139
+ | `dotnet` |➖ |➖ |➖ |🆕 |
140
+ | `feign` |🐛 |✨ |➖ |➖ |➖ |➖ |➖ |✨ |💥 |💥 |➖ |➖ |🐛 |🐛 |🆕 |
141
+ | `feign-kotlin` |🐛 |✨ |➖ |➖ |➖ |➖ |➖ |🆕 |
142
+ | `plain-java` |🐛 |🆕 |
143
+ | `flutter` |➖ |➖ |➖ |➖ |🆕 |
144
+ | `ios` |➖ |➖ |➖ |➖ |💥 |🐛 |➖ |➖ |➖ |✨ |➖ |💥 |➖ |➖ |✨ |🆕 |
145
+ | `apple-swift` |➖ |🆕 |
146
+ | `kmp` |✨ |➖ |➖ |🆕 |
147
+ | `python` |➖ |🆕 |
148
+ | `python-legacy` |➖ |💥 |➖ |🐛 |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
149
+ | `react` |➖ |🐛 |🐛 |➖ |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
150
+ | `typescript-axios` |➖ |🆕 |
151
+ | `typescript-fetch` |➖ |🆕 |
152
+ | **Server Targets** | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
153
+ | `nestjs` |🐛 |💥 |💥 |➖ |💥 |✨ |➖ |➖ |🐛 |➖ |➖ |✨ |🆕 |
154
+ | `python-fastapi` |➖ |➖ |➖ |🆕 |
155
+ | `python-fastapi-raw-request` |➖ |➖ |➖ |🆕 |
156
+ | `spring` |🐛 |✨ |➖ |➖ |➖ |➖ |➖ |✨ |💥 |💥 |➖ |➖ |➖ |✨ |➖ |🆕 |
157
+ | `spring-kotlin` |✨ |✨ |➖ |➖ |➖ |➖ |➖ |✨ |💥 |💥 |➖ |➖ |🐛 |✨ |➖ |🆕 |
158
+ | **Misc Targets** | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
159
+ | `contract-testing` |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
160
+ | `openapi` |➖ |➖ |➖ |➖ |➖ |💥 |➖ |➖ |✨ |➖ |🆕 |
161
+ | `stubby` |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |💥 |➖ |➖ |➖ |➖ |🆕 |
162
+ | `postman` |➖ |➖ |🆕 |
163
163
 
164
164
  **Legend:**
165
165
 
@@ -1093,13 +1093,13 @@ Validations from OpenAPI spec:
1093
1093
  "packageName": "@project/oasg-example-typescript-axios",
1094
1094
  "repository": "https://gitlab.supercharge.io/api/v4/projects/1226/packages/npm/"
1095
1095
  }
1096
+ ```
1096
1097
 
1097
1098
  |Parameter| Description| Required | Default |
1098
1099
  |-|-|-|-|
1099
1100
  | packageName | Name of the generated NPM package | Y | - |
1100
1101
  | repository | URL of the NPM package registry | Y | - |
1101
1102
 
1102
-
1103
1103
  #### `typescript-fetch`
1104
1104
 
1105
1105
  ```json
@@ -1110,6 +1110,7 @@ Validations from OpenAPI spec:
1110
1110
  "packageName": "@project/oasg-example-typescript-fetch",
1111
1111
  "repository": "https://gitlab.supercharge.io/api/v4/projects/1226/packages/npm/"
1112
1112
  }
1113
+ ```
1113
1114
 
1114
1115
  |Parameter| Description| Required | Default |
1115
1116
  |-|-|-|-|
@@ -1122,6 +1123,10 @@ Validations from OpenAPI spec:
1122
1123
 
1123
1124
  This section covers the breaking changes and their migrations across major version upgrades.
1124
1125
 
1126
+ ## From `16.x.x` to `17.0.0`
1127
+
1128
+ From this version _OASg_ requires `node` version `^20.19` by default. Please upgrade your projects accordingly.
1129
+
1125
1130
  ## From `15.x.x` to `16.0.0`
1126
1131
 
1127
1132
  ### Breaking in `nestjs` target
package/bin/oasg CHANGED
@@ -37,13 +37,13 @@ const DEFAULT_GENERATOR_MAPPING = {
37
37
  // client targets
38
38
  "android": { version: '7.0.1', generator: 'kotlin' },
39
39
  "angular": { version: '7.11.0', generator: 'typescript-angular' },
40
- "feign": { version: '7.11.0', generator: 'spring' },
41
- "feign-kotlin": { version: '7.11.0', generator: 'kotlin-spring' },
42
- "plain-java": { version: '7.11.0', generator: 'java' },
40
+ "feign": { version: '7.12.0', generator: 'spring' },
41
+ "feign-kotlin": { version: '7.12.0', generator: 'kotlin-spring' },
42
+ "plain-java": { version: '7.12.0', generator: 'java' },
43
43
  "flutter": { version: '7.0.1', generator: 'dart-dio' },
44
44
  "ios": { version: '7.0.1', generator: 'swift5' },
45
45
  "apple-swift": { version: undefined, generator: undefined },
46
- "kmp": { version: '7.8.0', generator: 'kotlin' },
46
+ "kmp": { version: '7.14.0', generator: 'kotlin' },
47
47
  "python": { version: '7.11.0', generator: 'python' },
48
48
  "python-legacy": { version: '7.11.0', generator: 'python-pydantic-v1' },
49
49
  "react": { version: '7.0.1', generator: 'typescript-fetch' },
@@ -51,8 +51,8 @@ const DEFAULT_GENERATOR_MAPPING = {
51
51
  "typescript-fetch": { version: '7.11.0', generator: 'typescript-fetch' },
52
52
  // server targets
53
53
  "nestjs": { version: '7.0.1', generator: 'typescript-angular' },
54
- "spring": { version: '7.11.0', generator: 'spring' },
55
- "spring-kotlin": { version: '7.11.0', generator: 'kotlin-spring' },
54
+ "spring": { version: '7.12.0', generator: 'spring' },
55
+ "spring-kotlin": { version: '7.12.0', generator: 'kotlin-spring' },
56
56
  "python-fastapi": { version: '7.8.0', generator: 'python-fastapi' },
57
57
  "python-fastapi-raw-request": { version: '7.0.1', generator: 'python-fastapi' },
58
58
  "dotnet": { version: '7.11.0', generator: 'csharp-functions' },
package/config.schema.yml CHANGED
@@ -1,5 +1,8 @@
1
1
  type: object
2
2
  properties:
3
+ $schema:
4
+ type: string
5
+ description: Path or URL to the schema validation file
3
6
  sources:
4
7
  type: array
5
8
  items:
@@ -466,7 +469,7 @@ targets:
466
469
  type: string
467
470
  required:
468
471
  - sourceUrl
469
- - packageName
472
+ - packageName
470
473
 
471
474
  Kmp:
472
475
  allOf:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-supercharge/oasg",
3
- "version": "16.8.1",
3
+ "version": "17.0.1",
4
4
  "description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
5
5
  "author": "Supercharge",
6
6
  "license": "MIT",
@@ -15,8 +15,8 @@
15
15
  "url": "git@gitlab.com:team-supercharge/oasg.git"
16
16
  },
17
17
  "engines": {
18
- "node": "^20.17",
19
- "npm": "^10"
18
+ "node": ">=20.19",
19
+ "npm": ">=10"
20
20
  },
21
21
  "files": [
22
22
  "bin",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@apidevtools/json-schema-ref-parser": "^10.1.0",
30
30
  "@apidevtools/swagger-parser": "^10.1.0",
31
- "@redocly/cli": "1.25.11",
31
+ "@redocly/cli": "1.34.5",
32
32
  "@stoplight/prism-cli": "5.12.0",
33
33
  "@stoplight/spectral-cli": "6.14.1",
34
34
  "ajv": "^8.17.1",
@@ -1,24 +1,28 @@
1
1
  import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
2
2
 
3
3
  plugins {
4
- kotlin("multiplatform"){{^omitGradlePluginVersions}} version "1.9.20" // kotlin_version{{/omitGradlePluginVersions}}
5
- kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "1.9.20" // kotlin_version{{/omitGradlePluginVersions}}
4
+ kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}}
5
+ kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}}
6
6
  id("maven-publish") // OASg added for publication
7
7
  }
8
8
 
9
9
  group = "{{groupId}}"
10
10
  version = "{{artifactVersion}}"
11
11
 
12
- val kotlin_version = "1.9.20"
13
- val coroutines_version = "1.7.3"
14
- val serialization_version = "1.6.1"
15
- val ktor_version = "2.3.6"
12
+ val kotlin_version = "2.1.21"
13
+ val coroutines_version = "1.10.2"
14
+ val serialization_version = "1.8.1"
15
+ val ktor_version = "3.1.3"
16
16
 
17
17
  repositories {
18
18
  mavenCentral()
19
19
  }
20
20
 
21
21
  kotlin {
22
+ {{#explicitApi}}
23
+ explicitApi()
24
+
25
+ {{/explicitApi}}
22
26
  jvm()
23
27
  iosX64()
24
28
  iosArm64()
@@ -40,7 +44,7 @@ kotlin {
40
44
  api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
41
45
 
42
46
  {{#kotlinx-datetime}}
43
- api("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
47
+ api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
44
48
  {{/kotlinx-datetime}}
45
49
  }
46
50
  }
@@ -76,12 +80,6 @@ kotlin {
76
80
  api("io.ktor:ktor-client-js:$ktor_version")
77
81
  }
78
82
  }
79
-
80
- all {
81
- languageSettings.apply {
82
- optIn("kotlin.Experimental")
83
- }
84
- }
85
83
  }
86
84
  }
87
85
 
@@ -17,16 +17,16 @@ import kotlinx.serialization.descriptors.*
17
17
  import kotlinx.serialization.encoding.*
18
18
 
19
19
  {{#operations}}
20
- {{#nonPublicApi}}internal {{/nonPublicApi}}open class {{classname}} : ApiClient {
20
+ {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}open class {{classname}} : ApiClient {
21
21
 
22
- constructor(
22
+ {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}constructor(
23
23
  baseUrl: String = ApiClient.BASE_URL,
24
24
  httpClientEngine: HttpClientEngine? = null,
25
25
  httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null,
26
26
  jsonSerializer: Json = ApiClient.JSON_DEFAULT
27
27
  ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer)
28
28
 
29
- constructor(
29
+ {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}constructor(
30
30
  baseUrl: String,
31
31
  httpClient: HttpClient
32
32
  ): super(baseUrl = baseUrl, httpClient = httpClient)
@@ -39,7 +39,7 @@ import kotlinx.serialization.encoding.*
39
39
  * enum for parameter {{paramName}}
40
40
  */
41
41
  @Serializable
42
- {{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{enumName}}{{operationIdCamelCase}}(val value: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}kotlin.String{{/isContainer}}) {
42
+ {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}enum class {{enumName}}{{operationIdCamelCase}}({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val value: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}kotlin.String{{/isContainer}}) {
43
43
  {{^enumUnknownDefaultCase}}
44
44
  {{#allowableValues}}{{#enumVars}}
45
45
  @SerialName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}})
@@ -65,7 +65,7 @@ import kotlinx.serialization.encoding.*
65
65
  {{#returnType}}
66
66
  @Suppress("UNCHECKED_CAST")
67
67
  {{/returnType}}
68
- open suspend fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): {{{returnType}}}{{^returnType}}Unit{{/returnType}} {
68
+ {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}open suspend fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): {{{returnType}}}{{^returnType}}Unit{{/returnType}} {
69
69
 
70
70
  val localVariableAuthNames = listOf<String>({{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}})
71
71
 
@@ -77,11 +77,11 @@ import kotlinx.serialization.encoding.*
77
77
  {{#formParams}}
78
78
  {{#isArray}}
79
79
  {{{paramName}}}?.onEach {
80
- append("{{{baseName}}}[]", it)
80
+ {{#isFile}}append(it){{/isFile}}{{^isFile}}append("{{{baseName}}}", it){{/isFile}}
81
81
  }
82
82
  {{/isArray}}
83
83
  {{^isArray}}
84
- {{{paramName}}}?.apply { append("{{{baseName}}}", {{{paramName}}}) }
84
+ {{{paramName}}}?.apply { {{#isFile}}append({{{baseName}}}){{/isFile}}{{^isFile}}append("{{{baseName}}}", {{^isEnumOrRef}}{{{paramName}}}{{/isEnumOrRef}}{{#isEnumOrRef}}{{{paramName}}}.value{{/isEnumOrRef}}){{/isFile}} }
85
85
  {{/isArray}}
86
86
  {{/formParams}}
87
87
  }
@@ -100,13 +100,13 @@ import kotlinx.serialization.encoding.*
100
100
  {{/hasBodyParam}}
101
101
 
102
102
  val localVariableQuery = mutableMapOf<String, List<String>>(){{#queryParams}}
103
- {{{paramName}}}?.apply { localVariableQuery["{{baseName}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{^isEnum}}"${{{paramName}}}"{{/isEnum}}{{#isEnum}}"${ {{paramName}}.value }"{{/isEnum}}){{/isContainer}} }{{/queryParams}}
103
+ {{{paramName}}}?.apply { localVariableQuery["{{baseName}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{^isEnumOrRef}}"${{{paramName}}}"{{/isEnumOrRef}}{{#isEnumOrRef}}"${ {{paramName}}.value }"{{/isEnumOrRef}}){{/isContainer}} }{{/queryParams}}
104
104
  val localVariableHeaders = mutableMapOf<String, String>(){{#headerParams}}
105
105
  {{{paramName}}}?.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} }{{/headerParams}}
106
106
 
107
107
  val localVariableConfig = RequestConfig<kotlin.Any?>(
108
108
  RequestMethod.{{httpMethod}},
109
- "{{path}}"{{#pathParams}}.replace("{" + "{{baseName}}" + "}", {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{^isEnum}}"${{{paramName}}}"{{/isEnum}}{{#isEnum}}"${ {{paramName}}.value }"{{/isEnum}}{{/isContainer}}){{/pathParams}},
109
+ "{{{path}}}"{{#pathParams}}.replace("{" + "{{baseName}}" + "}", {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{^isEnumOrRef}}"${{{paramName}}}"{{/isEnumOrRef}}{{#isEnumOrRef}}"${ {{paramName}}.value }"{{/isEnumOrRef}}{{/isContainer}}){{/pathParams}},
110
110
  query = localVariableQuery,
111
111
  headers = localVariableHeaders,
112
112
  requiresAuthentication = {{#hasAuthMethods}}true{{/hasAuthMethods}}{{^hasAuthMethods}}false{{/hasAuthMethods}},
@@ -26,7 +26,8 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/multer": "^1.4.7",
29
- "typescript": "^4.7.4"
29
+ "typescript": "^5",
30
+ "@types/node": "^20"
30
31
  }{{#npmRepository}},
31
32
  "publishConfig": {
32
33
  "registry": "{{{npmRepository}}}"
@@ -3,7 +3,6 @@
3
3
  "emitDecoratorMetadata": true,
4
4
  "experimentalDecorators": true,
5
5
  "noImplicitAny": false,
6
- "suppressImplicitAnyIndexErrors": true,
7
6
  "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}",
8
7
  "module": "commonjs",
9
8
  "moduleResolution": "node",
@@ -7,7 +7,7 @@
7
7
  "skipDefaultInterface": true,
8
8
  "useTags": true,
9
9
  "hideGenerationTimestamp": true,
10
- "enumPropertyNaming": "UPPERCASE",
10
+ "enumPropertyNaming": "MACRO_CASE",
11
11
  "removeEnumValuePrefix": false,
12
12
  "documentationProvider": "none",
13
13
  "annotationLibrary": "none",
@@ -11,13 +11,11 @@
11
11
  "requestMappingMode": "api_interface",
12
12
  "typeMappings": {
13
13
  "DateTime": "java.time.Instant",
14
- "OffsetDateTime": "java.time.Instant",
15
- "org.springframework.core.io.Resource": "org.springframework.web.multipart.MultipartFile"
14
+ "OffsetDateTime": "java.time.Instant"
16
15
  },
17
16
  "importMappings": {
18
17
  "DateTime": "java.time.Instant",
19
- "java.time.OffsetDateTime": "java.time.Instant",
20
- "org.springframework.core.io.Resource": "org.springframework.web.multipart.MultipartFile"
18
+ "java.time.OffsetDateTime": "java.time.Instant"
21
19
  },
22
20
  "inlineSchemaOptions": {
23
21
  "ARRAY_ITEM_SUFFIX": "",
@@ -1,171 +0,0 @@
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>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
- {{#springDocDocumentationProvider}}
15
- <springdoc.version>2.2.0</springdoc.version>
16
- {{/springDocDocumentationProvider}}
17
- {{^springDocDocumentationProvider}}
18
- {{#swagger2AnnotationLibrary}}
19
- <swagger-annotations.version>2.2.15</swagger-annotations.version>
20
- {{/swagger2AnnotationLibrary}}
21
- {{/springDocDocumentationProvider}}
22
- </properties>
23
- {{#parentOverridden}}
24
- <parent>
25
- <groupId>{{{parentGroupId}}}</groupId>
26
- <artifactId>{{{parentArtifactId}}}</artifactId>
27
- <version>{{{parentVersion}}}</version>
28
- </parent>
29
- {{/parentOverridden}}
30
- {{^parentOverridden}}
31
- <parent>
32
- <groupId>org.springframework.boot</groupId>
33
- <artifactId>spring-boot-starter-parent</artifactId>
34
- <version>3.1.3</version>
35
- <relativePath/> <!-- lookup parent from repository -->
36
- </parent>
37
- {{/parentOverridden}}
38
-
39
- <repositories>
40
- <repository>
41
- <id>repository.spring.milestone</id>
42
- <name>Spring Milestone Repository</name>
43
- <url>https://repo.spring.io/milestone</url>
44
- </repository>
45
- </repositories>
46
-
47
- <build>
48
- <sourceDirectory>src/main/java</sourceDirectory>
49
- <plugins>
50
- <plugin>
51
- <groupId>org.apache.maven.plugins</groupId>
52
- <artifactId>maven-source-plugin</artifactId>
53
- <executions>
54
- <execution>
55
- <id>attach-sources</id>
56
- <goals>
57
- <goal>jar</goal>
58
- </goals>
59
- </execution>
60
- </executions>
61
- </plugin>
62
- </plugins>
63
- </build>
64
-
65
- {{^parentOverridden}}
66
- <dependencyManagement>
67
- <dependencies>
68
- <dependency>
69
- <groupId>org.springframework.cloud</groupId>
70
- <artifactId>spring-cloud-starter-parent</artifactId>
71
- <version>2022.0.0</version>
72
- <type>pom</type>
73
- <scope>import</scope>
74
- </dependency>
75
- </dependencies>
76
- </dependencyManagement>
77
-
78
- {{/parentOverridden}}
79
- <dependencies>
80
- {{#springDocDocumentationProvider}}
81
- <!--SpringDoc dependencies -->
82
- <dependency>
83
- <groupId>org.springdoc</groupId>
84
- <artifactId>springdoc-openapi-starter-{{#reactive}}webflux{{/reactive}}{{^reactive}}webmvc{{/reactive}}-ui</artifactId>
85
- <version>${springdoc.version}</version>
86
- </dependency>
87
- {{/springDocDocumentationProvider}}
88
- {{^springDocDocumentationProvider}}
89
- {{#swagger2AnnotationLibrary}}
90
- <dependency>
91
- <groupId>io.swagger.core.v3</groupId>
92
- <artifactId>swagger-annotations</artifactId>
93
- <version>${swagger-annotations.version}</version>
94
- </dependency>
95
- {{/swagger2AnnotationLibrary}}
96
- {{/springDocDocumentationProvider}}
97
- <!-- @Nullable annotation -->
98
- <dependency>
99
- <groupId>com.google.code.findbugs</groupId>
100
- <artifactId>jsr305</artifactId>
101
- {{^parentOverridden}}
102
- <version>3.0.2</version>
103
- {{/parentOverridden}}
104
- </dependency>
105
- <dependency>
106
- <groupId>org.springframework.cloud</groupId>
107
- <artifactId>spring-cloud-starter-openfeign</artifactId>
108
- </dependency>
109
- <dependency>
110
- <groupId>org.springframework.security</groupId>
111
- <artifactId>spring-security-oauth2-client</artifactId>
112
- {{^parentOverridden}}
113
- <version>6.1.1</version>
114
- {{/parentOverridden}}
115
- </dependency>
116
- {{#withXml}}
117
- <!-- XML processing: Jackson -->
118
- <dependency>
119
- <groupId>com.fasterxml.jackson.dataformat</groupId>
120
- <artifactId>jackson-dataformat-xml</artifactId>
121
- </dependency>
122
- {{/withXml}}
123
- <dependency>
124
- <groupId>com.fasterxml.jackson.datatype</groupId>
125
- <artifactId>jackson-datatype-jsr310</artifactId>
126
- </dependency>
127
- {{#joda}}
128
- <dependency>
129
- <groupId>com.fasterxml.jackson.datatype</groupId>
130
- <artifactId>jackson-datatype-joda</artifactId>
131
- </dependency>
132
- {{/joda}}
133
- {{#openApiNullable}}
134
- <dependency>
135
- <groupId>org.openapitools</groupId>
136
- <artifactId>jackson-databind-nullable</artifactId>
137
- {{^parentOverridden}}
138
- <version>0.2.6</version>
139
- {{/parentOverridden}}
140
- </dependency>
141
- {{/openApiNullable}}
142
- {{#hateoas}}
143
- <dependency>
144
- <groupId>org.springframework.boot</groupId>
145
- <artifactId>spring-boot-starter-hateoas</artifactId>
146
- </dependency>
147
- {{/hateoas}}
148
- {{#lombok}}
149
- <dependency>
150
- <groupId>org.projectlombok</groupId>
151
- <artifactId>lombok</artifactId>
152
- <optional>true</optional>
153
- </dependency>
154
- {{/lombok}}
155
- {{#useBeanValidation}}
156
- <dependency>
157
- <groupId>org.springframework.boot</groupId>
158
- <artifactId>spring-boot-starter-validation</artifactId>
159
- </dependency>
160
- {{/useBeanValidation}}
161
- <dependency>
162
- <groupId>org.springframework.data</groupId>
163
- <artifactId>spring-data-commons</artifactId>
164
- </dependency>
165
- <dependency>
166
- <groupId>org.springframework.boot</groupId>
167
- <artifactId>spring-boot-starter-test</artifactId>
168
- <scope>test</scope>
169
- </dependency>
170
- </dependencies>
171
- </project>