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 de2b05c6be3d..b925719c3786 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 @@ -1310,7 +1310,24 @@ 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"))) + // Escaping for values going into """...""" triple-quoted Kotlin strings. + // Backslash escapes do not work here; a literal $ must be written as ${'$'}. + // Triple quotes can be escaped by breaking them up, e.g. """ becomes ${"\"\"\""}. + // Note: Triple quotes can never be used in annotations as their arguments must be compile-time constants + // hence we can never do the safe escaping. + .put("escapeInTripleQuotedString", (Mustache.Lambda) (fragment, writer) -> writer.write(fragment.execute() + .replace("$", "${'$'}") + .replace("\"\"\"", "${\"\\\"\\\"\\\"\"}") + )); } protected interface DataTypeAssigner { diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache index 323f266e8256..f4ef8692045c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache @@ -1,5 +1,5 @@ val exampleContentType = "{{{contentType}}}" -val exampleContentString = """{{&example}}""" +val exampleContentString = """{{#lambda.escapeInTripleQuotedString}}{{&example}}{{/lambda.escapeInTripleQuotedString}}""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/_response.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/_response.mustache index 477ffc2acda7..291d0462ce88 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/_response.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor2/_response.mustache @@ -1,5 +1,5 @@ val exampleContentType = "{{{contentType}}}" -val exampleContentString = """{{&example}}""" +val exampleContentString = """{{#lambda.escapeInTripleQuotedString}}{{&example}}{{/lambda.escapeInTripleQuotedString}}""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) 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 2b7662531379..55603e6bff9a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -74,7 +74,7 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v }} @Operation( summary = "{{{summary}}}", operationId = "{{{operationId}}}", - description = """{{{unescapedNotes}}}""", + description = "{{#lambda.escapeInNormalString}}{{{unescapedNotes}}}{{/lambda.escapeInNormalString}}", 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}}, security = [ {{#authMethods}}SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes = [ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} ]{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} ]{{/hasAuthMethods}} 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 82608294c6ba..117912bb0f3f 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache @@ -86,7 +86,7 @@ interface {{classname}} { tags = [{{#tags}}"{{{name}}}",{{/tags}}], summary = "{{{summary}}}", operationId = "{{{operationId}}}", - description = """{{{unescapedNotes}}}""", + description = "{{#lambda.escapeInNormalString}}{{{unescapedNotes}}}{{/lambda.escapeInNormalString}}", 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}}, 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..13ce3762dc8f 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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 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 404692bece79..eae194a6bed4 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 = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger1AnnotationLibrary}}{{#deprecated}} @Deprecated(message = ""){{/deprecated}}{{#vendorExtensions.x-field-extra-annotation}} {{{.}}}{{/vendorExtensions.x-field-extra-annotation}}{{#vendorExtensions.x-has-json-setter-nulls-fail}} @field:JsonSetter(nulls = Nulls.FAIL){{/vendorExtensions.x-has-json-setter-nulls-fail}} 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..06a298555d8d 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 = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/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 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..878dbf860c27 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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}") {{/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..f526acf95f00 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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}", `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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 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..93dd2e1a4026 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 = "{{{baseName}}}"{{#isDeprecated}}, deprecated = true{{/isDeprecated}}, description = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 = "{{{baseName}}}", value = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}", {{#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..ec0cb7401ce8 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 = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/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}} 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..285d8d2cb0f0 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 = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/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/httpInterfaceBodyParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/httpInterfaceBodyParams.mustache index e884046f7d6d..f5f5b48b4cd9 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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 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..25cbd86770be 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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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..7e7fc0febfab 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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"{{#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 diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinServerCodegenTest.java index abe3fcc3da50..11a1668786cc 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinServerCodegenTest.java @@ -33,16 +33,8 @@ import static org.openapitools.codegen.TestUtils.assertFileContains; import static org.openapitools.codegen.TestUtils.assertFileNotContains; import static org.openapitools.codegen.languages.AbstractKotlinCodegen.USE_JAKARTA_EE; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.INTERFACE_ONLY; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.JAVALIN5; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.JAVALIN6; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.JAXRS_SPEC; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.RETURN_RESPONSE; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.USE_TAGS; +import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.*; import static org.openapitools.codegen.languages.features.BeanValidationFeatures.USE_BEANVALIDATION; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.DELEGATE_PATTERN; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.KTOR; -import static org.openapitools.codegen.languages.KotlinServerCodegen.Constants.RESOURCES; public class KotlinServerCodegenTest { @@ -751,4 +743,41 @@ public void testFloatingPointMultipleOfValidationUsesTolerance() throws IOExcept "if (intVal % 2 != 0) {" ); } + + @DataProvider(name = "ktorDollarInterpolationLibraries") + private Object[][] ktorDollarInterpolationLibraries() { + return new Object[][]{ + new Object[]{KTOR}, + new Object[]{KTOR2} + }; + } + + /** + * Security regression for CVE-2026-22785 in ktor/ktor2: a response schema example containing + * Kotlin string-interpolation syntax (e.g. {@code ${expr}}) must not survive unescaped into + * the triple-quoted {@code exampleContentString} in the generated API. The fix applies + * {@code lambda.escapeInTripleQuotedString} which replaces every {@code $} with + * {@code ${'$'}}, so interpolation cannot be triggered at runtime. + */ + @Test(description = "CVE-2026-22785 ktor/ktor2: dollar-sign interpolation in response example must be escaped", dataProvider = "ktorDollarInterpolationLibraries") + public void dollarInterpolationInExampleIsBlockedForKtorLibraries(String library) throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + KotlinServerCodegen codegen = new KotlinServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(LIBRARY, library); + + new DefaultGenerator() + .opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/cve-ktor-example-injection.yaml")) + .config(codegen)) + .generate(); + + Path apiFile = Paths.get(output + "/src/main/kotlin/org/openapitools/server/apis/PingApi.kt"); + // Bare Kotlin string interpolation must not appear in the generated file. + assertFileNotContains(apiFile, "${attemptedStringInter}"); + // The dollar sign must be escaped using the ${'$'} idiom for triple-quoted strings. + assertFileContains(apiFile, "${'$'}"); + } } 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 4ac2f195bb74..d42a61049e04 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 @@ -760,13 +760,13 @@ private static void testMultiLineOperationDescription(final boolean isInterfaceO assertFileContains( Paths.get( outputPath + "/src/main/kotlin/org/openapitools/api/" + pingApiFileName), - "description = \"\"\"# Multi-line descriptions\n" - + "\n" - + "This is an example of a multi-line description.\n" - + "\n" - + "It:\n" - + "- has multiple lines\n" - + "- uses Markdown (CommonMark) for rich text representation\"\"\"" + "description = \"# Multi-line descriptions\\n" + + "\\n" + + "This is an example of a multi-line description.\\n" + + "\\n" + + "It:\\n" + + "- has multiple lines\\n" + + "- uses Markdown (CommonMark) for rich text representation\"" ); } @@ -6678,4 +6678,79 @@ public void schemaMappingWithNullableAllOfRendersNullableKotlinProperty() throws String content = Files.readString(myObjectFile.toPath()); assertThat(content).contains("com.example.ExternalModel?"); } + + /** + * Security regression test for CVE-2026-22785: a malicious OpenAPI description containing + * {@code """} must not break out of the annotation string and inject arbitrary Kotlin/Spring + * declarations into the generated controller. + */ + @Test(description = "CVE-2026-22785: triple-quote in description must not inject code into generated controller") + public void tripleQuoteInjectionInDescriptionIsBlocked() 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/cve-description-injection.yaml")) + .config(codegen)) + .generate(); + + Path apiFile = Paths.get(output + "/src/main/kotlin/org/openapitools/api/PingApiController.kt"); + // With the fix, the injected annotation appears only as an escaped string value + // (e.g. @GetMapping(\"/pwn\")), never as unescaped annotation code with plain double quotes. + assertFileNotContains(apiFile, "@GetMapping(\"/pwn\")"); + } + + /** + * Security regression for KDoc comment injection: a description containing {@code *}{@code /} + * must be sanitised to {@code *_/} (via {@code escapeUnsafeCharacters}) so it cannot + * prematurely close the KDoc block comment and expose attacker content as live Kotlin code. + */ + @Test(description = "Comment-ending */ in description must become *_/ in generated KDoc service comments") + public void commentEndingInDescriptionIsSanitized() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.setServiceInterface(true); + + new DefaultGenerator() + .opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml")) + .config(codegen)) + .generate(); + + // The service file contains KDoc comments built from op.notes, which goes through + // escapeUnsafeCharacters(): */ must become *_/ so the block comment is never closed early. + Path serviceFile = Paths.get(output + "/src/main/kotlin/org/openapitools/api/ItemsApiService.kt"); + assertFileContains(serviceFile, "*_/"); + } + + @Test(description = "Discriminator interface property examples are escaped in generated interface annotations") + public void discriminatorInterfaceExamplesAreEscaped() 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/cve-example-injection-discriminator.yaml")) + .config(codegen)) + .generate(); + + Path animalFile = Paths.get(output + "/src/main/kotlin/org/openapitools/model/Animal.kt"); + + assertFileContains( + animalFile, + "@get:Schema(example = \"CAT\\\"@GetMapping(\\\"/pwn\\\")\", requiredMode = Schema.RequiredMode.REQUIRED", + "@get:Schema(example = \"nick\\\"@GetMapping(\\\"/opt\\\")\", description = \"\")" + ); + assertFileNotContains(animalFile, "@GetMapping(\"/pwn\")", "@GetMapping(\"/opt\")"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-description-injection.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-description-injection.yaml new file mode 100644 index 000000000000..55844225f704 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-description-injection.yaml @@ -0,0 +1,22 @@ +openapi: "3.0.3" +info: + title: Kotlin-Spring description injection test + version: "1.0.0" +paths: + /ping: + get: + tags: + - Injection + operationId: ping + summary: Ping + description: | + """ + ) + @GetMapping("/pwn") + fun pwn(): String { + return "OPENAPI_GENERATOR_INJECTED_HANDLER" + } + @Operation(description = """ + responses: + "200": + description: OK diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-example-injection-discriminator.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-example-injection-discriminator.yaml new file mode 100644 index 000000000000..7d0a00a1597b --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-example-injection-discriminator.yaml @@ -0,0 +1,41 @@ +openapi: 3.0.3 +info: + title: Kotlin-Spring interface example escaping test + version: "1.0.0" +paths: {} +components: + schemas: + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + declawed: + type: boolean + Animal: + type: object + required: + - className + discriminator: + propertyName: className + mapping: + DOG: '#/components/schemas/Dog' + CAT: '#/components/schemas/Cat' + properties: + className: + type: string + example: | + CAT" + @GetMapping("/pwn") + color: + type: string + example: | + nick" + @GetMapping("/opt") diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-ktor-example-injection.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-ktor-example-injection.yaml new file mode 100644 index 000000000000..44597cfd07e6 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-ktor-example-injection.yaml @@ -0,0 +1,17 @@ +openapi: "3.0.3" +info: + title: Ktor example injection test + version: "1.0.0" +paths: + /ping: + get: + operationId: ping + tags: + - Ping + responses: + "200": + content: + application/json: + schema: + type: string + example: " - ${attemptedStringInter}\backslash\"\"\"attemptToBreakOutOfMultiline" 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..f07e530bcbb3 --- /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 diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt index b1d3383a2feb..09b69a1f46c5 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt @@ -36,7 +36,7 @@ class FakeApiController() { @Operation( summary = "annotate", operationId = "annotations", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "OK") ] ) @@ -55,7 +55,7 @@ class FakeApiController() { @Operation( summary = "Updates a pet in the store with form data (number)", operationId = "updatePetWithFormNumber", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt index add6ff045ac4..da6a77c9b5d8 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -37,7 +37,7 @@ class PetApiController() { @Operation( summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "405", description = "Invalid input") ], @@ -59,7 +59,7 @@ class PetApiController() { @Operation( summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid pet value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -79,7 +79,7 @@ class PetApiController() { @Operation( summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") ], @@ -100,7 +100,7 @@ class PetApiController() { @Operation( summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") ], @@ -122,7 +122,7 @@ class PetApiController() { @Operation( summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -144,7 +144,7 @@ class PetApiController() { @Operation( summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -168,7 +168,7 @@ class PetApiController() { @Operation( summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -190,7 +190,7 @@ class PetApiController() { @Operation( summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt index e9e3620a9e75..a2db31980e75 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -36,7 +36,7 @@ class StoreApiController() { @Operation( summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") ] @@ -55,7 +55,7 @@ class StoreApiController() { @Operation( summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], security = [ SecurityRequirement(name = "api_key") ] @@ -73,7 +73,7 @@ class StoreApiController() { @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -94,7 +94,7 @@ class StoreApiController() { @Operation( summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") ] diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt index b59055789659..5eaa964b8a8e 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -36,7 +36,7 @@ class UserApiController() { @Operation( summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -56,7 +56,7 @@ class UserApiController() { @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -76,7 +76,7 @@ class UserApiController() { @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -96,7 +96,7 @@ class UserApiController() { @Operation( summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") ], @@ -116,7 +116,7 @@ class UserApiController() { @Operation( summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -137,7 +137,7 @@ class UserApiController() { @Operation( summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") ] @@ -158,7 +158,7 @@ class UserApiController() { @Operation( summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -175,7 +175,7 @@ class UserApiController() { @Operation( summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") ], diff --git a/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt b/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt index 64844ce66fb6..7242518f7925 100644 --- a/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt +++ b/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt @@ -36,7 +36,7 @@ class TestApiController() { @Operation( summary = "", operationId = "testPost", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "Successful operation") ] ) diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt index e85f92fcef3a..d4046045c792 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -45,7 +45,7 @@ interface PetApi { tags = ["pet",], summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "405", description = "Invalid input") @@ -69,7 +69,7 @@ interface PetApi { tags = ["pet",], summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid pet value") ], @@ -91,7 +91,7 @@ interface PetApi { tags = ["pet",], summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") @@ -114,7 +114,7 @@ interface PetApi { tags = ["pet",], summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") @@ -138,7 +138,7 @@ interface PetApi { tags = ["pet",], summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -162,7 +162,7 @@ interface PetApi { tags = ["pet",], summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -188,7 +188,7 @@ interface PetApi { tags = ["pet",], summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], @@ -212,7 +212,7 @@ interface PetApi { tags = ["pet",], summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt index c18396ffe558..6092c7851175 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -44,7 +44,7 @@ interface StoreApi { tags = ["store",], summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") @@ -65,7 +65,7 @@ interface StoreApi { tags = ["store",], summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], @@ -85,7 +85,7 @@ interface StoreApi { tags = ["store",], summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -108,7 +108,7 @@ interface StoreApi { tags = ["store",], summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt index fff346fae41b..79900ee96a3c 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -44,7 +44,7 @@ interface UserApi { tags = ["user",], summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -66,7 +66,7 @@ interface UserApi { tags = ["user",], summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -88,7 +88,7 @@ interface UserApi { tags = ["user",], summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -110,7 +110,7 @@ interface UserApi { tags = ["user",], summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") @@ -132,7 +132,7 @@ interface UserApi { tags = ["user",], summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -155,7 +155,7 @@ interface UserApi { tags = ["user",], summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") @@ -178,7 +178,7 @@ interface UserApi { tags = ["user",], summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -197,7 +197,7 @@ interface UserApi { tags = ["user",], summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 3172c6b0a90f..a8f0a55818a5 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -44,7 +44,7 @@ interface PetApi { tags = ["pet",], summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "405", description = "Invalid input") @@ -68,7 +68,7 @@ interface PetApi { tags = ["pet",], summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid pet value") ], @@ -90,7 +90,7 @@ interface PetApi { tags = ["pet",], summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") @@ -113,7 +113,7 @@ interface PetApi { tags = ["pet",], summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") @@ -137,7 +137,7 @@ interface PetApi { tags = ["pet",], summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -161,7 +161,7 @@ interface PetApi { tags = ["pet",], summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -187,7 +187,7 @@ interface PetApi { tags = ["pet",], summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], @@ -211,7 +211,7 @@ interface PetApi { tags = ["pet",], summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt index ce81329bb3be..e60594164640 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -43,7 +43,7 @@ interface StoreApi { tags = ["store",], summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") @@ -64,7 +64,7 @@ interface StoreApi { tags = ["store",], summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], @@ -84,7 +84,7 @@ interface StoreApi { tags = ["store",], summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -107,7 +107,7 @@ interface StoreApi { tags = ["store",], summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index 5c6b0adfc1a2..2aed2bd9a363 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -43,7 +43,7 @@ interface UserApi { tags = ["user",], summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -65,7 +65,7 @@ interface UserApi { tags = ["user",], summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -87,7 +87,7 @@ interface UserApi { tags = ["user",], summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -109,7 +109,7 @@ interface UserApi { tags = ["user",], summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") @@ -131,7 +131,7 @@ interface UserApi { tags = ["user",], summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -154,7 +154,7 @@ interface UserApi { tags = ["user",], summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") @@ -177,7 +177,7 @@ interface UserApi { tags = ["user",], summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], @@ -196,7 +196,7 @@ interface UserApi { tags = ["user",], summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt index e18012463efb..ad60def2e455 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -37,7 +37,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -57,7 +57,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid pet value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -77,7 +77,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") ], @@ -98,7 +98,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") ], @@ -120,7 +120,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -142,7 +142,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Pet not found"), @@ -164,7 +164,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -186,7 +186,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 1884db667f9c..ad4105a5eb68 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -36,7 +36,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") ] @@ -55,7 +55,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], security = [ SecurityRequirement(name = "api_key") ] @@ -73,7 +73,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -94,7 +94,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") ] diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt index 7dd168a5cf20..98aa7380089a 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -36,7 +36,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -54,7 +54,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -72,7 +72,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -90,7 +90,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") ] @@ -109,7 +109,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -130,7 +130,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") ] @@ -151,7 +151,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -167,7 +167,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") ] diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt index dd50dc75d4d9..632484c3586f 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt @@ -37,7 +37,7 @@ class MultipartMixedApiController() { @Operation( summary = "", operationId = "multipartMixed", - description = """Mixed MultipartFile test""", + description = "Mixed MultipartFile test", responses = [ ApiResponse(responseCode = "204", description = "Successful operation") ] ) diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt index 165920c56390..8bd764e8d4b0 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -38,7 +38,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "405", description = "Invalid input") ], @@ -60,7 +60,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid pet value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -80,7 +80,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") ], @@ -101,7 +101,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") ], @@ -123,7 +123,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -145,7 +145,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -169,7 +169,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -191,7 +191,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 03750f1b7577..0c596fed2cce 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -37,7 +37,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") ] @@ -56,7 +56,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], security = [ SecurityRequirement(name = "api_key") ] @@ -74,7 +74,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -95,7 +95,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") ] diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt index d677e66a952f..01f57f0c846f 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -37,7 +37,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -57,7 +57,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -77,7 +77,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -97,7 +97,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") ], @@ -117,7 +117,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -138,7 +138,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") ] @@ -159,7 +159,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -176,7 +176,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") ], diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt index 682a15ef48e1..f8712cfdf691 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -38,7 +38,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "405", description = "Invalid input") ], @@ -60,7 +60,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid pet value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -80,7 +80,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") ], @@ -101,7 +101,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") ], @@ -123,7 +123,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -145,7 +145,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -169,7 +169,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -191,7 +191,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 03750f1b7577..0c596fed2cce 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -37,7 +37,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") ] @@ -56,7 +56,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], security = [ SecurityRequirement(name = "api_key") ] @@ -74,7 +74,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -95,7 +95,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") ] diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt index d677e66a952f..01f57f0c846f 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -37,7 +37,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -57,7 +57,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -77,7 +77,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -97,7 +97,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") ], @@ -117,7 +117,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -138,7 +138,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") ] @@ -159,7 +159,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ], security = [ SecurityRequirement(name = "api_key") ] @@ -176,7 +176,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") ], diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeApi.kt index 6ec48e1d90d1..42ef9a76e87c 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeApi.kt @@ -41,7 +41,7 @@ interface FakeApi { tags = ["fake",], summary = "", operationId = "fakeCookieSuggestion", - description = """Test list of objects with additional values matching data from cookie""", + description = "Test list of objects with additional values matching data from cookie", responses = [ ApiResponse(responseCode = "200", description = "List of pets resolved from suggestion", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]) ] diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeClassnameTestApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeClassnameTestApi.kt index 2fd6e7979e86..9c4ac1abcf9f 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeClassnameTestApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FakeClassnameTestApi.kt @@ -41,7 +41,7 @@ interface FakeClassnameTestApi { tags = ["fake_classname_tags 123#$%^",], summary = "To test class name in snake case", operationId = "testClassname", - description = """To test class name in snake case""", + description = "To test class name in snake case", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Client::class))]) ], diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FooApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FooApi.kt index 046330cea458..46970fcea1c8 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FooApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/FooApi.kt @@ -41,7 +41,7 @@ interface FooApi { tags = ["default",], summary = "", operationId = "fooGet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "response", content = [Content(schema = Schema(implementation = FooGetDefaultResponse::class))]) ] diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt index c3e04cd1340b..77dbfead5557 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -42,7 +42,7 @@ interface PetApi { tags = ["pet",], summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "Successful operation"), ApiResponse(responseCode = "405", description = "Invalid input") @@ -65,7 +65,7 @@ interface PetApi { tags = ["pet",], summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "Successful operation"), ApiResponse(responseCode = "400", description = "Invalid pet value") @@ -88,7 +88,7 @@ interface PetApi { tags = ["pet",], summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") @@ -111,7 +111,7 @@ interface PetApi { tags = ["pet",], summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") @@ -135,7 +135,7 @@ interface PetApi { tags = ["pet",], summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -159,7 +159,7 @@ interface PetApi { tags = ["pet",], summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "Successful operation"), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -184,7 +184,7 @@ interface PetApi { tags = ["pet",], summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "Successful operation"), ApiResponse(responseCode = "405", description = "Invalid input") @@ -209,7 +209,7 @@ interface PetApi { tags = ["pet",], summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/StoreApi.kt index 4340b902bec2..6ec453f9abc5 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -41,7 +41,7 @@ interface StoreApi { tags = ["store",], summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") @@ -62,7 +62,7 @@ interface StoreApi { tags = ["store",], summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], @@ -82,7 +82,7 @@ interface StoreApi { tags = ["store",], summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -105,7 +105,7 @@ interface StoreApi { tags = ["store",], summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/UserApi.kt index 37506ccbab0d..e2440658d353 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -41,7 +41,7 @@ interface UserApi { tags = ["user",], summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] @@ -62,7 +62,7 @@ interface UserApi { tags = ["user",], summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] @@ -83,7 +83,7 @@ interface UserApi { tags = ["user",], summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] @@ -104,7 +104,7 @@ interface UserApi { tags = ["user",], summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") @@ -125,7 +125,7 @@ interface UserApi { tags = ["user",], summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -148,7 +148,7 @@ interface UserApi { tags = ["user",], summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") @@ -171,7 +171,7 @@ interface UserApi { tags = ["user",], summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] @@ -189,7 +189,7 @@ interface UserApi { tags = ["user",], summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt index 98c84939c6dd..2def93621468 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -37,7 +37,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Add a new pet to the store", operationId = "addPet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -57,7 +57,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Deletes a pet", operationId = "deletePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid pet value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -79,7 +79,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by status", operationId = "findPetsByStatus", - description = """Multiple status values can be provided with comma separated strings""", + description = "Multiple status values can be provided with comma separated strings", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid status value") ], @@ -100,7 +100,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Finds Pets by tags", operationId = "findPetsByTags", - description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(array = ArraySchema(schema = Schema(implementation = Pet::class)))]), ApiResponse(responseCode = "400", description = "Invalid tag value") ], @@ -122,7 +122,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Find pet by ID", operationId = "getPetById", - description = """Returns a single pet""", + description = "Returns a single pet", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Pet::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -144,7 +144,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Update an existing pet", operationId = "updatePet", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Pet not found"), @@ -166,7 +166,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "Updates a pet in the store with form data", operationId = "updatePetWithForm", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "405", description = "Invalid input") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] @@ -188,7 +188,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( summary = "uploads an image", operationId = "uploadFile", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = ModelApiResponse::class))]) ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 1884db667f9c..ad4105a5eb68 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -36,7 +36,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Delete purchase order by ID", operationId = "deleteOrder", - description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", responses = [ ApiResponse(responseCode = "400", description = "Invalid ID supplied"), ApiResponse(responseCode = "404", description = "Order not found") ] @@ -55,7 +55,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Returns pet inventories by status", operationId = "getInventory", - description = """Returns a map of status codes to quantities""", + description = "Returns a map of status codes to quantities", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.collections.Map::class))]) ], security = [ SecurityRequirement(name = "api_key") ] @@ -73,7 +73,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -94,7 +94,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Place an order for a pet", operationId = "placeOrder", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid Order") ] diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt index 7dd168a5cf20..98aa7380089a 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -36,7 +36,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Create user", operationId = "createUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -54,7 +54,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithArrayInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -72,7 +72,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Creates list of users with given input array", operationId = "createUsersWithListInput", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -90,7 +90,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Delete user", operationId = "deleteUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid username supplied"), ApiResponse(responseCode = "404", description = "User not found") ] @@ -109,7 +109,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Get user by user name", operationId = "getUserByName", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = User::class))]), ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -130,7 +130,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs user into the system", operationId = "loginUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = kotlin.String::class))]), ApiResponse(responseCode = "400", description = "Invalid username/password supplied") ] @@ -151,7 +151,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Logs out current logged in user session", operationId = "logoutUser", - description = """""", + description = "", responses = [ ApiResponse(responseCode = "200", description = "successful operation") ] ) @@ -167,7 +167,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @Operation( summary = "Updated user", operationId = "updateUser", - description = """This can only be done by the logged in user.""", + description = "This can only be done by the logged in user.", responses = [ ApiResponse(responseCode = "400", description = "Invalid user supplied"), ApiResponse(responseCode = "404", description = "User not found") ]