From 7579f5b0f6e44252eaf8fcfbe6a9f093fba42abb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 11:43:21 +0300 Subject: [PATCH 1/5] chore(deps): Bump kotlin.version from 2.0.21 to 2.1.0 in /generator (#499) --- generator/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/pom.xml b/generator/pom.xml index 201133a0..22dc9bf9 100644 --- a/generator/pom.xml +++ b/generator/pom.xml @@ -40,7 +40,7 @@ 0.0.1-SNAPSHOT - 2.0.21 + 2.1.0 7.10.0 From eb40154221e2ba8b7545ca4efe5981d4fcc1741e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:28:23 +0300 Subject: [PATCH 2/5] chore(deps): Bump com.github.gantsign.maven:ktlint-maven-plugin from 3.2.0 to 3.3.0 in /generator (#402) --- generator/pom.xml | 2 +- .../sdk/generators/openapi/Discriminator.kt | 5 ++--- .../sdk/generators/openapi/ModelTemplate.kt | 5 ++++- .../sdk/generators/openapi/MustacheHelpers.kt | 11 ++++++----- .../com/expediagroup/sdk/model/Exception.kt | 15 ++++++++++++--- 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/generator/pom.xml b/generator/pom.xml index 22dc9bf9..378373bb 100644 --- a/generator/pom.xml +++ b/generator/pom.xml @@ -45,7 +45,7 @@ 3.5.0 - 3.2.0 + 3.3.0 3.13.0 3.4.2 3.3.1 diff --git a/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt b/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt index ad53b8fe..9308f81b 100644 --- a/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt +++ b/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt @@ -23,15 +23,14 @@ internal data class Discriminator( val value: String, ) -internal fun getParentDiscriminator(model: CodegenModel): Discriminator? { - return model.parentModel?.discriminator?.let { +internal fun getParentDiscriminator(model: CodegenModel): Discriminator? = + model.parentModel?.discriminator?.let { Discriminator( it.propertyBaseName, it.propertyName, it.mappedModels.find { mappedModel -> mappedModel.modelName.equals(model.classname) }!!.mappingName, ) } -} internal fun getDiscriminators(model: CodegenModel): MutableList { val discriminators: MutableList = model.parentModel?.let { getDiscriminators(model.parentModel) } ?: mutableListOf() diff --git a/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/ModelTemplate.kt b/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/ModelTemplate.kt index 36379390..5047968e 100644 --- a/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/ModelTemplate.kt +++ b/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/ModelTemplate.kt @@ -18,7 +18,10 @@ package com.expediagroup.sdk.generators.openapi import org.openapitools.codegen.api.TemplateDefinition import org.openapitools.codegen.api.TemplateFileType.Model -class ModelTemplate(templateFile: String, destinationFilename: String) : TemplateDefinition(templateFile, destinationFilename) { +class ModelTemplate( + templateFile: String, + destinationFilename: String, +) : TemplateDefinition(templateFile, destinationFilename) { init { templateType = Model } diff --git a/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/MustacheHelpers.kt b/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/MustacheHelpers.kt index dd2e679a..e1a5576d 100644 --- a/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/MustacheHelpers.kt +++ b/generator/src/main/kotlin/com/expediagroup/sdk/generators/openapi/MustacheHelpers.kt @@ -66,11 +66,12 @@ val mustacheHelpers = model.parentModel?.let { val discriminators: MutableList = getDiscriminators(model) writer.write("super({\n") - it.allVars.filterNot { variable -> - variable.isDiscriminator || discriminators.contains(variable.baseName) - }.forEach { variable -> - writer.write("${variable.name}: ${model.classVarName}.${variable.name},\n") - } + it.allVars + .filterNot { variable -> + variable.isDiscriminator || discriminators.contains(variable.baseName) + }.forEach { variable -> + writer.write("${variable.name}: ${model.classVarName}.${variable.name},\n") + } writer.write("})") } } diff --git a/generator/src/main/kotlin/com/expediagroup/sdk/model/Exception.kt b/generator/src/main/kotlin/com/expediagroup/sdk/model/Exception.kt index 6ca30940..14b9aa08 100644 --- a/generator/src/main/kotlin/com/expediagroup/sdk/model/Exception.kt +++ b/generator/src/main/kotlin/com/expediagroup/sdk/model/Exception.kt @@ -15,8 +15,17 @@ */ package com.expediagroup.sdk.model -open class GeneratorException(message: String, cause: Throwable? = null) : RuntimeException(message, cause) +open class GeneratorException( + message: String, + cause: Throwable? = null, +) : RuntimeException(message, cause) -class ClientGenerationException(message: String, cause: Throwable? = null) : GeneratorException(message, cause) +class ClientGenerationException( + message: String, + cause: Throwable? = null, +) : GeneratorException(message, cause) -class PreProcessingException(message: String, cause: Throwable? = null) : GeneratorException(message, cause) +class PreProcessingException( + message: String, + cause: Throwable? = null, +) : GeneratorException(message, cause) From cf23c6fffa6deb183e9921a0e054125ecf6db8ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:35:06 +0300 Subject: [PATCH 3/5] feat(deps): update build com.github.gantsign.maven:ktlint-maven-plugin from v3.2.0 to v3.3.0 (#411) From 1b81f92ee52d1538c0492b3a6f9f57082fceb91d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:25:26 +0300 Subject: [PATCH 4/5] chore(deps-dev): Bump typedoc and typedoc-plugin-markdown in /generator/src/main/resources/dependencies (#497) --- generator/src/main/resources/dependencies/package.json | 4 ++-- .../resources/templates/expediagroup-sdk/typedoc.mustache | 1 - .../exemplar-docs/client/classes/ExemplarClient.md | 4 +++- .../client/core/classes/AxiosClientConfigurations.md | 8 ++++++-- .../resources/exemplar-docs/models/classes/ErrorCause.md | 4 +++- .../resources/exemplar-docs/models/classes/Greeting.md | 4 +++- .../resources/exemplar-docs/models/classes/ModelError.md | 4 +++- 7 files changed, 20 insertions(+), 9 deletions(-) diff --git a/generator/src/main/resources/dependencies/package.json b/generator/src/main/resources/dependencies/package.json index 3531f75d..455d691d 100644 --- a/generator/src/main/resources/dependencies/package.json +++ b/generator/src/main/resources/dependencies/package.json @@ -12,8 +12,8 @@ "devDependencies": { "prettier": "3.4.1", "prettier-plugin-organize-imports": "4.1.0", - "typedoc": "0.26.11", - "typedoc-plugin-markdown": "4.2.10", + "typedoc": "0.27.1", + "typedoc-plugin-markdown": "4.3.0", "typedoc-plugin-missing-exports": "3.1.0" } } diff --git a/generator/src/main/resources/templates/expediagroup-sdk/typedoc.mustache b/generator/src/main/resources/templates/expediagroup-sdk/typedoc.mustache index d855841a..7c43f0f3 100644 --- a/generator/src/main/resources/templates/expediagroup-sdk/typedoc.mustache +++ b/generator/src/main/resources/templates/expediagroup-sdk/typedoc.mustache @@ -10,7 +10,6 @@ "excludeInternal": true, "excludeExternals": true, "excludeReferences": true, - "hideParameterTypesInTitle": true, "hideGenerator": true, "githubPages": false, "readme": "none", diff --git a/generator/src/test/resources/exemplar-docs/client/classes/ExemplarClient.md b/generator/src/test/resources/exemplar-docs/client/classes/ExemplarClient.md index 0b5590c8..0acf03f0 100644 --- a/generator/src/test/resources/exemplar-docs/client/classes/ExemplarClient.md +++ b/generator/src/test/resources/exemplar-docs/client/classes/ExemplarClient.md @@ -14,7 +14,9 @@ #### Parameters -• **configurations**: [`ClientConfigurations`](../core/interfaces/ClientConfigurations.md) +##### configurations + +[`ClientConfigurations`](../core/interfaces/ClientConfigurations.md) #### Returns diff --git a/generator/src/test/resources/exemplar-docs/client/core/classes/AxiosClientConfigurations.md b/generator/src/test/resources/exemplar-docs/client/core/classes/AxiosClientConfigurations.md index 21bb4437..35743a72 100644 --- a/generator/src/test/resources/exemplar-docs/client/core/classes/AxiosClientConfigurations.md +++ b/generator/src/test/resources/exemplar-docs/client/core/classes/AxiosClientConfigurations.md @@ -10,9 +10,13 @@ #### Parameters -• **endpoint**: `string` = `Constant.ENDPOINT` +##### endpoint -• **requestTimeout**: `number` = `Constant.TEN_SECONDS_IN_MILLIS` +`string` = `Constant.ENDPOINT` + +##### requestTimeout + +`number` = `Constant.TEN_SECONDS_IN_MILLIS` #### Returns diff --git a/generator/src/test/resources/exemplar-docs/models/classes/ErrorCause.md b/generator/src/test/resources/exemplar-docs/models/classes/ErrorCause.md index 238381fe..e35d73d7 100644 --- a/generator/src/test/resources/exemplar-docs/models/classes/ErrorCause.md +++ b/generator/src/test/resources/exemplar-docs/models/classes/ErrorCause.md @@ -12,7 +12,9 @@ The object used to describe a cause for an error, containing both human-readable #### Parameters -• **errorCause**: [`ErrorCauseProperties`](../interfaces/ErrorCauseProperties.md) +##### errorCause + +[`ErrorCauseProperties`](../interfaces/ErrorCauseProperties.md) #### Returns diff --git a/generator/src/test/resources/exemplar-docs/models/classes/Greeting.md b/generator/src/test/resources/exemplar-docs/models/classes/Greeting.md index 3717b457..750bbf67 100644 --- a/generator/src/test/resources/exemplar-docs/models/classes/Greeting.md +++ b/generator/src/test/resources/exemplar-docs/models/classes/Greeting.md @@ -10,7 +10,9 @@ #### Parameters -• **greeting**: [`GreetingProperties`](../interfaces/GreetingProperties.md) +##### greeting + +[`GreetingProperties`](../interfaces/GreetingProperties.md) #### Returns diff --git a/generator/src/test/resources/exemplar-docs/models/classes/ModelError.md b/generator/src/test/resources/exemplar-docs/models/classes/ModelError.md index 3c45913d..60687900 100644 --- a/generator/src/test/resources/exemplar-docs/models/classes/ModelError.md +++ b/generator/src/test/resources/exemplar-docs/models/classes/ModelError.md @@ -12,7 +12,9 @@ The object used the describe an error, containing both human-readable and in a m #### Parameters -• **error**: [`ModelErrorProperties`](../interfaces/ModelErrorProperties.md) +##### error + +[`ModelErrorProperties`](../interfaces/ModelErrorProperties.md) #### Returns From 72f438c1a7d5759a139d068cfcaf0bb8b6d86a7b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:28:13 +0300 Subject: [PATCH 5/5] chore(deps): update devdependencies typescript from v5.6.3 to v5.7.2 (#490) --- core/package-lock.json | 9 +++++---- core/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 4fdfde29..b6136863 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -22,7 +22,7 @@ "jest": "29.7.0", "ts-jest": "29.2.5", "ts-standard": "12.0.2", - "typescript": "5.6.3" + "typescript": "5.7.2" } }, "node_modules/@ampproject/remapping": { @@ -9585,10 +9585,11 @@ } }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/core/package.json b/core/package.json index 98684430..39c310aa 100644 --- a/core/package.json +++ b/core/package.json @@ -23,6 +23,6 @@ "jest": "29.7.0", "ts-jest": "29.2.5", "ts-standard": "12.0.2", - "typescript": "5.6.3" + "typescript": "5.7.2" } }