From af2ed1c7a6272420f294cd73a21549f0ee84384a Mon Sep 17 00:00:00 2001 From: jaqxues <32979131+jaqxues@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:51:46 +0200 Subject: [PATCH] [kotlin] enforce fields in data classes (#19526) Fix #14710 --- .../src/main/resources/kotlin-client/data_class.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index 9290173fd6b1..b6d2b11522f9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -74,7 +74,7 @@ import {{packageName}}.infrastructure.ITransformForStorage @Deprecated(message = "This schema is deprecated.") {{/isDeprecated}} {{>additionalModelTypeAnnotations}} -{{#nonPublicApi}}internal {{/nonPublicApi}}{{#discriminator}}interface{{/discriminator}}{{^discriminator}}data class{{/discriminator}} {{classname}}{{^discriminator}} ( +{{#nonPublicApi}}internal {{/nonPublicApi}}{{#discriminator}}interface{{/discriminator}}{{^discriminator}}{{#hasVars}}data {{/hasVars}}class{{/discriminator}} {{classname}}{{^discriminator}} ( {{#allVars}} {{#required}}{{>data_class_req_var}}{{/required}}{{^required}}{{>data_class_opt_var}}{{/required}}{{^-last}},{{/-last}}