From f5b3e5a767754cd309a01521ffc6d064c7b7104a Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 15:20:08 +0200 Subject: [PATCH 1/8] fix issues with incorrectly escaped values --- .../codegen/CodegenOperation.java | 2 +- .../codegen/CodegenParameter.java | 2 +- .../openapitools/codegen/CodegenProperty.java | 8 +++++ .../openapitools/codegen/CodegenResponse.java | 1 + .../openapitools/codegen/DefaultCodegen.java | 18 +++++++++++- .../languages/AbstractKotlinCodegen.java | 15 +++++++++- .../languages/KotlinSpringServerCodegen.java | 9 ++---- .../resources/kotlin-client/api_doc.mustache | 14 ++++----- .../kotlin-client/class_doc.mustache | 4 +-- .../kotlin-client/data_class_opt_var.mustache | 4 +-- .../kotlin-client/data_class_req_var.mustache | 4 +-- .../libraries/jvm-ktor/api.mustache | 6 ++-- .../libraries/jvm-okhttp/api.mustache | 4 +-- .../libraries/jvm-retrofit2/api.mustache | 2 +- .../libraries/jvm-retrofit2/api_doc.mustache | 12 ++++---- .../jvm-retrofit2/explodedQueryParam.mustache | 2 +- .../jvm-retrofit2/formParams.mustache | 2 +- .../jvm-retrofit2/headerParams.mustache | 2 +- .../jvm-retrofit2/paramJavadoc.mustache | 8 ++--- .../jvm-retrofit2/pathParams.mustache | 2 +- .../jvm-retrofit2/queryParam.mustache | 2 +- .../jvm-spring-restclient/api.mustache | 12 ++++---- .../jvm-spring-webclient/api.mustache | 12 ++++---- .../libraries/jvm-vertx/api.mustache | 8 ++--- .../libraries/jvm-volley/api.mustache | 8 ++--- .../libraries/jvm-volley/api_doc.mustache | 10 +++---- .../libraries/jvm-volley/formParams.mustache | 2 +- .../jvm-volley/headerParams.mustache | 2 +- .../libraries/jvm-volley/pathParams.mustache | 2 +- .../libraries/jvm-volley/queryParams.mustache | 2 +- .../libraries/multiplatform/api.mustache | 8 ++--- .../param_default_value.mustache | 2 +- .../resources/kotlin-misk/apiAction.mustache | 2 +- .../resources/kotlin-misk/api_doc.mustache | 16 +++++----- .../resources/kotlin-misk/class_doc.mustache | 4 +-- .../kotlin-misk/cookieParams.mustache | 2 +- .../main/resources/kotlin-misk/model.mustache | 2 +- .../resources/kotlin-server/api_doc.mustache | 16 +++++----- .../kotlin-server/class_doc.mustache | 4 +-- .../kotlin-server/data_class_opt_var.mustache | 2 +- .../kotlin-server/data_class_req_var.mustache | 2 +- .../javalin5/data_class_opt_var.mustache | 2 +- .../javalin5/data_class_req_var.mustache | 2 +- .../libraries/javalin5/paramDefault.mustache | 2 +- .../javalin6/data_class_opt_var.mustache | 2 +- .../javalin6/data_class_req_var.mustache | 2 +- .../libraries/javalin6/paramDefault.mustache | 2 +- .../jaxrs-spec/cookieParams.mustache | 2 +- .../jaxrs-spec/data_class_opt_var.mustache | 2 +- .../jaxrs-spec/headerParams.mustache | 2 +- .../libraries/jaxrs-spec/queryParams.mustache | 2 +- .../ktor2/data_class_opt_var.mustache | 2 +- .../ktor2/data_class_req_var.mustache | 2 +- .../main/resources/kotlin-spring/api.mustache | 16 +++++----- .../kotlin-spring/apiInterface.mustache | 16 +++++----- .../kotlin-spring/bodyParams.mustache | 2 +- .../kotlin-spring/cookieParams.mustache | 2 +- .../kotlin-spring/dataClassOptVar.mustache | 6 ++-- .../kotlin-spring/dataClassReqVar.mustache | 6 ++-- .../kotlin-spring/formParams.mustache | 2 +- .../kotlin-spring/headerParams.mustache | 2 +- .../kotlin-spring/implicitHeaders.mustache | 4 +-- .../kotlin-spring/interfaceOptVar.mustache | 6 ++-- .../kotlin-spring/interfaceReqVar.mustache | 4 +-- .../apiInterface.mustache | 2 +- .../httpInterfaceBodyParams.mustache | 2 +- .../kotlin-spring/methodBody.mustache | 2 +- .../kotlin-spring/pathParams.mustache | 2 +- .../kotlin-spring/queryParams.mustache | 2 +- .../kotlin-vertx-server/api_doc.mustache | 12 ++++---- .../kotlin-vertx-server/class_doc.mustache | 4 +-- .../kotlin-wiremock/api-stub.mustache | 6 ++-- .../resources/kotlin-wiremock/model.mustache | 6 ++-- .../kotlin/KotlinClientCodegenModelTest.java | 29 +++++++++++++++++++ .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../docs/DefaultApi.md | 6 ++-- .../petstore/kotlin-explicit/docs/PetApi.md | 4 +-- .../petstore/kotlin-explicit/docs/StoreApi.md | 6 ++-- .../petstore/kotlin-gson/docs/PetApi.md | 4 +-- .../petstore/kotlin-gson/docs/StoreApi.md | 6 ++-- .../petstore/kotlin-jackson/docs/PetApi.md | 4 +-- .../petstore/kotlin-jackson/docs/StoreApi.md | 6 ++-- .../kotlin-json-request-string/docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../kotlin-jvm-jackson/docs/StoreApi.md | 4 +-- .../kotlin-jvm-ktor-gson/docs/PetApi.md | 4 +-- .../kotlin-jvm-ktor-gson/docs/StoreApi.md | 6 ++-- .../kotlin-jvm-ktor-jackson/docs/PetApi.md | 4 +-- .../kotlin-jvm-ktor-jackson/docs/StoreApi.md | 6 ++-- .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../docs/StoreApi.md | 4 +-- .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../kotlin-jvm-vertx-gson/docs/PetApi.md | 4 +-- .../kotlin-jvm-vertx-gson/docs/StoreApi.md | 6 ++-- .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../kotlin-jvm-vertx-jackson/docs/PetApi.md | 4 +-- .../kotlin-jvm-vertx-jackson/docs/StoreApi.md | 6 ++-- .../kotlin-jvm-vertx-moshi/docs/PetApi.md | 4 +-- .../kotlin-jvm-vertx-moshi/docs/StoreApi.md | 6 ++-- .../kotlin-kotlinx-datetime/docs/PetApi.md | 4 +-- .../kotlin-kotlinx-datetime/docs/StoreApi.md | 6 ++-- .../docs/StoreApi.md | 4 +-- .../kotlin-modelMutable/docs/PetApi.md | 4 +-- .../kotlin-modelMutable/docs/StoreApi.md | 6 ++-- .../kotlin-moshi-codegen/docs/PetApi.md | 4 +-- .../kotlin-moshi-codegen/docs/StoreApi.md | 6 ++-- .../docs/PetApi.md | 4 +-- .../docs/StoreApi.md | 6 ++-- .../kotlin-multiplatform/docs/PetApi.md | 4 +-- .../kotlin-multiplatform/docs/StoreApi.md | 6 ++-- .../petstore/kotlin-nonpublic/docs/PetApi.md | 4 +-- .../kotlin-nonpublic/docs/StoreApi.md | 6 ++-- .../petstore/kotlin-nullable/docs/PetApi.md | 4 +-- .../petstore/kotlin-nullable/docs/StoreApi.md | 6 ++-- .../kotlin-retrofit2-jackson/docs/StoreApi.md | 4 +-- .../docs/StoreApi.md | 4 +-- .../kotlin-retrofit2-rx3/docs/StoreApi.md | 4 +-- .../kotlin-retrofit2/docs/StoreApi.md | 4 +-- .../petstore/kotlin-string/docs/PetApi.md | 4 +-- .../petstore/kotlin-string/docs/StoreApi.md | 6 ++-- .../petstore/kotlin-threetenbp/docs/PetApi.md | 4 +-- .../kotlin-threetenbp/docs/StoreApi.md | 6 ++-- samples/client/petstore/kotlin/docs/PetApi.md | 4 +-- .../client/petstore/kotlin/docs/StoreApi.md | 6 ++-- .../kotlin-misk-config/docs/PetApi.md | 4 +-- .../kotlin-misk-config/docs/StoreApi.md | 6 ++-- .../petstore/kotlin-misk/docs/PetApi.md | 4 +-- .../petstore/kotlin-misk/docs/StoreApi.md | 6 ++-- .../org/openapitools/api/PetApiDelegate.kt | 22 +++++++------- .../org/openapitools/api/StoreApiDelegate.kt | 8 ++--- .../org/openapitools/api/UserApiDelegate.kt | 4 +-- .../org/openapitools/api/PetApiDelegate.kt | 14 ++++----- .../org/openapitools/api/StoreApiDelegate.kt | 8 ++--- .../org/openapitools/api/UserApiDelegate.kt | 4 +-- 144 files changed, 418 insertions(+), 354 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index 47e09ea292d4..eb6a78a2c831 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -33,7 +33,7 @@ public class CodegenOperation { hasErrorResponseObject; // if 4xx, 5xx responses have at least one error object defined public CodegenProperty returnProperty; public String path, operationId, returnType, returnFormat, httpMethod, returnBaseType, - returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse; + returnContainer, summary, unescapedSummary, unescapedNotes, notes, baseName, defaultResponse; public CodegenDiscriminator discriminator; public List> consumes, produces, prioritizedContentTypes; public List servers = new ArrayList(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 90c4c66558c0..98f2b1e892c9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -34,7 +34,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties { isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, isDeepObject, isMatrix, isAllowEmptyValue, isFormStyle, isSpaceDelimited, isPipeDelimited; public String baseName, paramName, dataType, datatypeWithEnum, dataFormat, contentType, - collectionFormat, description, unescapedDescription, baseType, defaultValue, enumDefaultValue, enumName, style; + collectionFormat, description, unescapedDescription, baseType, defaultValue, unescapedDefaultValue, enumDefaultValue, enumName, style; public String nameInLowerCase; // property name in lower case public String nameInCamelCase; // property name in camel case (e.g. modifiedDate) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index c854389be7b2..cdb73688de6f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -81,6 +81,14 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti @Getter @Setter public String unescapedDescription; + /** + * The default value string without escape characters; use this in string literal contexts + * (e.g. inside "..." or """...""") together with an appropriate escaping lambda. + * Unlike {@code defaultValue}, this is never passed through escapeText() or escapeUnsafeCharacters(). + */ + @Getter @Setter + public String unescapedDefaultValue; + /** * maxLength validation for strings, see http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.2.1 */ diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index 3298d80868f2..ad9f45283638 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -33,6 +33,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { public boolean is4xx; public boolean is5xx; public String message; + public String unescapedMessage; public List> examples; public String dataType; public String baseType; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 710f7838d72f..fbd052f3f8f0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -476,7 +476,17 @@ protected ImmutableMap.Builder addMustacheLambdas() { .put("trimLineBreaks", new TrimLineBreaksLambda()) .put("trimWhitespace", new TrimWhitespaceLambda()) .put("trimTrailingWithNewLine", new TrimTrailingWhiteSpaceLambda(true)) - .put("trimTrailing", new TrimTrailingWhiteSpaceLambda(false)); + .put("trimTrailing", new TrimTrailingWhiteSpaceLambda(false)) + // Escapes text for use inside a Markdown table cell. + // \\ must be replaced first to avoid double-escaping subsequent replacements. + // $ is escaped to prevent LaTeX math mode ($...$) in markdown renderers that support it. + .put("escapeMarkdown", (fragment, writer) -> writer.write(fragment.execute() + .replace("\\", "\\\\") + .replace("$", "\\$") + .replace("|", "\\|") + .replace("\r\n", " ") + .replace("\n", " ") + .replace("\r", " "))); } private void registerMustacheLambdas() { @@ -4315,6 +4325,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo // set the default value property.defaultValue = toDefaultValue(property, p); + property.unescapedDefaultValue = p.getDefault() != null ? String.valueOf(p.getDefault()) : null; property.defaultValueWithParam = toDefaultValueWithParam(name, p); LOGGER.debug("debugging from property return: {}", property); @@ -4738,6 +4749,7 @@ public CodegenOperation fromOperation(String path, } op.summary = escapeText(operation.getSummary()); + op.unescapedSummary = operation.getSummary(); op.unescapedNotes = operation.getDescription(); op.notes = escapeText(operation.getDescription()); op.hasConsumes = false; @@ -5092,6 +5104,7 @@ public CodegenResponse fromResponse(String responseCode, ApiResponse response) { } r.schema = responseSchema; r.message = escapeText(response.getDescription()); + r.unescapedMessage = response.getDescription(); // adding examples to API responses Map examples = ExamplesUtils.getExamplesFromResponse(openAPI, response); @@ -5641,6 +5654,7 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) // set default value codegenParameter.defaultValue = toDefaultParameterValue(codegenProperty, parameterSchema); + codegenParameter.unescapedDefaultValue = parameterSchema.getDefault() != null ? String.valueOf(parameterSchema.getDefault()) : null; finishUpdatingParameter(codegenParameter, parameter); return codegenParameter; @@ -7543,6 +7557,7 @@ public CodegenParameter fromFormProperty(String name, Schema propertySchema, Set // set default value codegenParameter.defaultValue = toDefaultParameterValue(codegenProperty, propertySchema); + codegenParameter.unescapedDefaultValue = propertySchema.getDefault() != null ? String.valueOf(propertySchema.getDefault()) : null; if (ModelUtils.isFileSchema(ps) && !ModelUtils.isStringSchema(ps)) { // swagger v2 only, type file @@ -8089,6 +8104,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S codegenParameter.baseName = "UNKNOWN_BASE_NAME"; codegenParameter.paramName = "UNKNOWN_PARAM_NAME"; codegenParameter.description = escapeText(body.getDescription()); + codegenParameter.unescapedDescription = body.getDescription(); codegenParameter.required = body.getRequired() != null ? body.getRequired() : Boolean.FALSE; codegenParameter.isBodyParam = Boolean.TRUE; if (body.getExtensions() != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index 4d9b8217d763..8aea9042b0e6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -1274,7 +1274,20 @@ protected void updateModelForObject(CodegenModel m, Schema schema) { @Override protected ImmutableMap.Builder addMustacheLambdas() { return super.addMustacheLambdas() - .put("escapeDollar", new EscapeChar("(? writer.write(fragment.execute() + .replace("\\", "\\\\") + .replace("$", "\\$") + .replace("\"", "\\\"") + .replace("\n", "\\n") + .replace("\r", "\\r") + .replace("\t", "\\t"))); } protected interface DataTypeAssigner { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 6d2a86061991..3b850904f9a3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -962,17 +962,13 @@ public void processOpts() { // spring uses the jackson lib, and we disallow configuration. additionalProperties.put("jackson", "true"); - // add lambda for mustache templates - additionalProperties.put("lambdaEscapeInNormalString", - (Mustache.Lambda) (fragment, writer) -> writer.write(fragment.execute().replaceAll("([$\"\\\\])", "\\\\$1"))); - additionalProperties.put("lambdaRemoveLineBreak", - (Mustache.Lambda) (fragment, writer) -> writer.write(fragment.execute().replaceAll("[\\r\\n]", ""))); } @Override protected ImmutableMap.Builder addMustacheLambdas() { return super.addMustacheLambdas() - .put("escapeDoubleQuote", new EscapeLambda("\"", "\\\"")); + .put("escapeDoubleQuote", new EscapeLambda("\"", "\\\"")) + .put("removeLineBreak", (fragment, writer) -> writer.write(fragment.execute().replaceAll("[\\r\\n]", ""))); } @Override @@ -1445,6 +1441,7 @@ private void markPropertyAsInherited(CodegenModel model, String baseName, String p.defaultValue = dataType + "." + toEnumVarName(discriminatorValue, dataType); } else { p.defaultValue = "\"" + escapeText(discriminatorValue) + "\""; + p.unescapedDefaultValue = discriminatorValue; } } }); diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache index a997cafd1621..ef952adfdc4d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache @@ -1,22 +1,22 @@ # {{classname}}{{#description}} -{{.}}{{/description}} +{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/description}} All URIs are relative to *{{basePath}}* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}} | {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{operationId}}** -> {{#returnType}}{{.}}{{#nullableReturnType}}?{{/nullableReturnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{#nullableReturnType}}?{{/nullableReturnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) -{{summary}}{{#notes}} +{{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}}{{#unescapedNotes}} -{{.}}{{/notes}} +{{#lambda.escapeMarkdown}}{{{unescapedNotes}}}{{/lambda.escapeMarkdown}}{{/unescapedNotes}} ### Example ```kotlin @@ -27,7 +27,7 @@ All URIs are relative to *{{basePath}}* {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} {{/allParams}} try { {{#returnType}}val result : {{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} @@ -50,7 +50,7 @@ This endpoint does not need any parameter. | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | {{/-last}} -| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache index 6ab282918f35..d5f934b50df9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache @@ -3,7 +3,7 @@ ## Properties | Name | Type | Description | Notes | | ------------ | ------------- | ------------- | ------------- | -{{#vars}}| **{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} | +{{#vars}}| **{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} | {{/vars}} {{#vars}}{{#isEnum}} @@ -11,5 +11,5 @@ ## Enum: {{baseName}} | Name | Value | | ---- | ----- |{{#allowableValues}} -| {{name}} | {{#values}}{{.}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} | +| {{name}} | {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} | {{/isEnum}}{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache index abaf53a3b30a..193b0f6b1ed3 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache @@ -9,7 +9,7 @@ @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") {{/gson}} {{#jackson}} - @get:JsonProperty("{{{vendorExtensions.x-base-name-literal}}}") + @get:JsonProperty("{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}") {{/jackson}} {{#kotlinx_serialization}} {{^isEnum}}{{^isArray}}{{^isPrimitiveType}}{{^isModel}}@Contextual {{/isModel}}{{/isPrimitiveType}}{{/isArray}}{{/isEnum}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @@ -21,4 +21,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInPascalCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInPascalCase}}}{{/isArray}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{^multiplatform}}{{{dataType}}}("{{{defaultValue}}}"){{/multiplatform}}{{#multiplatform}}({{{defaultValue}}}).toDouble(){{/multiplatform}}{{/isNumber}}{{/defaultValue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInPascalCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInPascalCase}}}{{/isArray}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{^multiplatform}}{{{dataType}}}("{{{defaultValue}}}"){{/multiplatform}}{{#multiplatform}}({{{defaultValue}}}).toDouble(){{/multiplatform}}{{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache index 0d9ec6067c5a..d64962ca840e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache @@ -9,7 +9,7 @@ @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") {{/gson}} {{#jackson}} - @get:JsonProperty("{{{vendorExtensions.x-base-name-literal}}}") + @get:JsonProperty("{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}") {{/jackson}} {{#kotlinx_serialization}} {{^isEnum}}{{^isArray}}{{^isPrimitiveType}}{{^isModel}}@Contextual {{/isModel}}{{/isPrimitiveType}}{{/isArray}}{{/isEnum}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @@ -21,4 +21,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInPascalCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInPascalCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{^multiplatform}}{{{dataType}}}("{{{defaultValue}}}"){{/multiplatform}}{{#multiplatform}}({{{defaultValue}}}).toDouble(){{/multiplatform}}{{/isNumber}}{{/defaultValue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInPascalCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInPascalCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{^multiplatform}}{{{dataType}}}("{{{defaultValue}}}"){{/multiplatform}}{{#multiplatform}}({{{defaultValue}}}).toDouble(){{/multiplatform}}{{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/api.mustache index 8b2dbf4a3cdd..14cd05ed1505 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/api.mustache @@ -132,17 +132,17 @@ import com.fasterxml.jackson.databind.ObjectMapper val localVariableQuery = mutableMapOf>() {{#queryParams}} - {{{paramName}}}?.apply { localVariableQuery["{{baseName}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf("${{{paramName}}}"){{/isContainer}} } + {{{paramName}}}?.apply { localVariableQuery["{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf("${{{paramName}}}"){{/isContainer}} } {{/queryParams}} val localVariableHeaders = mutableMapOf() {{#headerParams}} - {{{paramName}}}?.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } + {{{paramName}}}?.apply { localVariableHeaders["{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } {{/headerParams}} val localVariableConfig = RequestConfig( RequestMethod.{{httpMethod}}, - "{{{path}}}"{{#pathParams}}.replace("{" + "{{baseName}}" + "}", "${{{paramName}}}"){{/pathParams}}, + "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}"{{#pathParams}}.replace("{" + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" + "}", "${{{paramName}}}"){{/pathParams}}, query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = {{#hasAuthMethods}}true{{/hasAuthMethods}}{{^hasAuthMethods}}false{{/hasAuthMethods}}, diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache index 8727a9a79b6f..8dd766d85280 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache @@ -142,7 +142,7 @@ import {{packageName}}.infrastructure.Serializer {{#isDeprecated}} @Deprecated(message = "This operation is deprecated.") {{/isDeprecated}} - {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}{{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}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}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{^doNotUseRxAndCoroutines}}{{#useCoroutines}} = withContext(Dispatchers.IO){{/useCoroutines}}{{/doNotUseRxAndCoroutines}} { + {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}{{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}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}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{^doNotUseRxAndCoroutines}}{{#useCoroutines}} = withContext(Dispatchers.IO){{/useCoroutines}}{{/doNotUseRxAndCoroutines}} { {{#isDeprecated}} @Suppress("DEPRECATION") {{/isDeprecated}} @@ -264,7 +264,7 @@ import {{packageName}}.infrastructure.Serializer return RequestConfig( method = RequestMethod.{{httpMethod}}, - path = "{{{path}}}"{{#pathParams}}.replace("{"+"{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"+"}", encodeURIComponent({{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}.toString(){{/isContainer}})){{/pathParams}}, + path = "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}"{{#pathParams}}.replace("{"+"{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"+"}", encodeURIComponent({{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}.toString(){{/isContainer}})){{/pathParams}}, query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = {{#hasAuthMethods}}true{{/hasAuthMethods}}{{^hasAuthMethods}}false{{/hasAuthMethods}}, diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache index 9cd7ef3fea02..614d09fe1884 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache @@ -155,7 +155,7 @@ import okhttp3.MultipartBody {{/-first}} {{/prioritizedContentTypes}} {{/formParams}} - @{{httpMethod}}("{{{path}}}") + @{{httpMethod}}("{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}") {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}{{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}({{^allParams}}){{/allParams}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/allParams}}{{#returnType}}: {{/returnType}}{{^returnType}}{{#useResponseAsReturnType}}: {{/useResponseAsReturnType}}{{/returnType}}{{^doNotUseRxAndCoroutines}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{#useCoroutines}}{{#useResponseAsReturnType}}Response<{{/useResponseAsReturnType}}{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}{{#useResponseAsReturnType}}Unit{{/useResponseAsReturnType}}{{/returnType}}{{/isResponseFile}}{{#useResponseAsReturnType}}>{{/useResponseAsReturnType}}{{/useCoroutines}}{{/doNotUseRxAndCoroutines}}{{#doNotUseRxAndCoroutines}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/doNotUseRxAndCoroutines}} {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache index f764206df126..70a9b1602a45 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache @@ -1,19 +1,19 @@ # {{classname}}{{#description}} -{{.}}{{/description}} +{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/description}} All URIs are relative to *{{basePath}}* | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}} | {{/operation}}{{/operations}} {{#operations}} {{#operation}} -{{summary}}{{#notes}} +{{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}}{{#unescapedNotes}} -{{.}}{{/notes}} +{{#lambda.escapeMarkdown}}{{{unescapedNotes}}}{{/lambda.escapeMarkdown}}{{/unescapedNotes}} ### Example ```kotlin @@ -35,7 +35,7 @@ apiClient.setBearerToken("TOKEN") {{/authMethods}} val webService = apiClient.createWebservice({{{classname}}}::class.java) {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} {{/allParams}} {{#useCoroutines}} @@ -56,7 +56,7 @@ This endpoint does not need any parameter. | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | {{/-last}} -| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | +| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/explodedQueryParam.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/explodedQueryParam.mustache index 3aaa4e67fbf4..1a266486f8aa 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/explodedQueryParam.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/explodedQueryParam.mustache @@ -1 +1 @@ -@Query("{{baseName}}") {{{baseName}}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}{{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{{dataType}}}{{/collectionFormat}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}} \ No newline at end of file +@Query("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}") {{{baseName}}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}{{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{{dataType}}}{{/collectionFormat}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache index fe5c9db69053..bb12b0dd5116 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field("{{baseName}}"){{/isMultipart}} {{{paramName}}}: {{#isCollectionFormatMulti}}List<{{/isCollectionFormatMulti}}MultipartBody.Part{{#isCollectionFormatMulti}}>{{/isCollectionFormatMulti}}{{^required}}? = null{{/required}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"){{/isMultipart}} {{{paramName}}}: {{#isCollectionFormatMulti}}List<{{/isCollectionFormatMulti}}MultipartBody.Part{{#isCollectionFormatMulti}}>{{/isCollectionFormatMulti}}{{^required}}? = null{{/required}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache index eaf1e7c3bf60..3e10dde21134 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@Header("{{baseName}}") {{{paramName}}}: {{#isEnum}}{{enumName}}{{operationIdCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@Header("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}") {{{paramName}}}: {{#isEnum}}{{enumName}}{{operationIdCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/paramJavadoc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/paramJavadoc.mustache index fe821c41b4df..24146e3603a4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/paramJavadoc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/paramJavadoc.mustache @@ -1,5 +1,5 @@ {{#allParams}}{{#isDeepObject}} - * @param {{{paramName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}{{/required}}{{/isDeepObject}}{{^isDeepObject}}{{#isExplode}}{{#hasVars}}{{#vars}} - * @param {{{baseName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}{{/required}}{{/vars}}{{/hasVars}}{{^hasVars}} - * @param {{{paramName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}{{/required}}{{/hasVars}}{{/isExplode}}{{^isExplode}} - * @param {{{paramName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}{{/required}}{{/isExplode}}{{/isDeepObject}}{{/allParams}} \ No newline at end of file + * @param {{{paramName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}){{/defaultValue}}{{/required}}{{/isDeepObject}}{{^isDeepObject}}{{#isExplode}}{{#hasVars}}{{#vars}} + * @param {{{baseName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}){{/defaultValue}}{{/required}}{{/vars}}{{/hasVars}}{{^hasVars}} + * @param {{{paramName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}){{/defaultValue}}{{/required}}{{/hasVars}}{{/isExplode}}{{^isExplode}} + * @param {{{paramName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}){{/defaultValue}}{{/required}}{{/isExplode}}{{/isDeepObject}}{{/allParams}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache index 685c514e6a90..5fa650b7934c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}@Path("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}@Path("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParam.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParam.mustache index e5c9833fb8d5..1d3edfd936c1 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParam.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParam.mustache @@ -1 +1 @@ -@Query("{{baseName}}") {{{paramName}}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}@JvmSuppressWildcards {{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/collectionFormat}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}} \ No newline at end of file +@Query("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}") {{{paramName}}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}@JvmSuppressWildcards {{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/collectionFormat}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-restclient/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-restclient/api.mustache index dc90d004dbdc..c2b25ca3cd0a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-restclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-restclient/api.mustache @@ -101,17 +101,17 @@ import {{packageName}}.infrastructure.* {{#queryParams}} {{^required}} if ({{{paramName}}} != null) { - put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + put("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } {{/required}} {{#required}} {{#isNullable}} if ({{{paramName}}} != null) { - put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + put("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } {{/isNullable}} {{^isNullable}} - put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + put("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) {{/isNullable}} {{/required}} {{/queryParams}} @@ -119,7 +119,7 @@ import {{packageName}}.infrastructure.* {{/hasQueryParams}} val localVariableHeaders: MutableMap = mutableMapOf({{#hasFormParams}}"Content-Type" to {{^consumes}}"multipart/form-data"{{/consumes}}{{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}{{/hasFormParams}}) {{#headerParams}} - {{{paramName}}}{{^required}}?{{/required}}.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } + {{{paramName}}}{{^required}}?{{/required}}.apply { localVariableHeaders["{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } {{/headerParams}} {{^hasFormParams}}{{#hasConsumes}}{{#consumes}}localVariableHeaders["Content-Type"] = "{{{mediaType}}}" {{/consumes}}{{/hasConsumes}}{{/hasFormParams}}{{#hasProduces}}localVariableHeaders["Accept"] = "{{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}" @@ -127,13 +127,13 @@ import {{packageName}}.infrastructure.* val params = mutableMapOf( {{#pathParams}} - "{{baseName}}" to {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}{{/isContainer}}, + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" to {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}{{/isContainer}}, {{/pathParams}} ) return RequestConfig( method = RequestMethod.{{httpMethod}}, - path = "{{{path}}}", + path = "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}", params = params, query = localVariableQuery, headers = localVariableHeaders, diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache index 6e30787d5042..77d9f45277af 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache @@ -103,17 +103,17 @@ import {{packageName}}.infrastructure.* {{#queryParams}} {{^required}} if ({{{paramName}}} != null) { - put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + put("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } {{/required}} {{#required}} {{#isNullable}} if ({{{paramName}}} != null) { - put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + put("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } {{/isNullable}} {{^isNullable}} - put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + put("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) {{/isNullable}} {{/required}} {{/queryParams}} @@ -121,7 +121,7 @@ import {{packageName}}.infrastructure.* {{/hasQueryParams}} val localVariableHeaders: MutableMap = mutableMapOf({{#hasFormParams}}"Content-Type" to {{^consumes}}"multipart/form-data"{{/consumes}}{{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}{{/hasFormParams}}) {{#headerParams}} - {{{paramName}}}{{^required}}?{{/required}}.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } + {{{paramName}}}{{^required}}?{{/required}}.apply { localVariableHeaders["{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } {{/headerParams}} {{^hasFormParams}}{{#hasConsumes}}{{#consumes}}localVariableHeaders["Content-Type"] = "{{{mediaType}}}" {{/consumes}}{{/hasConsumes}}{{/hasFormParams}}{{#hasProduces}}localVariableHeaders["Accept"] = "{{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}" @@ -129,13 +129,13 @@ import {{packageName}}.infrastructure.* val params = mutableMapOf( {{#pathParams}} - "{{baseName}}" to {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}{{/isContainer}}, + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" to {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}{{/isContainer}}, {{/pathParams}} ) return RequestConfig( method = RequestMethod.{{httpMethod}}, - path = "{{{path}}}", + path = "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}", params = params, query = localVariableQuery, headers = localVariableHeaders, diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache index a82b32cbfb7a..dec3078745b2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache @@ -104,7 +104,7 @@ import {{packageName}}.infrastructure.* {{#isDeprecated}} @Deprecated(message = "This operation is deprecated.") {{/isDeprecated}} - {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}{{#useCoroutines}}suspend {{/useCoroutines}}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}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : {{^useCoroutines}}Future<{{/useCoroutines}}{{#returnType}}{{{returnType}}}{{#nullableReturnType}}{{^isResponseOptional}}?{{/isResponseOptional}}{{/nullableReturnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{^useCoroutines}}>{{/useCoroutines}} { + {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}{{#useCoroutines}}suspend {{/useCoroutines}}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}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : {{^useCoroutines}}Future<{{/useCoroutines}}{{#returnType}}{{{returnType}}}{{#nullableReturnType}}{{^isResponseOptional}}?{{/isResponseOptional}}{{/nullableReturnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{^useCoroutines}}>{{/useCoroutines}} { return {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}).map { localVarResponse -> when (localVarResponse.responseType) { ResponseType.Success -> {{#returnType}}(localVarResponse as Success<*>).data as {{{returnType}}}{{#nullableReturnType}}{{^isResponseOptional}}?{{/isResponseOptional}}{{/nullableReturnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Unit{{/returnType}} @@ -138,10 +138,10 @@ import {{packageName}}.infrastructure.* {{/isDeprecated}} {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}fun {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : Future> { val vertxClient = WebClient.create(vertx) - val request = vertxClient.requestAbs(HttpMethod.{{httpMethod}}, UriTemplate.of("$basePath{{{path}}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", encodeURIComponent({{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}.toString(){{/isContainer}})){{/pathParams}})) + val request = vertxClient.requestAbs(HttpMethod.{{httpMethod}}, UriTemplate.of("$basePath{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}"{{#pathParams}}.replace("{"+"{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"+"}", encodeURIComponent({{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{{paramName}}}{{#isEnum}}{{^required}}?{{/required}}.value{{/isEnum}}.toString(){{/isContainer}})){{/pathParams}})) {{#hasFormParams}}request.putHeader("Content-Type", {{^consumes}}"multipart/form-data"{{/consumes}}{{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}){{/hasFormParams}} - {{#headerParams}}{{{paramName}}}{{^required}}?{{/required}}.apply { request.putHeader("{{baseName}}", {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}})}{{/headerParams}} + {{#headerParams}}{{{paramName}}}{{^required}}?{{/required}}.apply { request.putHeader("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}})}{{/headerParams}} {{^hasFormParams}}{{#hasConsumes}} {{#consumes}} request.putHeader("Content-Type", "{{{mediaType}}}") @@ -158,7 +158,7 @@ import {{packageName}}.infrastructure.* {{#hasQueryParams}} {{#queryParams}} - {{{paramName}}}{{^required}}?{{/required}}.let { request.queryParams().add("{{baseName}}", {{#isContainer}}toMultiValue(it.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>(it){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>(it){{/isDate}}{{^isDateTime}}{{^isDate}}it.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } + {{{paramName}}}{{^required}}?{{/required}}.let { request.queryParams().add("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{#isContainer}}toMultiValue(it.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString<{{{dataType}}}>(it){{/isDateTime}}{{#isDate}}parseDateToQueryString<{{{dataType}}}>(it){{/isDate}}{{^isDateTime}}{{^isDate}}it.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } {{/queryParams}} {{/hasQueryParams}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api.mustache index 246b5e73d169..6911da4884ce 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api.mustache @@ -63,10 +63,10 @@ import {{packageName}}.infrastructure.CollectionFormats.* // to make it easy to override with your own. // create path and map variables - val path = "{{{path}}}"{{#pathParams}}.replace("{" + "{{baseName}}" + "}", {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}IRequestFactory.escapeString({{{paramName}}}.toString()){{/isContainer}}){{/pathParams}} + val path = "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}"{{#pathParams}}.replace("{" + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" + "}", {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}IRequestFactory.escapeString({{{paramName}}}.toString()){{/isContainer}}){{/pathParams}} val formParams = mapOf({{^formParams}}){{/formParams}}{{#formParams}} - "{{baseName}}" to IRequestFactory.parameterToString({{paramName}}){{^-last}},{{/-last}}{{#-last}} + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" to IRequestFactory.parameterToString({{paramName}}){{^-last}},{{/-last}}{{#-last}} ){{/-last}}{{/formParams}} @@ -74,12 +74,12 @@ import {{packageName}}.infrastructure.CollectionFormats.* // TODO, if its apikey auth, then add the header names here and the hardcoded auth key // Only support hard coded apikey in query param auth for when we do this first path val queryParams = mapOf({{^queryParams}}){{/queryParams}}{{#queryParams}} - "{{baseName}}" to IRequestFactory.parameterToString({{paramName}}){{^-last}},{{/-last}}{{#-last}} + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" to IRequestFactory.parameterToString({{paramName}}){{^-last}},{{/-last}}{{#-last}} ){{/-last}}{{/queryParams}} .filter { it.value.isNotEmpty() } val headerParams: Map = mapOf({{^headerParams}}){{/headerParams}}{{#headerParams}} - "{{baseName}}" to IRequestFactory.parameterToString({{paramName}}){{^-last}},{{/-last}}{{#-last}} + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" to IRequestFactory.parameterToString({{paramName}}){{^-last}},{{/-last}}{{#-last}} ){{/-last}}{{/headerParams}} return suspendCoroutine { continuation -> diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache index f7bf73ae31d0..185744f4fd45 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache @@ -5,15 +5,15 @@ All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}}{{/summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} -{{summary}}{{#notes}} +{{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}}{{#unescapedNotes}} -{{notes}}{{/notes}} +{{#lambda.escapeMarkdown}}{{{unescapedNotes}}}{{/lambda.escapeMarkdown}}{{/unescapedNotes}} ### Example ```kotlin @@ -35,7 +35,7 @@ apiClient.setBearerToken("TOKEN") {{/authMethods}} val webService = apiClient.createWebservice({{{classname}}}::class.java) {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} {{/allParams}} {{#useCoroutines}} @@ -51,7 +51,7 @@ launch(Dispatchers.IO) { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{{defaultValue}}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/formParams.mustache index 98427cd4817c..49200a17ef2e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/headerParams.mustache index 3e5c64b2cd8e..f88388a5dfd8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/pathParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/pathParams.mustache index 4cc7de2240bd..3d7d5d145855 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/queryParams.mustache index da0a0c0930ac..2cbe779502bb 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{{paramName}}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}{{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{{dataType}}}{{/collectionFormat}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{{paramName}}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}{{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{{dataType}}}{{/collectionFormat}}{{#required}}{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache index cf5a4fe733e7..ba8348755c44 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache @@ -68,7 +68,7 @@ import kotlinx.serialization.encoding.* {{#returnType}} @Suppress("UNCHECKED_CAST") {{/returnType}} - {{^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}}): HttpResponse<{{{returnType}}}{{^returnType}}Unit{{/returnType}}> { + {{^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}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{&enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): HttpResponse<{{{returnType}}}{{^returnType}}Unit{{/returnType}}> { val localVariableAuthNames = listOf({{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}}) @@ -123,13 +123,13 @@ import kotlinx.serialization.encoding.* {{/hasBodyParam}} val localVariableQuery = mutableMapOf>(){{#queryParams}} - {{{paramName}}}?.apply { localVariableQuery["{{baseName}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{^isEnumOrRef}}"${{{paramName}}}"{{/isEnumOrRef}}{{#isEnumOrRef}}"${ {{paramName}}.value }"{{/isEnumOrRef}}){{/isContainer}} }{{/queryParams}} + {{{paramName}}}?.apply { localVariableQuery["{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{^isEnumOrRef}}"${{{paramName}}}"{{/isEnumOrRef}}{{#isEnumOrRef}}"${ {{paramName}}.value }"{{/isEnumOrRef}}){{/isContainer}} }{{/queryParams}} val localVariableHeaders = mutableMapOf(){{#headerParams}} - {{{paramName}}}?.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} }{{/headerParams}} + {{{paramName}}}?.apply { localVariableHeaders["{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} }{{/headerParams}} val localVariableConfig = RequestConfig( RequestMethod.{{httpMethod}}, - "{{{path}}}"{{#pathParams}}.replace("{" + "{{baseName}}" + "}", {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{^isEnumOrRef}}"${{{paramName}}}"{{/isEnumOrRef}}{{#isEnumOrRef}}"${ {{paramName}}.value }"{{/isEnumOrRef}}{{/isContainer}}){{/pathParams}}, + "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}"{{#pathParams}}.replace("{" + "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}" + "}", {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}{{^isEnumOrRef}}"${{{paramName}}}"{{/isEnumOrRef}}{{#isEnumOrRef}}"${ {{paramName}}.value }"{{/isEnumOrRef}}{{/isContainer}}){{/pathParams}}, query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = {{#hasAuthMethods}}true{{/hasAuthMethods}}{{^hasAuthMethods}}false{{/hasAuthMethods}}, diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/param_default_value.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/param_default_value.mustache index cb392335071d..2818c5ebcb26 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/param_default_value.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/param_default_value.mustache @@ -1 +1 @@ -{{^isNumber}}{{#isEnum}}{{#enumDefaultValue}}{{enumName}}{{operationIdCamelCase}}.{{&.}}{{/enumDefaultValue}}{{^enumDefaultValue}}null{{/enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}} \ No newline at end of file +{{^isNumber}}{{#isEnum}}{{#enumDefaultValue}}{{enumName}}{{operationIdCamelCase}}.{{&.}}{{/enumDefaultValue}}{{^enumDefaultValue}}null{{/enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{#isString}}{{^allowableValues}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/allowableValues}}{{#allowableValues}}{{{defaultValue}}}{{/allowableValues}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-misk/apiAction.mustache b/modules/openapi-generator/src/main/resources/kotlin-misk/apiAction.mustache index 9d9f929aeed6..9871eb7bae0d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-misk/apiAction.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-misk/apiAction.mustache @@ -45,7 +45,7 @@ class {{classname}}Action @Inject constructor( {{#operation}} @{{httpMethod}}("{{{actionPathPrefix}}}{{path}}") - @Description("{{{summary}}}"){{#hasConsumes}} + @Description("{{#lambda.escapeInNormalString}}{{{unescapedSummary}}}{{/lambda.escapeInNormalString}}"){{#hasConsumes}} {{{actionRequestContentType}}}({{#consumes}}{{{actionRequestContentTypePrefix}}}.{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}){{/hasConsumes}}{{#hasProduces}} @ResponseContentType({{#produces}}MediaTypes.{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}){{/hasProduces}} {{#actionAnnotations}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache index 6553762ac7cf..5f7125775eba 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache @@ -1,22 +1,22 @@ # {{classname}}{{#description}} -{{.}}{{/description}} +{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{operationId}}** -> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) -{{summary}}{{#notes}} +{{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}}{{#unescapedNotes}} -{{.}}{{/notes}} +{{#lambda.escapeMarkdown}}{{{unescapedNotes}}}{{/lambda.escapeMarkdown}}{{/unescapedNotes}} ### Example ```kotlin @@ -27,10 +27,10 @@ Method | HTTP request | Description {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} {{/allParams}} try { - {{#returnType}}val result : {{{.}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} + {{#returnType}}val result : {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} println(result){{/returnType}} } catch (e: ClientException) { println("4xx response calling {{{classname}}}#{{{operationId}}}") @@ -45,7 +45,7 @@ try { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-misk/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-misk/class_doc.mustache index b6b482afb78b..01d22ac87c05 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-misk/class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-misk/class_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} @@ -11,5 +11,5 @@ Name | Type | Description | Notes ## Enum: {{baseName}} Name | Value ---- | -----{{#allowableValues}} -{{name}} | {{#values}}{{.}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} +{{name}} | {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} {{/isEnum}}{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-misk/cookieParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-misk/cookieParams.mustache index 028264a18bcf..1f225337dc10 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-misk/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-misk/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@CookieValue(name = "{{baseName}}"{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@CookieValue(name = "{{baseName}}"{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-misk/model.mustache b/modules/openapi-generator/src/main/resources/kotlin-misk/model.mustache index 88970ebaba28..60c855812169 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-misk/model.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-misk/model.mustache @@ -23,7 +23,7 @@ data class {{classname}}( {{#description}} /** {{description}} */ {{/description}} - val {{{name}}}: {{{dataType}}}{{^required}}?{{/required}}{{#defaultValue}}{{#isNumber}} = {{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{^isNumber}} = {{{defaultValue}}}{{/isNumber}}{{/defaultValue}}{{^defaultValue}}{{^required}} = null{{/required}}{{/defaultValue}}{{^-last}},{{/-last}} + val {{{name}}}: {{{dataType}}}{{^required}}?{{/required}}{{#defaultValue}}{{#isString}}{{^isEnum}} = "{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}} = {{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{#isNumber}} = {{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{^isNumber}} = {{{defaultValue}}}{{/isNumber}}{{/isString}}{{/defaultValue}}{{^defaultValue}}{{^required}} = null{{/required}}{{/defaultValue}}{{^-last}},{{/-last}} {{/vars}} ) {{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache index 6553762ac7cf..5f7125775eba 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache @@ -1,22 +1,22 @@ # {{classname}}{{#description}} -{{.}}{{/description}} +{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{operationId}}** -> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) -{{summary}}{{#notes}} +{{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}}{{#unescapedNotes}} -{{.}}{{/notes}} +{{#lambda.escapeMarkdown}}{{{unescapedNotes}}}{{/lambda.escapeMarkdown}}{{/unescapedNotes}} ### Example ```kotlin @@ -27,10 +27,10 @@ Method | HTTP request | Description {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} {{/allParams}} try { - {{#returnType}}val result : {{{.}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} + {{#returnType}}val result : {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} println(result){{/returnType}} } catch (e: ClientException) { println("4xx response calling {{{classname}}}#{{{operationId}}}") @@ -45,7 +45,7 @@ try { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache index b6b482afb78b..01d22ac87c05 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} @@ -11,5 +11,5 @@ Name | Type | Description | Notes ## Enum: {{baseName}} Name | Value ---- | -----{{#allowableValues}} -{{name}} | {{#values}}{{.}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} +{{name}} | {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} {{/isEnum}}{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache index a5885bca9b72..de2dd38d6779 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache index 4adcedf78cba..c35b69a40798 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache @@ -2,4 +2,4 @@ /* {{{.}}} */ {{/description}} {{! Note that required properties may be nullable according to the OpenAPI specification. }} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_opt_var.mustache index 684077c31410..8b2cf1411e5a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_opt_var.mustache @@ -3,4 +3,4 @@ {{/description}} {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}} @field:com.fasterxml.jackson.annotation.JsonProperty("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}") - {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_req_var.mustache index f8c518ff8c05..b595d5f22725 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/data_class_req_var.mustache @@ -3,4 +3,4 @@ {{/description}} {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}} @field:com.fasterxml.jackson.annotation.JsonProperty("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}") - {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}} \ No newline at end of file + {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache index dd5fc214c553..f67330a98ef6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache @@ -1,2 +1,2 @@ -{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{{defaultValue}}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} +{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} {{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_opt_var.mustache index 684077c31410..8b2cf1411e5a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_opt_var.mustache @@ -3,4 +3,4 @@ {{/description}} {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}} @field:com.fasterxml.jackson.annotation.JsonProperty("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}") - {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_req_var.mustache index f8c518ff8c05..b595d5f22725 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/data_class_req_var.mustache @@ -3,4 +3,4 @@ {{/description}} {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}} @field:com.fasterxml.jackson.annotation.JsonProperty("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}") - {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}} \ No newline at end of file + {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache index dd5fc214c553..f67330a98ef6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache @@ -1,2 +1,2 @@ -{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{{defaultValue}}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} +{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} {{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache index 929a3218703d..e651554834ed 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}@CookieParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{{.}}}{{/lambda.doublequote}}){{/defaultValue}}{{/isContainer}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}@CookieParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/lambda.doublequote}}){{/defaultValue}}{{/isContainer}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache index f277f71da441..059feb846954 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache @@ -3,4 +3,4 @@ {{/description}} @JsonProperty("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}") -{{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file +{{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache index cc1ce2f3ea90..335afdafb0b6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{{.}}}{{/lambda.doublequote}}){{/defaultValue}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/lambda.doublequote}}){{/defaultValue}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache index a0155cf4b59d..07ef848c8fc0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{{.}}}{{/lambda.doublequote}}){{/defaultValue}}{{/isContainer}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/lambda.doublequote}}){{/defaultValue}}{{/isContainer}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_opt_var.mustache index a5885bca9b72..de2dd38d6779 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_req_var.mustache index 4adcedf78cba..c35b69a40798 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/data_class_req_var.mustache @@ -2,4 +2,4 @@ /* {{{.}}} */ {{/description}} {{! Note that required properties may be nullable according to the OpenAPI specification. }} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{{classname}}}.{{{nameInPascalCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache index 033d044fb28e..822bfab3f4bc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -72,22 +72,22 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v }}{{/useResponseEntity}}{{! }}{{#swagger2AnnotationLibrary}}{{! }} @Operation( - summary = "{{{summary}}}", + summary = "{{#lambda.escapeInNormalString}}{{{unescapedSummary}}}{{/lambda.escapeInNormalString}}", operationId = "{{{operationId}}}", - description = """{{{unescapedNotes}}}""", + description = """{{#lambda.escapeDollarInMultiline}}{{{unescapedNotes}}}{{/lambda.escapeDollarInMultiline}}""", responses = [{{#responses}} - ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = [Content({{#isArray}}array = ArraySchema({{/isArray}}schema = Schema(implementation = {{{baseType}}}::class)){{#isArray}}){{/isArray}}]{{/baseType}}){{^-last}},{{/-last}}{{/responses}} ]{{#hasAuthMethods}}, + ApiResponse(responseCode = "{{{code}}}", description = "{{#lambda.escapeInNormalString}}{{{unescapedMessage}}}{{/lambda.escapeInNormalString}}"{{#baseType}}, content = [Content({{#isArray}}array = ArraySchema({{/isArray}}schema = Schema(implementation = {{{baseType}}}::class)){{#isArray}}){{/isArray}}]{{/baseType}}){{^-last}},{{/-last}}{{/responses}} ]{{#hasAuthMethods}}, security = [ {{#authMethods}}SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes = [ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} ]{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} ]{{/hasAuthMethods}} ){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} @ApiOperation( - value = "{{{summary}}}", + value = "{{#lambda.escapeInNormalString}}{{{unescapedSummary}}}{{/lambda.escapeInNormalString}}", nickname = "{{{operationId}}}", - notes = "{{{notes}}}"{{#returnBaseType}}, + notes = "{{#lambda.escapeInNormalString}}{{{unescapedNotes}}}{{/lambda.escapeInNormalString}}"{{#returnBaseType}}, response = {{{.}}}::class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}}]{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}}]{{/hasAuthMethods}}) @ApiResponses( - value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}]){{/swagger1AnnotationLibrary}} + value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{#lambda.escapeInNormalString}}{{{unescapedMessage}}}{{/lambda.escapeInNormalString}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}]){{/swagger1AnnotationLibrary}} {{#implicitHeadersParams.0}} {{>implicitHeaders}} {{/implicitHeadersParams.0}} @@ -99,7 +99,7 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v {{/isDeprecated}} @RequestMapping( method = [RequestMethod.{{httpMethod}}], - // "{{#lambdaEscapeInNormalString}}{{{path}}}{{/lambdaEscapeInNormalString}}" + // "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}" value = [PATH_{{#lambda.uppercase}}{{#lambda.snakecase}}{{{operationId}}}{{/lambda.snakecase}}{{/lambda.uppercase}}]{{#singleContentTypes}}{{#hasProduces}}, produces = [{{#vendorExtensions.x-accepts}}"{{{.}}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-accepts}}]{{/hasProduces}}{{#hasConsumes}}, consumes = "{{{vendorExtensions.x-content-type}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, @@ -122,7 +122,7 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v const val BASE_PATH: String = "{{=<% %>=}}<%contextPath%><%={{ }}=%>" {{/useRequestMappingOnController}} {{#operation}} - const val PATH_{{#lambda.uppercase}}{{#lambda.snakecase}}{{{operationId}}}{{/lambda.snakecase}}{{/lambda.uppercase}}: String = "{{{path}}}" + const val PATH_{{#lambda.uppercase}}{{#lambda.snakecase}}{{{operationId}}}{{/lambda.snakecase}}{{/lambda.uppercase}}: String = "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}" {{/operation}} } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache index 795070dde368..d1ac16e26efc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache @@ -84,24 +84,24 @@ interface {{classname}} { }}{{#swagger2AnnotationLibrary}}{{! }} @Operation( tags = [{{#tags}}"{{{name}}}",{{/tags}}], - summary = "{{{summary}}}", + summary = "{{#lambda.escapeInNormalString}}{{{unescapedSummary}}}{{/lambda.escapeInNormalString}}", operationId = "{{{operationId}}}", - description = """{{{unescapedNotes}}}""", + description = """{{#lambda.escapeDollarInMultiline}}{{{unescapedNotes}}}{{/lambda.escapeDollarInMultiline}}""", responses = [{{#responses}} - ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = [Content({{#isArray}}array = ArraySchema({{/isArray}}schema = Schema(implementation = {{{baseType}}}::class)){{#isArray}}){{/isArray}}]{{/baseType}}){{^-last}},{{/-last}}{{/responses}} + ApiResponse(responseCode = "{{{code}}}", description = "{{#lambda.escapeInNormalString}}{{{unescapedMessage}}}{{/lambda.escapeInNormalString}}"{{#baseType}}, content = [Content({{#isArray}}array = ArraySchema({{/isArray}}schema = Schema(implementation = {{{baseType}}}::class)){{#isArray}}){{/isArray}}]{{/baseType}}){{^-last}},{{/-last}}{{/responses}} ]{{#hasAuthMethods}}, security = [ {{#authMethods}}SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes = [ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} ]{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} ]{{/hasAuthMethods}} ){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} @ApiOperation( - value = "{{{summary}}}", + value = "{{#lambda.escapeInNormalString}}{{{unescapedSummary}}}{{/lambda.escapeInNormalString}}", nickname = "{{{operationId}}}", - notes = "{{{notes}}}"{{#returnBaseType}}, + notes = "{{#lambda.escapeInNormalString}}{{{unescapedNotes}}}{{/lambda.escapeInNormalString}}"{{#returnBaseType}}, response = {{{.}}}::class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}}]{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}}]{{/hasAuthMethods}} ) @ApiResponses( - value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}}, {{/-last}}{{/responses}}] + value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{#lambda.escapeInNormalString}}{{{unescapedMessage}}}{{/lambda.escapeInNormalString}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}}, {{/-last}}{{/responses}}] ){{/swagger1AnnotationLibrary}} {{#implicitHeadersParams.0}} {{>implicitHeaders}} @@ -114,7 +114,7 @@ interface {{classname}} { {{/isDeprecated}} @RequestMapping( method = [RequestMethod.{{httpMethod}}], - // "{{#lambdaEscapeInNormalString}}{{{path}}}{{/lambdaEscapeInNormalString}}" + // "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}" value = [PATH_{{#lambda.uppercase}}{{#lambda.snakecase}}{{{operationId}}}{{/lambda.snakecase}}{{/lambda.uppercase}}]{{#singleContentTypes}}{{#hasProduces}}, produces = [{{#vendorExtensions.x-accepts}}"{{{.}}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-accepts}}]{{/hasProduces}}{{#hasConsumes}}, consumes = "{{{vendorExtensions.x-content-type}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, @@ -142,7 +142,7 @@ interface {{classname}} { const val BASE_PATH: String = "{{=<% %>=}}<%contextPath%><%={{ }}=%>" {{/useRequestMappingOnInterface}} {{#operation}} - const val PATH_{{#lambda.uppercase}}{{#lambda.snakecase}}{{{operationId}}}{{/lambda.snakecase}}{{/lambda.uppercase}}: String = "{{{path}}}" + const val PATH_{{#lambda.uppercase}}{{#lambda.snakecase}}{{{operationId}}}{{/lambda.snakecase}}{{/lambda.uppercase}}: String = "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}" {{/operation}} } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache index b4f03475cd0b..528774332746 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"], defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"]){{/defaultValue}}{{/allowableValues}}{{/isContainer}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}, allowableValues = "{{{.}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{>beanValidationBodyParams}}{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{{paramName}}}: {{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}{{>optionalDataType}}{{/isArray}}{{#isArray}}Flow<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"], defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}, schema = Schema(defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"]){{/defaultValue}}{{/allowableValues}}{{/isContainer}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}, allowableValues = "{{{.}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{>beanValidationBodyParams}}{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{{paramName}}}: {{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}{{>optionalDataType}}{{/isArray}}{{#isArray}}Flow<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/cookieParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/cookieParams.mustache index 028264a18bcf..1f225337dc10 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@CookieValue(name = "{{baseName}}"{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@CookieValue(name = "{{baseName}}"{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache index ab575d4bf9d3..a1a4603ff396 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -1,6 +1,6 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}} - @Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#deprecated}} + @Schema({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#deprecated}} @Deprecated(message = ""){{/deprecated}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} - @get:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInPascalCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}} \ No newline at end of file + @get:JsonProperty("{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInPascalCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache index 92e2875ac08a..5bf74b4827d4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,5 +1,5 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}} - @Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @Schema({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} - @get:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInPascalCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}} \ No newline at end of file + @get:JsonProperty("{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInPascalCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache index 456af893718f..41b695aff458 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{#isModel}}@RequestPart{{/isModel}}{{^isModel}}@RequestParam{{/isModel}}(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}}{{/isFile}}{{#isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}") {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "file detail") {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{#isModel}}@RequestPart{{/isModel}}{{^isModel}}@RequestParam{{/isModel}}(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}}{{/isFile}}{{#isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}") {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "file detail") {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache index 0c2678f1bf67..8287a7c95dfc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}", `in` = ParameterIn.HEADER{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}@RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}{{#defaultValue}}, defaultValue = {{^isString}}"{{{.}}}"{{/isString}}{{#isString}}{{#isEnum}}"{{{.}}}"{{/isEnum}}{{^isEnum}}{{{.}}}{{/isEnum}}{{/isString}}{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}", `in` = ParameterIn.HEADER{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}@RequestHeader(value = "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}{{#defaultValue}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/implicitHeaders.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/implicitHeaders.mustache index c7b37059e2d9..6ac7bc679eba 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/implicitHeaders.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/implicitHeaders.mustache @@ -1,14 +1,14 @@ {{#swagger2AnnotationLibrary}} @Parameters(value = [ {{#implicitHeadersParams}} - Parameter(name = "{{{baseName}}}"{{#isDeprecated}}, deprecated = true{{/isDeprecated}}, description = "{{{description}}}"{{#required}}, required = true{{/required}}, `in` = ParameterIn.HEADER){{^-last}},{{/-last}} + Parameter(name = "{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}"{{#isDeprecated}}, deprecated = true{{/isDeprecated}}, description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}, `in` = ParameterIn.HEADER){{^-last}},{{/-last}} {{/implicitHeadersParams}} ]) {{/swagger2AnnotationLibrary}} {{#swagger1AnnotationLibrary}} @ApiImplicitParams(value = [ {{#implicitHeadersParams}} - ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + ApiImplicitParam(name = "{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}", value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} {{/implicitHeadersParams}} ]) {{/swagger1AnnotationLibrary}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache index 3fa63ad64876..456b66a8cad9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache @@ -1,5 +1,5 @@ {{#swagger2AnnotationLibrary}} - @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} - {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? {{^discriminator}}= {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/discriminator}} + {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? {{^discriminator}}= {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}}{{/discriminator}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache index 8f0fb71ba319..ac8227a4bbf8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache @@ -1,5 +1,5 @@ {{#swagger2AnnotationLibrary}} - @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache index 53ce2730aa8b..de44538b18d7 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache @@ -63,7 +63,7 @@ interface {{classname}} { }}{{^useResponseEntity}} @ResponseStatus({{#springHttpStatus}}{{#responses.0}}{{{code}}}{{/responses.0}}{{/springHttpStatus}}) {{/useResponseEntity}}{{! }}{{#httpMethod}} @HttpExchange( - // "{{#lambdaEscapeInNormalString}}{{{path}}}{{/lambdaEscapeInNormalString}}" + // "{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}" url = PATH_{{#lambda.uppercase}}{{#lambda.snakecase}}{{{operationId}}}{{/lambda.snakecase}}{{/lambda.uppercase}}, method = "{{httpMethod}}" ) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/httpInterfaceBodyParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/httpInterfaceBodyParams.mustache index e884046f7d6d..cd6e83f9680c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/httpInterfaceBodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/httpInterfaceBodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"], defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"]){{/defaultValue}}{{/allowableValues}}{{/isContainer}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}, allowableValues = "{{{.}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{>beanValidationBodyParams}}{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{{paramName}}}: {{>optionalDataType}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"], defaultValue = "{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}, schema = Schema(defaultValue = "{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = ["{{{allowableValues}}}"]){{/defaultValue}}{{/allowableValues}}{{/isContainer}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}, allowableValues = "{{{.}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue = "{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{>beanValidationBodyParams}}{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{{paramName}}}: {{>optionalDataType}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache index 0a6660b342a8..1a6c6d76d00f 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache @@ -5,7 +5,7 @@ getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { {{/-first}} if (mediaType.isCompatibleWith(MediaType.valueOf("{{{contentType}}}"))) { - ApiUtil.setExampleResponse(request, "{{{contentType}}}", "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{example}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}") + ApiUtil.setExampleResponse(request, "{{{contentType}}}", "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{example}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}") break } {{#-last}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache index 2e28d18c78fa..f3189ef2c381 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}@PathVariable("{{baseName}}") {{{paramName}}}: {{>optionalDataType}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{/swagger1AnnotationLibrary}}@PathVariable("{{baseName}}") {{{paramName}}}: {{>optionalDataType}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache index 27d7e286bb33..ca0a9c62d12a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{{paramName}}}: {{>optionalDataType}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"){{/isContainer}}{{/defaultValue}}{{/allowableValues}}) {{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/defaultValue}}{{/isContainer}}) {{/swagger1AnnotationLibrary}}{{#useBeanValidation}}@Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = "{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{#isString}}{{^isEnum}}{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{{paramName}}}: {{>optionalDataType}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache index 31dee489e67c..425dd3db6ce6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache @@ -1,28 +1,28 @@ # {{classname}}{{#description}} -{{.}}{{/description}} +{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{operationId}}** -> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) -{{summary}}{{#notes}} +{{#lambda.escapeMarkdown}}{{{unescapedSummary}}}{{/lambda.escapeMarkdown}}{{#unescapedNotes}} -{{.}}{{/notes}} +{{#lambda.escapeMarkdown}}{{{unescapedNotes}}}{{/lambda.escapeMarkdown}}{{/unescapedNotes}} ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache index b6b482afb78b..01d22ac87c05 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} @@ -11,5 +11,5 @@ Name | Type | Description | Notes ## Enum: {{baseName}} Name | Value ---- | -----{{#allowableValues}} -{{name}} | {{#values}}{{.}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} +{{name}} | {{#values}}{{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}} {{/isEnum}}{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-wiremock/api-stub.mustache b/modules/openapi-generator/src/main/resources/kotlin-wiremock/api-stub.mustache index d3b79befcf3a..3ca7701c1702 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-wiremock/api-stub.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-wiremock/api-stub.mustache @@ -33,12 +33,12 @@ open class {{classname}}Stubs(private val objectMapper: ObjectMapper) { * @return A [{{operationIdCamelCase}}StubBuilder] to configure the response, and the final [MappingBuilder]. */ fun {{operationId}}({{#pathParams}}{{paramName}}: StringValuePattern, {{/pathParams}}{{#queryParams}}{{paramName}}: StringValuePattern? = null, {{/queryParams}}configurer: MappingBuilder.() -> MappingBuilder = { this }): {{operationIdCamelCase}}StubBuilder = - {{operationIdCamelCase}}StubBuilder(objectMapper, {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}(urlPathTemplate("{{{path}}}")) + {{operationIdCamelCase}}StubBuilder(objectMapper, {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}(urlPathTemplate("{{#lambda.escapeInNormalString}}{{{path}}}{{/lambda.escapeInNormalString}}")) {{#pathParams}} - .withPathParam("{{baseName}}", {{paramName}}) + .withPathParam("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", {{paramName}}) {{/pathParams}} {{#queryParams}} - .apply { {{paramName}}?.let { withQueryParam("{{baseName}}", it) } } + .apply { {{paramName}}?.let { withQueryParam("{{#lambda.escapeInNormalString}}{{baseName}}{{/lambda.escapeInNormalString}}", it) } } {{/queryParams}} .configurer() ) diff --git a/modules/openapi-generator/src/main/resources/kotlin-wiremock/model.mustache b/modules/openapi-generator/src/main/resources/kotlin-wiremock/model.mustache index c060ec50935c..79dc87577c0c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-wiremock/model.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-wiremock/model.mustache @@ -21,10 +21,10 @@ enum class {{classname}} { {{^isEnum}} data class {{classname}}( {{#allVars}} - @field:JsonProperty("{{{vendorExtensions.x-base-name-literal}}}") + @field:JsonProperty("{{#lambda.escapeInNormalString}}{{{vendorExtensions.x-base-name-literal}}}{{/lambda.escapeInNormalString}}") val {{{name}}}: {{{dataType}}}{{^required}}?{{/required}}{{! - !}}{{^required}} = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{{.}}}{{/defaultValue}}{{/required}}{{! - }}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}, + !}}{{^required}} = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}}{{/required}}{{! + }}{{#required}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}}{{/required}}, {{/allVars}} ) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java index 23f98e3c443e..4d1607a6ce65 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java @@ -923,6 +923,35 @@ public void testCompanionObjectGeneratesCompanionInModel() throws IOException { TestUtils.assertFileContains(petModel, "companion object { }"); } + /** + * Issue 20502: $ in property baseName must be escaped to \$ in @get:JsonProperty strings + * when using jackson serialization library (uses escapeInNormalString lambda). + */ + @Test + public void issue20502_dollarInBaseNameEscapedInJsonProperty() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + KotlinClientCodegen codegen = new KotlinClientCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, "jackson"); + codegen.processOpts(); + + new DefaultGenerator() + .opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml")) + .config(codegen)) + .generate(); + + Path modelFile = Paths.get(output + "/src/main/kotlin/org/openapitools/client/models/ItemWithAllEscapingEdgeCases.kt"); + // baseName "$id" must be escaped to "\$id" inside @get:JsonProperty + TestUtils.assertFileContains(modelFile, "@get:JsonProperty(\"\\$id\")"); + // baseName "name$Value" must be escaped to "name\$Value" + TestUtils.assertFileContains(modelFile, "@get:JsonProperty(\"name\\$Value\")"); + // plain baseName without $ must appear verbatim (verifies lambda resolves {{{baseName}}} at all) + TestUtils.assertFileContains(modelFile, "@get:JsonProperty(\"commentCloseValue\")"); + } + private static class ModelNameTest { private final String expectedName; private final String expectedClassName; diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md index e0bf879c9a65..a1f188d3089c 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md index bfbf6c75d797..f79118bd104f 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md index d492f8228f40..12f8d8dc7f6b 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md @@ -51,13 +51,13 @@ try { ### Parameters | **pathDefault** | **kotlin.String**| path default | | | **pathNullable** | **kotlin.String**| path_nullable | | -| **queryDefault** | **kotlin.String**| query default | [optional] [default to "available"] | +| **queryDefault** | **kotlin.String**| query default | [optional] [default to "available"] | | **queryDefaultEnum** | **kotlin.String**| query default enum | [optional] [default to QueryDefaultEnum.B] [enum: A, B, C] | | **queryDefaultInt** | **java.math.BigDecimal**| query default int | [optional] [default to 3] | -| **headerDefault** | **kotlin.String**| header default | [optional] [default to "available"] | +| **headerDefault** | **kotlin.String**| header default | [optional] [default to "available"] | | **headerDefaultEnum** | **kotlin.String**| header default enum | [optional] [default to HeaderDefaultEnum.B] [enum: A, B, C] | | **headerDefaultInt** | **java.math.BigDecimal**| header default int | [optional] [default to 3] | -| **cookieDefault** | **kotlin.String**| cookie default | [optional] [default to "available"] | +| **cookieDefault** | **kotlin.String**| cookie default | [optional] [default to "available"] | | **cookieDefaultEnum** | **kotlin.String**| cookie default enum | [optional] [default to CookieDefaultEnum.B] [enum: A, B, C] | | **cookieDefaultInt** | **java.math.BigDecimal**| cookie default int | [optional] [default to 3] | | **queryNullable** | **kotlin.String**| query nullable | [optional] | diff --git a/samples/client/petstore/kotlin-explicit/docs/PetApi.md b/samples/client/petstore/kotlin-explicit/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin-explicit/docs/PetApi.md +++ b/samples/client/petstore/kotlin-explicit/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-explicit/docs/StoreApi.md b/samples/client/petstore/kotlin-explicit/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-explicit/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-explicit/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-gson/docs/PetApi.md b/samples/client/petstore/kotlin-gson/docs/PetApi.md index e0bf879c9a65..a1f188d3089c 100644 --- a/samples/client/petstore/kotlin-gson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-gson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-gson/docs/StoreApi.md index bfbf6c75d797..f79118bd104f 100644 --- a/samples/client/petstore/kotlin-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-gson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jackson/docs/PetApi.md b/samples/client/petstore/kotlin-jackson/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin-jackson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jackson/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jackson/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jackson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md b/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md index 318ca7c9e1e9..781775c662f9 100644 --- a/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md +++ b/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags @@ -156,7 +156,7 @@ Configure petstore_auth: # **getAllPets** -> kotlin.collections.List<Pet> getAllPets(lastUpdated) +> kotlin.collections.List getAllPets(lastUpdated) Get all pets diff --git a/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md index 34b0e0700a72..71e0b7117b68 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md index 0a13a8fa8ce3..314fb5090dc5 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md index 0b928e328e60..d8aaacbe1371 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md index 27694e9e7100..5400409a0346 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md index 0a13a8fa8ce3..314fb5090dc5 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md index bbc53bb2f774..8f4a1b5b90be 100644 --- a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -88,7 +88,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md index 9eb15f0e7013..27419368c3b5 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md index 9eb15f0e7013..27419368c3b5 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md index 9eb15f0e7013..27419368c3b5 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md index 9eb15f0e7013..27419368c3b5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md index 9eb15f0e7013..27419368c3b5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md index 9eb15f0e7013..27419368c3b5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md index 9eb15f0e7013..27419368c3b5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md index aac02408ec79..f8f97777190f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md b/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md b/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md b/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md index 53388dff3032..69590e73bc29 100644 --- a/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -88,7 +88,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md b/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md index e385754514fb..6f97f5aed6a4 100644 --- a/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md +++ b/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.MutableList<Pet> findPetsByStatus(status) +> kotlin.collections.MutableList findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.MutableList<Pet> findPetsByTags(tags) +> kotlin.collections.MutableList findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md index 9d9f4c673e6f..b9e6b9bc6da1 100644 --- a/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.MutableMap<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.MutableMap getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md b/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md +++ b/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md b/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md index 0b928e328e60..d8aaacbe1371 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md index 27694e9e7100..5400409a0346 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md b/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md index 0b928e328e60..d8aaacbe1371 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md b/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md index 27694e9e7100..5400409a0346 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md b/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-nullable/docs/PetApi.md b/samples/client/petstore/kotlin-nullable/docs/PetApi.md index c34fce5f4a46..dc1247427244 100644 --- a/samples/client/petstore/kotlin-nullable/docs/PetApi.md +++ b/samples/client/petstore/kotlin-nullable/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet>? findPetsByStatus(status) +> kotlin.collections.List? findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet>? findPetsByTags(tags) +> kotlin.collections.List? findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-nullable/docs/StoreApi.md b/samples/client/petstore/kotlin-nullable/docs/StoreApi.md index 7a65eab968d3..1cdad2f83df2 100644 --- a/samples/client/petstore/kotlin-nullable/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-nullable/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int>? getInventory() +> kotlin.collections.Map? getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md index 34b0e0700a72..71e0b7117b68 100644 --- a/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md index 18640563db31..382fcbb77dc7 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md index 18640563db31..382fcbb77dc7 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md index 18640563db31..382fcbb77dc7 100644 --- a/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-string/docs/PetApi.md b/samples/client/petstore/kotlin-string/docs/PetApi.md index ea42a0d82f60..981f96fe8d26 100644 --- a/samples/client/petstore/kotlin-string/docs/PetApi.md +++ b/samples/client/petstore/kotlin-string/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-string/docs/StoreApi.md b/samples/client/petstore/kotlin-string/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-string/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-string/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md b/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md b/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin/docs/PetApi.md b/samples/client/petstore/kotlin/docs/PetApi.md index 6856ea516dab..8d6650f9771a 100644 --- a/samples/client/petstore/kotlin/docs/PetApi.md +++ b/samples/client/petstore/kotlin/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin/docs/StoreApi.md b/samples/client/petstore/kotlin/docs/StoreApi.md index 53ff17b16676..3652df8bfbd5 100644 --- a/samples/client/petstore/kotlin/docs/StoreApi.md +++ b/samples/client/petstore/kotlin/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/server/petstore/kotlin-misk-config/docs/PetApi.md b/samples/server/petstore/kotlin-misk-config/docs/PetApi.md index 99dbe788edb0..4e265b963725 100644 --- a/samples/server/petstore/kotlin-misk-config/docs/PetApi.md +++ b/samples/server/petstore/kotlin-misk-config/docs/PetApi.md @@ -111,7 +111,7 @@ null (empty response body) # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -158,7 +158,7 @@ Name | Type | Description | Notes # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md b/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md index d3add9f5776a..12a94b8658aa 100644 --- a/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md +++ b/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -58,7 +58,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/server/petstore/kotlin-misk/docs/PetApi.md b/samples/server/petstore/kotlin-misk/docs/PetApi.md index 99dbe788edb0..4e265b963725 100644 --- a/samples/server/petstore/kotlin-misk/docs/PetApi.md +++ b/samples/server/petstore/kotlin-misk/docs/PetApi.md @@ -111,7 +111,7 @@ null (empty response body) # **findPetsByStatus** -> kotlin.collections.List<Pet> findPetsByStatus(status) +> kotlin.collections.List findPetsByStatus(status) Finds Pets by status @@ -158,7 +158,7 @@ Name | Type | Description | Notes # **findPetsByTags** -> kotlin.collections.List<Pet> findPetsByTags(tags) +> kotlin.collections.List findPetsByTags(tags) Finds Pets by tags diff --git a/samples/server/petstore/kotlin-misk/docs/StoreApi.md b/samples/server/petstore/kotlin-misk/docs/StoreApi.md index d3add9f5776a..12a94b8658aa 100644 --- a/samples/server/petstore/kotlin-misk/docs/StoreApi.md +++ b/samples/server/petstore/kotlin-misk/docs/StoreApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -58,7 +58,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() +> kotlin.collections.Map getInventory() Returns pet inventories by status @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt index 2068bb223f68..7d5bc6297631 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt @@ -26,11 +26,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n") break } } @@ -57,11 +57,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]") + ApiUtil.setExampleResponse(request, "application/json", "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n") break } } @@ -78,11 +78,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]") + ApiUtil.setExampleResponse(request, "application/json", "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n") break } } @@ -99,11 +99,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n") break } } @@ -120,11 +120,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 doggie aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n") break } } @@ -154,7 +154,7 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}") break } } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt index c8b6c62ca4d2..c854870be6ae 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt @@ -43,11 +43,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n") break } } @@ -64,11 +64,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n") break } } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt index 410f3c12ea2c..dd662ceac7fd 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt @@ -61,11 +61,11 @@ interface UserApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n") break } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt index c45d28c4ccb7..2ff9e842b9b1 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiDelegate.kt @@ -43,11 +43,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]") + ApiUtil.setExampleResponse(request, "application/json", "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n") break } } @@ -64,11 +64,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]") + ApiUtil.setExampleResponse(request, "application/json", "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n") break } } @@ -85,11 +85,11 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n") break } } @@ -128,7 +128,7 @@ interface PetApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}") break } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt index 6a99bc0d1089..0308b98793b2 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt @@ -41,11 +41,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n") break } } @@ -62,11 +62,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n") break } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt index 11b66862f3b6..3eb216032617 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiDelegate.kt @@ -59,11 +59,11 @@ interface UserApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}") + ApiUtil.setExampleResponse(request, "application/json", "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123") + ApiUtil.setExampleResponse(request, "application/xml", "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n") break } } From 0a83b1cbff16ecabf9ffd8904a259d356935d081 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 15:24:11 +0200 Subject: [PATCH 2/8] fix tests --- .../spring/KotlinSpringServerCodegenTest.java | 83 +++++++ .../issue20502-kotlin-string-escaping.yaml | 225 ++++++++++++++++++ 2 files changed, 308 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java index a23966701868..23e5ac148491 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java @@ -5946,4 +5946,87 @@ public void testOneOfRefEnumDiscriminatorResolvesType() throws IOException { "override val vehicleType: VehicleType = VehicleType.TRUCK" ); } + + + // ── Issue 20502: string-escaping fixes ───────────────────────────────────────────────────────── + + /** + * Issue 1: path parameters containing {@code $} (e.g. {@code {item$Id}}) were emitted as-is into + * Kotlin {@code const val} string literals, triggering Kotlin string interpolation and causing a + * compile error. The path must be rendered with {@code $} escaped to {@code \$}. + */ + @Test(description = "Issue 20502 #1: $ in path param names must be escaped to \\$ in PATH const val") + public void issue20502_dollarEscapedInPathConstVal() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + + new DefaultGenerator() + .opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml")) + .config(codegen)) + .generate(); + + Path apiFile = Paths.get(output + "/src/main/kotlin/org/openapitools/api/ItemsApiController.kt"); + // The path "/items/{item$Id}/sub/{item$SubId}" must have $ escaped as \$ in the const val + assertFileContains(apiFile, "\"/items/{item\\$Id}/sub/{item\\$SubId}\""); + } + + /** + * Issue 2: {@code $}, {@code "}, and {@code \} in operation summaries, descriptions, response + * messages, and parameter descriptions were not properly escaped when placed inside Kotlin + * annotation double-quoted strings, producing invalid Kotlin code. + */ + @Test(description = "Issue 20502 #2: $, \", \\ in annotation strings must be properly escaped") + public void issue20502_specialCharsEscapedInAnnotationStrings() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + + new DefaultGenerator() + .opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml")) + .config(codegen)) + .generate(); + + Path apiFile = Paths.get(output + "/src/main/kotlin/org/openapitools/api/ItemsApiController.kt"); + // Summary/message annotation strings must have $ escaped to \$ + assertFileContains(apiFile, "\\$some"); + // Notes/description uses triple-quoted strings: $ becomes ${'$'} + assertFileContains(apiFile, "${'$'}some"); + } + + /** + * Issue 3: {@code toDefaultValue()} previously called {@code escapeText()} which internally + * calls {@code escapeUnsafeCharacters()}, corrupting star-slash to star-underscore-slash inside + * Kotlin string literals. Default values must be emitted verbatim (modulo string-literal + * escaping). + */ + @Test(description = "Issue 20502 #3: */ in string defaults must not be corrupted to *_/") + public void issue20502_starSlashNotCorruptedInModelDefaults() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + + new DefaultGenerator() + .opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml")) + .config(codegen)) + .generate(); + + Path modelFile = Paths.get(output + "/src/main/kotlin/org/openapitools/model/ItemWithAllEscapingEdgeCases.kt"); + // The default "starts /* comment and ends */" must not be mangled to *_/ + assertFileContains(modelFile, "\"starts /* comment and ends */\""); + // $ in string defaults must be escaped to \$ (not left raw, which would cause interpolation) + assertFileContains(modelFile, "\"\\$one"); + // baseName with $ must be escaped in @get:JsonProperty (verifies lambda resolves baseName correctly) + assertFileContains(modelFile, "@get:JsonProperty(\"\\$id\")"); + assertFileContains(modelFile, "@get:JsonProperty(\"name\\$Value\")"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml new file mode 100644 index 000000000000..6050d433a8f2 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml @@ -0,0 +1,225 @@ +openapi: 3.0.0 +info: + title: "Kotlin string-escaping worst-case: SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + description: | + Multi-line description with every problematic sequence: + double-quote: " + single-backslash: \ + double-backslash: \\ + dollar: $interpolated + comment-close: */ + comment-open: /* + triple-quote: """ + all combined: SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ=""" + version: "1.0.0" + +servers: + - url: 'http://localhost/v1' + +# External path-level docs to show externalDocs on an operation +externalDocs: + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some" + url: 'http://example.com/docs' + +paths: + + # ── Issue 1: $ in path parameter names ──────────────────────────────────── + /items/{item$Id}/sub/{item$SubId}: + get: + operationId: getItemWithDollarPathParams + summary: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + externalDocs: + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some" + url: 'http://example.com/ops/getItem' + parameters: + # $ in path param name — double-quote YAML form + - name: "item$Id" + in: path + required: true + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + schema: + type: string + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + + # $ in path param name — single-quote YAML form + - name: "item$SubId" + in: path + required: true + description: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + schema: + type: string + example: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + + # $ in query param name, with default + - name: "filter$Type" + in: query + required: false + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + schema: + type: string + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + default: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + + # deprecated query param + - name: "filter$SubType" + in: query + required: false + deprecated: true + description: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + schema: + type: string + example: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + default: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + + # $ in header param name + - name: "X-Custom$Header" + in: header + required: false + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + schema: + type: string + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + + # $ in cookie param name + - name: "session$Token" + in: cookie + required: false + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + schema: + type: string + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + + responses: + '200': + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + content: + application/json: + schema: + $ref: '#/components/schemas/ItemWithAllEscapingEdgeCases' + + # ── Issue 2: $ / " / \ in form body ─────────────────────────────────────── + /items: + post: + operationId: createItemWithDollarFormParams + summary: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + description: | + Multi-line description: + double-quote: " + single-backslash: \ + double-backslash: \\ + dollar-interpolation: $some + comment-closer: */ + comment-opener: /* + triple-quote: """ + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + form$Name: + type: string + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + form$Value: + type: string + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + default: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + responses: + '201': + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + content: + application/json: + schema: + $ref: '#/components/schemas/ItemWithAllEscapingEdgeCases' + +components: + schemas: + + # ── Issue 3: $ / " / \ in property names, descriptions, defaults, examples + ItemWithAllEscapingEdgeCases: + type: object + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + properties: + + # property name starts with $ + $id: + type: string + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + default: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + + # property name has $ in middle + name$Value: + type: string + description: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + example: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + default: 'SQ="; SBS=\; DBS=\\; SD=$some; CC=*/; TQ="""' + + # just backslashes (edge case: odd vs even number) + backslashValue: + type: string + description: "one-bs: \\; two-bs: \\\\" + example: "one-bs: \\; two-bs: \\\\" + default: "one-bs: \\; two-bs: \\\\" + + # just dollar signs + dollarValue: + type: string + description: "$one $$two $$$three" + example: "$one $$two $$$three" + default: "$one $$two $$$three" + + # comment-closing sequence (the escapeUnsafeCharacters bug) + commentCloseValue: + type: string + description: "starts /* comment and ends */" + example: "starts /* comment and ends */" + default: "starts /* comment and ends */" + + # triple-quote sequence (would break """ Kotlin strings) + tripleQuoteValue: + type: string + description: 'contains """ triple quotes' + example: 'contains """ triple quotes' + default: 'contains """ triple quotes' + + # multiline description (YAML literal block) + multilineDescription: + type: string + description: | + Line one with $dollar and "quote" and \backslash + Line two with */ comment-close and /* comment-open + Line three with """ triple-quote + example: "single line example" + + # integer with default (should not be quoted in output) + intWithDefault: + type: integer + format: int32 + description: "integer property, default should not be quoted" + default: 42 + + # boolean with default + boolWithDefault: + type: boolean + description: "boolean property" + default: false + + # nested object with $ properties + details$Info: + type: object + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + properties: + detail$One: + type: string + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + example: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + default: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some; CC=*/; TQ=\"\"\"" + detail$Two: + type: integer + description: "SQ=\"; SBS=\\; DBS=\\\\; SD=$some" + example: 42 From d0dd4584d35839652aea386996a6f7633e3f2a05 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 15:40:53 +0200 Subject: [PATCH 3/8] fix samples up to date --- samples/documentation/html/index.html | 14 +-- samples/documentation/html2/index.html | 126 ++++++++++++------------- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/samples/documentation/html/index.html b/samples/documentation/html/index.html index 81a6253d5e79..e97c154c4269 100644 --- a/samples/documentation/html/index.html +++ b/samples/documentation/html/index.html @@ -248,7 +248,7 @@

Request body

Pet Pet (required)
-
Body Parameter
+
Body Parameter — Pet object that needs to be added to the store
@@ -663,7 +663,7 @@

Request body

Pet Pet (required)
-
Body Parameter
+
Body Parameter — Pet object that needs to be added to the store
@@ -992,7 +992,7 @@

Request body

Order Order (required)
-
Body Parameter
+
Body Parameter — order placed for purchasing the pet
@@ -1064,7 +1064,7 @@

Request body

User User (required)
-
Body Parameter
+
Body Parameter — Created user object
@@ -1100,7 +1100,7 @@

Request body

User array[User] (required)
-
Body Parameter
+
Body Parameter — List of user object
@@ -1136,7 +1136,7 @@

Request body

User array[User] (required)
-
Body Parameter
+
Body Parameter — List of user object
@@ -1354,7 +1354,7 @@

Request body

User User (required)
-
Body Parameter
+
Body Parameter — Updated user object
diff --git a/samples/documentation/html2/index.html b/samples/documentation/html2/index.html index defce7cd6ce2..d74b2161a56e 100644 --- a/samples/documentation/html2/index.html +++ b/samples/documentation/html2/index.html @@ -1216,7 +1216,7 @@

Usage and SDK Samples

// Create an instance of the API class PetApi apiInstance = new PetApi(); - Pet pet = ; // Pet | + Pet pet = ; // Pet | Pet object that needs to be added to the store try { Pet result = apiInstance.addPet(pet); @@ -1235,7 +1235,7 @@

Usage and SDK Samples

final api_instance = DefaultApi(); -final Pet pet = new Pet(); // Pet | +final Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { final result = await api_instance.addPet(pet); @@ -1253,7 +1253,7 @@

Usage and SDK Samples

public class PetApiExample { public static void main(String[] args) { PetApi apiInstance = new PetApi(); - Pet pet = ; // Pet | + Pet pet = ; // Pet | Pet object that needs to be added to the store try { Pet result = apiInstance.addPet(pet); @@ -1278,7 +1278,7 @@

Usage and SDK Samples

// Create an instance of the API class PetApi *apiInstance = [[PetApi alloc] init]; -Pet *pet = ; // +Pet *pet = ; // Pet object that needs to be added to the store // Add a new pet to the store [apiInstance addPetWith:pet @@ -1303,7 +1303,7 @@

Usage and SDK Samples

// Create an instance of the API class var api = new OpenApiPetstore.PetApi() -var pet = ; // {Pet} +var pet = ; // {Pet} Pet object that needs to be added to the store var callback = function(error, data, response) { if (error) { @@ -1337,7 +1337,7 @@

Usage and SDK Samples

// Create an instance of the API class var apiInstance = new PetApi(); - var pet = new Pet(); // Pet | + var pet = new Pet(); // Pet | Pet object that needs to be added to the store try { // Add a new pet to the store @@ -1361,7 +1361,7 @@

Usage and SDK Samples

// Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\PetApi(); -$pet = ; // Pet | +$pet = ; // Pet | Pet object that needs to be added to the store try { $result = $api_instance->addPet($pet); @@ -1382,7 +1382,7 @@

Usage and SDK Samples

# Create an instance of the API class my $api_instance = WWW::OPenAPIClient::PetApi->new(); -my $pet = WWW::OPenAPIClient::Object::Pet->new(); # Pet | +my $pet = WWW::OPenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { my $result = $api_instance->addPet(pet => $pet); @@ -1405,7 +1405,7 @@

Usage and SDK Samples

# Create an instance of the API class api_instance = openapi_client.PetApi() -pet = # Pet | +pet = # Pet | Pet object that needs to be added to the store try: # Add a new pet to the store @@ -3668,7 +3668,7 @@

Usage and SDK Samples

// Create an instance of the API class PetApi apiInstance = new PetApi(); - Pet pet = ; // Pet | + Pet pet = ; // Pet | Pet object that needs to be added to the store try { Pet result = apiInstance.updatePet(pet); @@ -3687,7 +3687,7 @@

Usage and SDK Samples

final api_instance = DefaultApi(); -final Pet pet = new Pet(); // Pet | +final Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { final result = await api_instance.updatePet(pet); @@ -3705,7 +3705,7 @@

Usage and SDK Samples

public class PetApiExample { public static void main(String[] args) { PetApi apiInstance = new PetApi(); - Pet pet = ; // Pet | + Pet pet = ; // Pet | Pet object that needs to be added to the store try { Pet result = apiInstance.updatePet(pet); @@ -3730,7 +3730,7 @@

Usage and SDK Samples

// Create an instance of the API class PetApi *apiInstance = [[PetApi alloc] init]; -Pet *pet = ; // +Pet *pet = ; // Pet object that needs to be added to the store // Update an existing pet [apiInstance updatePetWith:pet @@ -3755,7 +3755,7 @@

Usage and SDK Samples

// Create an instance of the API class var api = new OpenApiPetstore.PetApi() -var pet = ; // {Pet} +var pet = ; // {Pet} Pet object that needs to be added to the store var callback = function(error, data, response) { if (error) { @@ -3789,7 +3789,7 @@

Usage and SDK Samples

// Create an instance of the API class var apiInstance = new PetApi(); - var pet = new Pet(); // Pet | + var pet = new Pet(); // Pet | Pet object that needs to be added to the store try { // Update an existing pet @@ -3813,7 +3813,7 @@

Usage and SDK Samples

// Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\PetApi(); -$pet = ; // Pet | +$pet = ; // Pet | Pet object that needs to be added to the store try { $result = $api_instance->updatePet($pet); @@ -3834,7 +3834,7 @@

Usage and SDK Samples

# Create an instance of the API class my $api_instance = WWW::OPenAPIClient::PetApi->new(); -my $pet = WWW::OPenAPIClient::Object::Pet->new(); # Pet | +my $pet = WWW::OPenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { my $result = $api_instance->updatePet(pet => $pet); @@ -3857,7 +3857,7 @@

Usage and SDK Samples

# Create an instance of the API class api_instance = openapi_client.PetApi() -pet = # Pet | +pet = # Pet | Pet object that needs to be added to the store try: # Update an existing pet @@ -6529,7 +6529,7 @@

Usage and SDK Samples

// Create an instance of the API class StoreApi apiInstance = new StoreApi(); - Order order = ; // Order | + Order order = ; // Order | order placed for purchasing the pet try { Order result = apiInstance.placeOrder(order); @@ -6548,7 +6548,7 @@

Usage and SDK Samples

final api_instance = DefaultApi(); -final Order order = new Order(); // Order | +final Order order = new Order(); // Order | order placed for purchasing the pet try { final result = await api_instance.placeOrder(order); @@ -6566,7 +6566,7 @@

Usage and SDK Samples

public class StoreApiExample { public static void main(String[] args) { StoreApi apiInstance = new StoreApi(); - Order order = ; // Order | + Order order = ; // Order | order placed for purchasing the pet try { Order result = apiInstance.placeOrder(order); @@ -6587,7 +6587,7 @@

Usage and SDK Samples

// Create an instance of the API class StoreApi *apiInstance = [[StoreApi alloc] init]; -Order *order = ; // +Order *order = ; // order placed for purchasing the pet // Place an order for a pet [apiInstance placeOrderWith:order @@ -6607,7 +6607,7 @@

Usage and SDK Samples

// Create an instance of the API class var api = new OpenApiPetstore.StoreApi() -var order = ; // {Order} +var order = ; // {Order} order placed for purchasing the pet var callback = function(error, data, response) { if (error) { @@ -6639,7 +6639,7 @@

Usage and SDK Samples

// Create an instance of the API class var apiInstance = new StoreApi(); - var order = new Order(); // Order | + var order = new Order(); // Order | order placed for purchasing the pet try { // Place an order for a pet @@ -6660,7 +6660,7 @@

Usage and SDK Samples

// Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\StoreApi(); -$order = ; // Order | +$order = ; // Order | order placed for purchasing the pet try { $result = $api_instance->placeOrder($order); @@ -6678,7 +6678,7 @@

Usage and SDK Samples

# Create an instance of the API class my $api_instance = WWW::OPenAPIClient::StoreApi->new(); -my $order = WWW::OPenAPIClient::Object::Order->new(); # Order | +my $order = WWW::OPenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet eval { my $result = $api_instance->placeOrder(order => $order); @@ -6698,7 +6698,7 @@

Usage and SDK Samples

# Create an instance of the API class api_instance = openapi_client.StoreApi() -order = # Order | +order = # Order | order placed for purchasing the pet try: # Place an order for a pet @@ -7007,7 +7007,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi apiInstance = new UserApi(); - User user = ; // User | + User user = ; // User | Created user object try { apiInstance.createUser(user); @@ -7025,7 +7025,7 @@

Usage and SDK Samples

final api_instance = DefaultApi(); -final User user = new User(); // User | +final User user = new User(); // User | Created user object try { final result = await api_instance.createUser(user); @@ -7043,7 +7043,7 @@

Usage and SDK Samples

public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - User user = ; // User | + User user = ; // User | Created user object try { apiInstance.createUser(user); @@ -7069,7 +7069,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi *apiInstance = [[UserApi alloc] init]; -User *user = ; // +User *user = ; // Created user object // Create user [apiInstance createUserWith:user @@ -7093,7 +7093,7 @@

Usage and SDK Samples

// Create an instance of the API class var api = new OpenApiPetstore.UserApi() -var user = ; // {User} +var user = ; // {User} Created user object var callback = function(error, data, response) { if (error) { @@ -7129,7 +7129,7 @@

Usage and SDK Samples

// Create an instance of the API class var apiInstance = new UserApi(); - var user = new User(); // User | + var user = new User(); // User | Created user object try { // Create user @@ -7154,7 +7154,7 @@

Usage and SDK Samples

// Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\UserApi(); -$user = ; // User | +$user = ; // User | Created user object try { $api_instance->createUser($user); @@ -7176,7 +7176,7 @@

Usage and SDK Samples

# Create an instance of the API class my $api_instance = WWW::OPenAPIClient::UserApi->new(); -my $user = WWW::OPenAPIClient::Object::User->new(); # User | +my $user = WWW::OPenAPIClient::Object::User->new(); # User | Created user object eval { $api_instance->createUser(user => $user); @@ -7200,7 +7200,7 @@

Usage and SDK Samples

# Create an instance of the API class api_instance = openapi_client.UserApi() -user = # User | +user = # User | Created user object try: # Create user @@ -7424,7 +7424,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi apiInstance = new UserApi(); - array[User] user = ; // array[User] | + array[User] user = ; // array[User] | List of user object try { apiInstance.createUsersWithArrayInput(user); @@ -7442,7 +7442,7 @@

Usage and SDK Samples

final api_instance = DefaultApi(); -final array[User] user = new array[User](); // array[User] | +final array[User] user = new array[User](); // array[User] | List of user object try { final result = await api_instance.createUsersWithArrayInput(user); @@ -7460,7 +7460,7 @@

Usage and SDK Samples

public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - array[User] user = ; // array[User] | + array[User] user = ; // array[User] | List of user object try { apiInstance.createUsersWithArrayInput(user); @@ -7486,7 +7486,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi *apiInstance = [[UserApi alloc] init]; -array[User] *user = ; // +array[User] *user = ; // List of user object // Creates list of users with given input array [apiInstance createUsersWithArrayInputWith:user @@ -7510,7 +7510,7 @@

Usage and SDK Samples

// Create an instance of the API class var api = new OpenApiPetstore.UserApi() -var user = ; // {array[User]} +var user = ; // {array[User]} List of user object var callback = function(error, data, response) { if (error) { @@ -7546,7 +7546,7 @@

Usage and SDK Samples

// Create an instance of the API class var apiInstance = new UserApi(); - var user = new array[User](); // array[User] | + var user = new array[User](); // array[User] | List of user object try { // Creates list of users with given input array @@ -7571,7 +7571,7 @@

Usage and SDK Samples

// Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\UserApi(); -$user = ; // array[User] | +$user = ; // array[User] | List of user object try { $api_instance->createUsersWithArrayInput($user); @@ -7593,7 +7593,7 @@

Usage and SDK Samples

# Create an instance of the API class my $api_instance = WWW::OPenAPIClient::UserApi->new(); -my $user = [WWW::OPenAPIClient::Object::array[User]->new()]; # array[User] | +my $user = [WWW::OPenAPIClient::Object::array[User]->new()]; # array[User] | List of user object eval { $api_instance->createUsersWithArrayInput(user => $user); @@ -7617,7 +7617,7 @@

Usage and SDK Samples

# Create an instance of the API class api_instance = openapi_client.UserApi() -user = # array[User] | +user = # array[User] | List of user object try: # Creates list of users with given input array @@ -7844,7 +7844,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi apiInstance = new UserApi(); - array[User] user = ; // array[User] | + array[User] user = ; // array[User] | List of user object try { apiInstance.createUsersWithListInput(user); @@ -7862,7 +7862,7 @@

Usage and SDK Samples

final api_instance = DefaultApi(); -final array[User] user = new array[User](); // array[User] | +final array[User] user = new array[User](); // array[User] | List of user object try { final result = await api_instance.createUsersWithListInput(user); @@ -7880,7 +7880,7 @@

Usage and SDK Samples

public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - array[User] user = ; // array[User] | + array[User] user = ; // array[User] | List of user object try { apiInstance.createUsersWithListInput(user); @@ -7906,7 +7906,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi *apiInstance = [[UserApi alloc] init]; -array[User] *user = ; // +array[User] *user = ; // List of user object // Creates list of users with given input array [apiInstance createUsersWithListInputWith:user @@ -7930,7 +7930,7 @@

Usage and SDK Samples

// Create an instance of the API class var api = new OpenApiPetstore.UserApi() -var user = ; // {array[User]} +var user = ; // {array[User]} List of user object var callback = function(error, data, response) { if (error) { @@ -7966,7 +7966,7 @@

Usage and SDK Samples

// Create an instance of the API class var apiInstance = new UserApi(); - var user = new array[User](); // array[User] | + var user = new array[User](); // array[User] | List of user object try { // Creates list of users with given input array @@ -7991,7 +7991,7 @@

Usage and SDK Samples

// Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\UserApi(); -$user = ; // array[User] | +$user = ; // array[User] | List of user object try { $api_instance->createUsersWithListInput($user); @@ -8013,7 +8013,7 @@

Usage and SDK Samples

# Create an instance of the API class my $api_instance = WWW::OPenAPIClient::UserApi->new(); -my $user = [WWW::OPenAPIClient::Object::array[User]->new()]; # array[User] | +my $user = [WWW::OPenAPIClient::Object::array[User]->new()]; # array[User] | List of user object eval { $api_instance->createUsersWithListInput(user => $user); @@ -8037,7 +8037,7 @@

Usage and SDK Samples

# Create an instance of the API class api_instance = openapi_client.UserApi() -user = # array[User] | +user = # array[User] | List of user object try: # Creates list of users with given input array @@ -10096,7 +10096,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi apiInstance = new UserApi(); String username = username_example; // String | name that need to be deleted - User user = ; // User | + User user = ; // User | Updated user object try { apiInstance.updateUser(username, user); @@ -10115,7 +10115,7 @@

Usage and SDK Samples

final api_instance = DefaultApi(); final String username = new String(); // String | name that need to be deleted -final User user = new User(); // User | +final User user = new User(); // User | Updated user object try { final result = await api_instance.updateUser(username, user); @@ -10134,7 +10134,7 @@

Usage and SDK Samples

public static void main(String[] args) { UserApi apiInstance = new UserApi(); String username = username_example; // String | name that need to be deleted - User user = ; // User | + User user = ; // User | Updated user object try { apiInstance.updateUser(username, user); @@ -10161,7 +10161,7 @@

Usage and SDK Samples

// Create an instance of the API class UserApi *apiInstance = [[UserApi alloc] init]; String *username = username_example; // name that need to be deleted (default to null) -User *user = ; // +User *user = ; // Updated user object // Updated user [apiInstance updateUserWith:username @@ -10187,7 +10187,7 @@

Usage and SDK Samples

// Create an instance of the API class var api = new OpenApiPetstore.UserApi() var username = username_example; // {String} name that need to be deleted -var user = ; // {User} +var user = ; // {User} Updated user object var callback = function(error, data, response) { if (error) { @@ -10224,7 +10224,7 @@

Usage and SDK Samples

// Create an instance of the API class var apiInstance = new UserApi(); var username = username_example; // String | name that need to be deleted (default to null) - var user = new User(); // User | + var user = new User(); // User | Updated user object try { // Updated user @@ -10250,7 +10250,7 @@

Usage and SDK Samples

// Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\UserApi(); $username = username_example; // String | name that need to be deleted -$user = ; // User | +$user = ; // User | Updated user object try { $api_instance->updateUser($username, $user); @@ -10273,7 +10273,7 @@

Usage and SDK Samples

# Create an instance of the API class my $api_instance = WWW::OPenAPIClient::UserApi->new(); my $username = username_example; # String | name that need to be deleted -my $user = WWW::OPenAPIClient::Object::User->new(); # User | +my $user = WWW::OPenAPIClient::Object::User->new(); # User | Updated user object eval { $api_instance->updateUser(username => $username, user => $user); @@ -10298,7 +10298,7 @@

Usage and SDK Samples

# Create an instance of the API class api_instance = openapi_client.UserApi() username = username_example # String | name that need to be deleted (default to null) -user = # User | +user = # User | Updated user object try: # Updated user From 75087f8c211204ceac82bd3faa4a8f5ed95197d2 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 15:45:43 +0200 Subject: [PATCH 4/8] implement CR feedback --- .../kotlin-server/libraries/javalin5/paramDefault.mustache | 2 +- .../kotlin-server/libraries/javalin6/paramDefault.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache index f67330a98ef6..71530aa445e8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin5/paramDefault.mustache @@ -1,2 +1,2 @@ -{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} +{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} {{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache index f67330a98ef6..71530aa445e8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/javalin6/paramDefault.mustache @@ -1,2 +1,2 @@ -{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} +{{#defaultValue}} ?:{{#isInteger}}{{{defaultValue}}}{{/isInteger}}{{#isLong}}{{{defaultValue}}}L{{/isLong}}{{#isShort}}{{{defaultValue}}}.toShort(){{/isShort}}{{#isDouble}}{{{defaultValue}}}.toDouble(){{/isDouble}}{{#isFloat}}{{{defaultValue}}}f{{/isFloat}}{{#isEnum}}{{{dataType}}}.valueOf("{{{defaultValue}}}"){{/isEnum}}{{#isBoolean}}{{{defaultValue}}}{{/isBoolean}}{{#isString}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isString}}{{#isUuid}}"UUID.fromString({{{defaultValue}}})"{{/isUuid}} {{/defaultValue}} \ No newline at end of file From b72502432ee058a37bf858070fe5e29ae6e00486 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 16:07:31 +0200 Subject: [PATCH 5/8] implement CR feedback --- .../java/org/openapitools/codegen/CodegenOperation.java | 4 +++- .../java/org/openapitools/codegen/CodegenParameter.java | 5 ++++- .../java/org/openapitools/codegen/CodegenProperty.java | 4 +++- .../java/org/openapitools/codegen/CodegenResponse.java | 4 +++- .../java/org/openapitools/codegen/DefaultCodegen.java | 9 ++++++--- .../src/main/resources/kotlin-client/api_doc.mustache | 2 +- .../libraries/jvm-retrofit2/api_doc.mustache | 2 +- .../kotlin-client/libraries/jvm-volley/api_doc.mustache | 2 +- .../src/main/resources/kotlin-misk/api_doc.mustache | 4 ++-- .../src/main/resources/kotlin-server/api_doc.mustache | 4 ++-- 10 files changed, 26 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index eb6a78a2c831..e8c89ac9b6fa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -429,6 +429,7 @@ public String toString() { sb.append(", returnBaseType='").append(returnBaseType).append('\''); sb.append(", returnContainer='").append(returnContainer).append('\''); sb.append(", summary='").append(summary).append('\''); + sb.append(", unescapedSummary='").append(unescapedSummary).append('\''); sb.append(", unescapedNotes='").append(unescapedNotes).append('\''); sb.append(", notes='").append(notes).append('\''); sb.append(", baseName='").append(baseName).append('\''); @@ -502,6 +503,7 @@ public boolean equals(Object o) { Objects.equals(returnBaseType, that.returnBaseType) && Objects.equals(returnContainer, that.returnContainer) && Objects.equals(summary, that.summary) && + Objects.equals(unescapedSummary, that.unescapedSummary) && Objects.equals(unescapedNotes, that.unescapedNotes) && Objects.equals(notes, that.notes) && Objects.equals(baseName, that.baseName) && @@ -547,7 +549,7 @@ public int hashCode() { returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap, isArray, isMultipart, isVoid, isResponseBinary, isResponseFile, isResponseOptional, hasReference, isDeprecated, isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod, - returnBaseType, returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse, + returnBaseType, returnContainer, summary, unescapedSummary, unescapedNotes, notes, baseName, defaultResponse, discriminator, consumes, produces, prioritizedContentTypes, servers, bodyParam, allParams, bodyParams, pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, returnProperty, optionalParams, authMethods, tags, responses, callbacks, imports, examples, requestBodyExamples, externalDocs, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 98f2b1e892c9..35933108c49a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -182,6 +182,7 @@ public CodegenParameter copy() { output.multipleOf = this.multipleOf; output.jsonSchema = this.jsonSchema; output.defaultValue = this.defaultValue; + output.unescapedDefaultValue = this.unescapedDefaultValue; output.enumDefaultValue = this.enumDefaultValue; output.example = this.example; output.examples = this.examples; @@ -289,7 +290,7 @@ public int hashCode() { return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, - unescapedDescription, baseType, containerType, containerTypeMapped, defaultValue, + unescapedDescription, baseType, containerType, containerTypeMapped, defaultValue, unescapedDefaultValue, enumDefaultValue, enumName, style, isDeepObject, isMatrix, isAllowEmptyValue, example, examples, isFormStyle, isSpaceDelimited, isPipeDelimited, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, @@ -382,6 +383,7 @@ public boolean equals(Object o) { Objects.equals(containerType, that.containerType) && Objects.equals(containerTypeMapped, that.containerTypeMapped) && Objects.equals(defaultValue, that.defaultValue) && + Objects.equals(unescapedDefaultValue, that.unescapedDefaultValue) && Objects.equals(enumDefaultValue, that.enumDefaultValue) && Objects.equals(enumName, that.enumName) && Objects.equals(style, that.style) && @@ -450,6 +452,7 @@ public String toString() { sb.append(", containerType='").append(containerType).append('\''); sb.append(", containerTypeMapped='").append(containerTypeMapped).append('\''); sb.append(", defaultValue='").append(defaultValue).append('\''); + sb.append(", unescapedDefaultValue='").append(unescapedDefaultValue).append('\''); sb.append(", enumDefaultValue='").append(enumDefaultValue).append('\''); sb.append(", enumName='").append(enumName).append('\''); sb.append(", style='").append(style).append('\''); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index cdb73688de6f..a45c180869bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -1000,6 +1000,7 @@ public String toString() { sb.append(", containerTypeMapped='").append(containerTypeMapped).append('\''); sb.append(", title='").append(title).append('\''); sb.append(", unescapedDescription='").append(unescapedDescription).append('\''); + sb.append(", unescapedDefaultValue='").append(unescapedDefaultValue).append('\''); sb.append(", maxLength=").append(maxLength); sb.append(", minLength=").append(minLength); sb.append(", pattern='").append(pattern).append('\''); @@ -1187,6 +1188,7 @@ public boolean equals(Object o) { Objects.equals(containerTypeMapped, that.containerTypeMapped) && Objects.equals(title, that.title) && Objects.equals(unescapedDescription, that.unescapedDescription) && + Objects.equals(unescapedDefaultValue, that.unescapedDefaultValue) && Objects.equals(maxLength, that.maxLength) && Objects.equals(minLength, that.minLength) && Objects.equals(pattern, that.pattern) && @@ -1220,7 +1222,7 @@ public int hashCode() { return Objects.hash(openApiType, baseName, complexType, getter, setter, description, dataType, datatypeWithEnum, dataFormat, name, min, max, defaultValue, - defaultValueWithParam, baseType, containerType, containerTypeMapped, title, unescapedDescription, + defaultValueWithParam, baseType, containerType, containerTypeMapped, title, unescapedDescription, unescapedDefaultValue, maxLength, minLength, pattern, example, jsonSchema, minimum, maximum, exclusiveMinimum, exclusiveMaximum, required, deprecated, isPrimitiveType, isModel, isContainer, isString, isNumeric, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index ad9f45283638..c9a426d7b9a1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -110,7 +110,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { @Override public int hashCode() { - return Objects.hash(headers, code, message, examples, dataType, baseType, containerType, containerTypeMapped, hasHeaders, + return Objects.hash(headers, code, message, unescapedMessage, examples, dataType, baseType, containerType, containerTypeMapped, hasHeaders, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate, isDateTime, isUuid, isEmail, isPassword, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType, isMap, isOptional, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties, @@ -183,6 +183,7 @@ public boolean equals(Object o) { Objects.equals(headers, that.headers) && Objects.equals(code, that.code) && Objects.equals(message, that.message) && + Objects.equals(unescapedMessage, that.unescapedMessage) && Objects.equals(examples, that.examples) && Objects.equals(dataType, that.dataType) && Objects.equals(baseType, that.baseType) && @@ -583,6 +584,7 @@ public String toString() { sb.append(", is4xx='").append(is4xx).append('\''); sb.append(", is5xx='").append(is5xx).append('\''); sb.append(", message='").append(message).append('\''); + sb.append(", unescapedMessage='").append(unescapedMessage).append('\''); sb.append(", examples=").append(examples); sb.append(", dataType='").append(dataType).append('\''); sb.append(", baseType='").append(baseType).append('\''); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index fbd052f3f8f0..566fb77eb45f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -477,11 +477,14 @@ protected ImmutableMap.Builder addMustacheLambdas() { .put("trimWhitespace", new TrimWhitespaceLambda()) .put("trimTrailingWithNewLine", new TrimTrailingWhiteSpaceLambda(true)) .put("trimTrailing", new TrimTrailingWhiteSpaceLambda(false)) - // Escapes text for use inside a Markdown table cell. - // \\ must be replaced first to avoid double-escaping subsequent replacements. - // $ is escaped to prevent LaTeX math mode ($...$) in markdown renderers that support it. + // Escapes text for use inside a Markdown table cell or inline text. + // Order matters: \\ and & must be first to avoid double-escaping. + // $ is escaped to prevent LaTeX math mode ($...$) in renderers that support it. .put("escapeMarkdown", (fragment, writer) -> writer.write(fragment.execute() .replace("\\", "\\\\") + .replace("&", "&") + .replace("<", "<") + .replace(">", ">") .replace("$", "\\$") .replace("|", "\\|") .replace("\r\n", " ") diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache index ef952adfdc4d..b5c9186cf54d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache @@ -27,7 +27,7 @@ All URIs are relative to *{{basePath}}* {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} try { {{#returnType}}val result : {{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache index 70a9b1602a45..5316d77adaa0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache @@ -35,7 +35,7 @@ apiClient.setBearerToken("TOKEN") {{/authMethods}} val webService = apiClient.createWebservice({{{classname}}}::class.java) {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} {{#useCoroutines}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache index 185744f4fd45..93e2a4bbe966 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache @@ -35,7 +35,7 @@ apiClient.setBearerToken("TOKEN") {{/authMethods}} val webService = apiClient.createWebservice({{{classname}}}::class.java) {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} {{#useCoroutines}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache index 5f7125775eba..e760a9471370 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache @@ -27,10 +27,10 @@ Method | HTTP request | Description {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} try { - {{#returnType}}val result : {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} + {{#returnType}}val result : {{{returnType}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} println(result){{/returnType}} } catch (e: ClientException) { println("4xx response calling {{{classname}}}#{{{operationId}}}") diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache index 5f7125775eba..e760a9471370 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache @@ -27,10 +27,10 @@ Method | HTTP request | Description {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.escapeMarkdown}}{{{unescapedDescription}}}{{/lambda.escapeMarkdown}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} try { - {{#returnType}}val result : {{#lambda.escapeMarkdown}}{{{.}}}{{/lambda.escapeMarkdown}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} + {{#returnType}}val result : {{{returnType}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} println(result){{/returnType}} } catch (e: ClientException) { println("4xx response calling {{{classname}}}#{{{operationId}}}") From 8b87f1fe62c0b1b6ed26739195b34fc00d982026 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 16:11:56 +0200 Subject: [PATCH 6/8] implement CR feedback and update samples --- .../kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md | 4 ++-- .../kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-explicit/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin-explicit/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-gson/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin-gson/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-jackson/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin-jackson/docs/StoreApi.md | 6 +++--- .../petstore/kotlin-json-request-string/docs/PetApi.md | 4 ++-- .../petstore/kotlin-json-request-string/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md | 4 ++-- samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md | 4 ++-- .../client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md | 6 +++--- .../client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md | 4 ++-- .../petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md | 6 +++--- .../kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md | 4 ++-- .../kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md | 6 +++--- .../petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md | 4 ++-- .../petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md | 6 +++--- .../kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md | 4 ++-- .../petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md | 4 ++-- .../petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md | 6 +++--- .../petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md | 4 ++-- .../kotlin-jvm-spring-3-restclient/docs/StoreApi.md | 6 +++--- .../petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md | 4 ++-- .../petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md | 6 +++--- .../client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md | 4 ++-- .../client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md | 6 +++--- .../kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md | 4 ++-- .../kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md | 6 +++--- .../client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md | 4 ++-- .../petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md | 6 +++--- .../client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md | 4 ++-- .../client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md | 6 +++--- .../client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md | 4 ++-- .../petstore/kotlin-kotlinx-datetime/docs/StoreApi.md | 6 +++--- .../kotlin-model-prefix-type-mappings/docs/StoreApi.md | 4 ++-- samples/client/petstore/kotlin-modelMutable/docs/PetApi.md | 4 ++-- .../client/petstore/kotlin-modelMutable/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md | 4 ++-- .../client/petstore/kotlin-moshi-codegen/docs/StoreApi.md | 6 +++--- .../kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md | 4 ++-- .../kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-multiplatform/docs/PetApi.md | 4 ++-- .../client/petstore/kotlin-multiplatform/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-nonpublic/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-nullable/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin-nullable/docs/StoreApi.md | 6 +++--- .../petstore/kotlin-retrofit2-jackson/docs/StoreApi.md | 4 ++-- .../kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md | 4 ++-- .../client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md | 4 ++-- samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md | 4 ++-- samples/client/petstore/kotlin-string/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin-string/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin-threetenbp/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md | 6 +++--- samples/client/petstore/kotlin/docs/PetApi.md | 4 ++-- samples/client/petstore/kotlin/docs/StoreApi.md | 6 +++--- samples/server/petstore/kotlin-misk-config/docs/PetApi.md | 4 ++-- samples/server/petstore/kotlin-misk-config/docs/StoreApi.md | 6 +++--- samples/server/petstore/kotlin-misk/docs/PetApi.md | 4 ++-- samples/server/petstore/kotlin-misk/docs/StoreApi.md | 6 +++--- 63 files changed, 154 insertions(+), 154 deletions(-) diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md index a1f188d3089c..e0bf879c9a65 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md index f79118bd104f..c8cd9c416773 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-explicit/docs/PetApi.md b/samples/client/petstore/kotlin-explicit/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin-explicit/docs/PetApi.md +++ b/samples/client/petstore/kotlin-explicit/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-explicit/docs/StoreApi.md b/samples/client/petstore/kotlin-explicit/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-explicit/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-explicit/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-gson/docs/PetApi.md b/samples/client/petstore/kotlin-gson/docs/PetApi.md index a1f188d3089c..e0bf879c9a65 100644 --- a/samples/client/petstore/kotlin-gson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-gson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-gson/docs/StoreApi.md index f79118bd104f..c8cd9c416773 100644 --- a/samples/client/petstore/kotlin-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-gson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jackson/docs/PetApi.md b/samples/client/petstore/kotlin-jackson/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin-jackson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jackson/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jackson/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jackson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md b/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md index 781775c662f9..318ca7c9e1e9 100644 --- a/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md +++ b/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags @@ -156,7 +156,7 @@ Configure petstore_auth: # **getAllPets** -> kotlin.collections.List getAllPets(lastUpdated) +> kotlin.collections.List<Pet> getAllPets(lastUpdated) Get all pets diff --git a/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md index 71e0b7117b68..6448b963dc71 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-jackson/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md index 314fb5090dc5..0a13a8fa8ce3 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md index d8aaacbe1371..0b928e328e60 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md index 5400409a0346..d6f7e52c88ab 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md index 314fb5090dc5..0a13a8fa8ce3 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md index 8f4a1b5b90be..dd4ba6708459 100644 --- a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -88,7 +88,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md index 27419368c3b5..9eb15f0e7013 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md index 27419368c3b5..9eb15f0e7013 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md index 27419368c3b5..9eb15f0e7013 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md index 27419368c3b5..9eb15f0e7013 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md index 27419368c3b5..9eb15f0e7013 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md index 27419368c3b5..9eb15f0e7013 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md index 27419368c3b5..9eb15f0e7013 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/PetApi.md @@ -113,7 +113,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -161,7 +161,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md index f8f97777190f..091727af5301 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md b/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md b/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md b/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md index 69590e73bc29..185f1ce4e3c7 100644 --- a/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-model-prefix-type-mappings/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -88,7 +88,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md b/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md index 6f97f5aed6a4..e385754514fb 100644 --- a/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md +++ b/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.MutableList findPetsByStatus(status) +> kotlin.collections.MutableList<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.MutableList findPetsByTags(tags) +> kotlin.collections.MutableList<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md index b9e6b9bc6da1..44d1a3b65b33 100644 --- a/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.MutableMap getInventory() +> kotlin.collections.MutableMap<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md b/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md +++ b/samples/client/petstore/kotlin-moshi-codegen/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md b/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md index d8aaacbe1371..0b928e328e60 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md index 5400409a0346..d6f7e52c88ab 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md b/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md index d8aaacbe1371..0b928e328e60 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md b/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md index 5400409a0346..d6f7e52c88ab 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md b/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-nullable/docs/PetApi.md b/samples/client/petstore/kotlin-nullable/docs/PetApi.md index dc1247427244..c34fce5f4a46 100644 --- a/samples/client/petstore/kotlin-nullable/docs/PetApi.md +++ b/samples/client/petstore/kotlin-nullable/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List? findPetsByStatus(status) +> kotlin.collections.List<Pet>? findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List? findPetsByTags(tags) +> kotlin.collections.List<Pet>? findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-nullable/docs/StoreApi.md b/samples/client/petstore/kotlin-nullable/docs/StoreApi.md index 1cdad2f83df2..69663a68eff2 100644 --- a/samples/client/petstore/kotlin-nullable/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-nullable/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map? getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int>? getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md index 71e0b7117b68..6448b963dc71 100644 --- a/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-jackson/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md index 382fcbb77dc7..ded29cf05361 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md index 382fcbb77dc7..ded29cf05361 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md index 382fcbb77dc7..ded29cf05361 100644 --- a/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -84,7 +84,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-string/docs/PetApi.md b/samples/client/petstore/kotlin-string/docs/PetApi.md index 981f96fe8d26..ea42a0d82f60 100644 --- a/samples/client/petstore/kotlin-string/docs/PetApi.md +++ b/samples/client/petstore/kotlin-string/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-string/docs/StoreApi.md b/samples/client/petstore/kotlin-string/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-string/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-string/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md b/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md b/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin/docs/PetApi.md b/samples/client/petstore/kotlin/docs/PetApi.md index 8d6650f9771a..6856ea516dab 100644 --- a/samples/client/petstore/kotlin/docs/PetApi.md +++ b/samples/client/petstore/kotlin/docs/PetApi.md @@ -108,7 +108,7 @@ Configure petstore_auth: # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -156,7 +156,7 @@ Configure petstore_auth: # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/client/petstore/kotlin/docs/StoreApi.md b/samples/client/petstore/kotlin/docs/StoreApi.md index 3652df8bfbd5..b19af1a400ef 100644 --- a/samples/client/petstore/kotlin/docs/StoreApi.md +++ b/samples/client/petstore/kotlin/docs/StoreApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -57,7 +57,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -107,7 +107,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/server/petstore/kotlin-misk-config/docs/PetApi.md b/samples/server/petstore/kotlin-misk-config/docs/PetApi.md index 4e265b963725..99dbe788edb0 100644 --- a/samples/server/petstore/kotlin-misk-config/docs/PetApi.md +++ b/samples/server/petstore/kotlin-misk-config/docs/PetApi.md @@ -111,7 +111,7 @@ null (empty response body) # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -158,7 +158,7 @@ Name | Type | Description | Notes # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md b/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md index 12a94b8658aa..8170140ea27d 100644 --- a/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md +++ b/samples/server/petstore/kotlin-misk-config/docs/StoreApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -58,7 +58,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/server/petstore/kotlin-misk/docs/PetApi.md b/samples/server/petstore/kotlin-misk/docs/PetApi.md index 4e265b963725..99dbe788edb0 100644 --- a/samples/server/petstore/kotlin-misk/docs/PetApi.md +++ b/samples/server/petstore/kotlin-misk/docs/PetApi.md @@ -111,7 +111,7 @@ null (empty response body) # **findPetsByStatus** -> kotlin.collections.List findPetsByStatus(status) +> kotlin.collections.List<Pet> findPetsByStatus(status) Finds Pets by status @@ -158,7 +158,7 @@ Name | Type | Description | Notes # **findPetsByTags** -> kotlin.collections.List findPetsByTags(tags) +> kotlin.collections.List<Pet> findPetsByTags(tags) Finds Pets by tags diff --git a/samples/server/petstore/kotlin-misk/docs/StoreApi.md b/samples/server/petstore/kotlin-misk/docs/StoreApi.md index 12a94b8658aa..8170140ea27d 100644 --- a/samples/server/petstore/kotlin-misk/docs/StoreApi.md +++ b/samples/server/petstore/kotlin-misk/docs/StoreApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example ```kotlin @@ -58,7 +58,7 @@ No authorization required # **getInventory** -> kotlin.collections.Map getInventory() +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() Returns pet inventories by status @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin From d7620cda1b0774005f28b1935a903a9b0729c2d6 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 16:23:37 +0200 Subject: [PATCH 7/8] implement CR feedback --- .../src/main/resources/kotlin-spring/dataClassOptVar.mustache | 4 ++-- .../src/main/resources/kotlin-spring/dataClassReqVar.mustache | 4 ++-- .../src/main/resources/kotlin-spring/interfaceOptVar.mustache | 4 ++-- .../src/main/resources/kotlin-spring/interfaceReqVar.mustache | 4 ++-- .../src/main/resources/kotlin-spring/methodBody.mustache | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache index a1a4603ff396..a480199012b5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -1,6 +1,6 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}} - @Schema({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @ApiModelProperty({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#deprecated}} + @Schema({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#deprecated}} @Deprecated(message = ""){{/deprecated}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} @get:JsonProperty("{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInPascalCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache index 5bf74b4827d4..b7c20a085acd 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,5 +1,5 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}} - @Schema({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @ApiModelProperty({{#example}}example = "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @Schema({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} @get:JsonProperty("{{#lambda.escapeInNormalString}}{{{baseName}}}{{/lambda.escapeInNormalString}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInPascalCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/isString}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache index 456b66a8cad9..222949e2d42c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache @@ -1,5 +1,5 @@ {{#swagger2AnnotationLibrary}} - @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @get:Schema({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? {{^discriminator}}= {{^defaultValue}}null{{/defaultValue}}{{#defaultValue}}{{#isString}}{{^isEnum}}"{{#lambda.escapeInNormalString}}{{{unescapedDefaultValue}}}{{/lambda.escapeInNormalString}}"{{/isEnum}}{{#isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isString}}{{^isString}}{{{defaultValue}}}{{/isString}}{{/defaultValue}}{{/discriminator}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache index ac8227a4bbf8..fc9af6228d44 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache @@ -1,5 +1,5 @@ {{#swagger2AnnotationLibrary}} - @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @get:Schema({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{#lambda.escapeInNormalString}}{{{.}}}{{/lambda.escapeInNormalString}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambda.escapeInNormalString}}{{{unescapedDescription}}}{{/lambda.escapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}} {{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache index 1a6c6d76d00f..73cb1e15d498 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/methodBody.mustache @@ -5,7 +5,7 @@ getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { {{/-first}} if (mediaType.isCompatibleWith(MediaType.valueOf("{{{contentType}}}"))) { - ApiUtil.setExampleResponse(request, "{{{contentType}}}", "{{#lambda.removeLineBreak}}{{#lambda.escapeInNormalString}}{{{example}}}{{/lambda.escapeInNormalString}}{{/lambda.removeLineBreak}}") + ApiUtil.setExampleResponse(request, "{{{contentType}}}", "{{#lambda.escapeInNormalString}}{{{example}}}{{/lambda.escapeInNormalString}}") break } {{#-last}} From a40fa0142902ac715e8d0fb2774216fbcd2fa19d Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 27 Apr 2026 16:33:33 +0200 Subject: [PATCH 8/8] fix possible premature code block ending in markdown --- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 4 ++++ .../src/main/resources/kotlin-client/api_doc.mustache | 2 +- .../kotlin-client/libraries/jvm-retrofit2/api_doc.mustache | 2 +- .../kotlin-client/libraries/jvm-volley/api_doc.mustache | 2 +- .../src/main/resources/kotlin-misk/api_doc.mustache | 2 +- .../src/main/resources/kotlin-server/api_doc.mustache | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 566fb77eb45f..0429fc31e5d1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -487,6 +487,10 @@ protected ImmutableMap.Builder addMustacheLambdas() { .replace(">", ">") .replace("$", "\\$") .replace("|", "\\|") + .replace("\r\n", " ") + .replace("\n", " ") + .replace("\r", " "))) + .put("collapseNewlines", (fragment, writer) -> writer.write(fragment.execute() .replace("\r\n", " ") .replace("\n", " ") .replace("\r", " "))); diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache index b5c9186cf54d..c11322d74117 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache @@ -27,7 +27,7 @@ All URIs are relative to *{{basePath}}* {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.collapseNewlines}}{{{unescapedDescription}}}{{/lambda.collapseNewlines}} {{/allParams}} try { {{#returnType}}val result : {{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache index 5316d77adaa0..0b76cfe90b66 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache @@ -35,7 +35,7 @@ apiClient.setBearerToken("TOKEN") {{/authMethods}} val webService = apiClient.createWebservice({{{classname}}}::class.java) {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.collapseNewlines}}{{{unescapedDescription}}}{{/lambda.collapseNewlines}} {{/allParams}} {{#useCoroutines}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache index 93e2a4bbe966..17913fd3b466 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api_doc.mustache @@ -35,7 +35,7 @@ apiClient.setBearerToken("TOKEN") {{/authMethods}} val webService = apiClient.createWebservice({{{classname}}}::class.java) {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.collapseNewlines}}{{{unescapedDescription}}}{{/lambda.collapseNewlines}} {{/allParams}} {{#useCoroutines}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache index e760a9471370..9352bf7b0696 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-misk/api_doc.mustache @@ -27,7 +27,7 @@ Method | HTTP request | Description {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.collapseNewlines}}{{{unescapedDescription}}}{{/lambda.collapseNewlines}} {{/allParams}} try { {{#returnType}}val result : {{{returnType}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache index e760a9471370..9352bf7b0696 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache @@ -27,7 +27,7 @@ Method | HTTP request | Description {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() {{#allParams}} -val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{unescapedDescription}}} +val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{#lambda.collapseNewlines}}{{{unescapedDescription}}}{{/lambda.collapseNewlines}} {{/allParams}} try { {{#returnType}}val result : {{{returnType}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}