From feadc56d47c965a0e3bc3c59c609e6a63f336852 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Fri, 5 Jun 2026 21:46:39 +0200 Subject: [PATCH 01/15] fix(kotlin): prevent triple-quoted string injection across Kotlin generators (CVE-2026-22785) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Any triple-quoted Kotlin string rendered from an untrusted OpenAPI value is a code-injection sink: a description or example containing """ closes the string, allowing attacker-controlled Kotlin declarations in the generated code. Add a new scapeInNormalString mustache lambda to AbstractKotlinCodegen that escapes backslashes, dollar signs, double-quotes, and newlines, making values safe to embed in regular double-quoted Kotlin strings. Since AbstractKotlinCodegen is the parent of all Kotlin generators, the lambda is available everywhere. Fix all identified sinks: kotlin-spring (CVE-2026-22785): api.mustache, apiInterface.mustache: description = """{{{unescapedNotes}}}""" -> description = "{{#lambda.escapeInNormalString}}{{{unescapedNotes}}}{{/lambda.escapeInNormalString}}" kotlin-server / ktor, ktor2: libraries/ktor/_response.mustache, libraries/ktor2/_response.mustache: val exampleContentString = """{{&example}}""" -> val exampleContentString = "{{#lambda.escapeInNormalString}}{{&example}}{{/lambda.escapeInNormalString}}" Tests: - Add regression test tripleQuoteInjectionInDescriptionIsBlocked (CVE-2026-22785) - Add commentEndingInDescriptionIsSanitized (KDoc */ injection) - Update multiLineOperationDescription assertion for new escaped format - Add test fixtures cve-description-injection.yaml and issue20502-kotlin-string-escaping.yaml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../languages/AbstractKotlinCodegen.java | 10 +- .../libraries/ktor/_response.mustache | 2 +- .../libraries/ktor2/_response.mustache | 2 +- .../main/resources/kotlin-spring/api.mustache | 2 +- .../kotlin-spring/apiInterface.mustache | 2 +- .../spring/KotlinSpringServerCodegenTest.java | 65 ++++- .../3_0/kotlin/cve-description-injection.yaml | 22 ++ .../issue20502-kotlin-string-escaping.yaml | 225 ++++++++++++++++++ 8 files changed, 318 insertions(+), 12 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/kotlin/cve-description-injection.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/kotlin/issue20502-kotlin-string-escaping.yaml 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..601ff8f1ad96 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,15 @@ 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"))); } 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..ca39b2272148 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.escapeInNormalString}}{{&example}}{{/lambda.escapeInNormalString}}" 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..4713df0d70b9 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.escapeInNormalString}}{{&example}}{{/lambda.escapeInNormalString}}" 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/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..6c6e0756a526 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,55 @@ 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, "*_/"); + } } 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/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 From 6cadf64372d5c19786dc9d0d805f325e31addd3d Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Fri, 5 Jun 2026 23:46:42 +0200 Subject: [PATCH 02/15] test(kotlin-server): add CVE-2026-22785 regression tests for ktor and ktor2 Add tests that verify exampleContentString in _response.mustache is rendered as a normal double-quoted string (not triple-quoted), blocking triple-quote injection via response example values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../kotlin/KotlinServerCodegenTest.java | 51 +++++++++++++++++++ .../kotlin/cve-ktor-example-injection.yaml | 17 +++++++ 2 files changed, 68 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_0/kotlin/cve-ktor-example-injection.yaml 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..2cbb86c9affb 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 @@ -751,4 +751,55 @@ public void testFloatingPointMultipleOfValidationUsesTolerance() throws IOExcept "if (intVal % 2 != 0) {" ); } + + /** + * Security regression for CVE-2026-22785 in ktor: a response schema example containing + * {@code """} must not break out of the triple-quoted Kotlin string in the generated API. + * The fix changes {@code val exampleContentString = """..."""} to a double-quoted string + * with proper escaping via {@code lambda.escapeInNormalString}. + */ + @Test(description = "CVE-2026-22785 ktor: triple-quote in response example must not inject code (ktor library)") + public void ktorTripleQuoteInExampleIsBlocked() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + KotlinServerCodegen codegen = new KotlinServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(LIBRARY, KTOR); + + 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"); + // With the fix exampleContentString must use a normal double-quoted string, not triple-quoted. + assertFileNotContains(apiFile, "exampleContentString = \"\"\""); + assertFileContains(apiFile, "exampleContentString = \""); + } + + /** + * Security regression for CVE-2026-22785 in ktor2: same check as above for the ktor2 library. + */ + @Test(description = "CVE-2026-22785 ktor2: triple-quote in response example must not inject code (ktor2 library)") + public void ktor2TripleQuoteInExampleIsBlocked() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + KotlinServerCodegen codegen = new KotlinServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(LIBRARY, "ktor2"); + + 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"); + // With the fix exampleContentString must use a normal double-quoted string, not triple-quoted. + assertFileNotContains(apiFile, "exampleContentString = \"\"\""); + assertFileContains(apiFile, "exampleContentString = \""); + } } 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..610394194f84 --- /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: '"""injected"""' From c74a5c0def9cb305f4749b3c2c915fd64fa2ec61 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sat, 6 Jun 2026 00:01:05 +0200 Subject: [PATCH 03/15] update samples --- .../org/openapitools/server/apis/PetApi.kt | 92 +------------ .../org/openapitools/server/apis/StoreApi.kt | 18 +-- .../org/openapitools/server/apis/UserApi.kt | 11 +- .../org/openapitools/server/apis/PetApi.kt | 92 +------------ .../org/openapitools/server/apis/StoreApi.kt | 18 +-- .../org/openapitools/server/apis/UserApi.kt | 11 +- .../org/openapitools/server/apis/PetApi.kt | 98 +------------- .../org/openapitools/server/apis/StoreApi.kt | 18 +-- .../org/openapitools/server/apis/UserApi.kt | 11 +- .../org/openapitools/server/apis/PetApi.kt | 128 +----------------- .../org/openapitools/server/apis/StoreApi.kt | 18 +-- .../org/openapitools/server/apis/UserApi.kt | 11 +- .../org/openapitools/api/FakeApiController.kt | 4 +- .../org/openapitools/api/PetApiController.kt | 16 +-- .../openapitools/api/StoreApiController.kt | 8 +- .../org/openapitools/api/UserApiController.kt | 16 +-- .../org/openapitools/api/TestApiController.kt | 2 +- .../kotlin/org/openapitools/api/PetApi.kt | 16 +-- .../kotlin/org/openapitools/api/StoreApi.kt | 8 +- .../kotlin/org/openapitools/api/UserApi.kt | 16 +-- .../kotlin/org/openapitools/api/PetApi.kt | 16 +-- .../kotlin/org/openapitools/api/StoreApi.kt | 8 +- .../kotlin/org/openapitools/api/UserApi.kt | 16 +-- .../org/openapitools/api/PetApiController.kt | 16 +-- .../openapitools/api/StoreApiController.kt | 8 +- .../org/openapitools/api/UserApiController.kt | 16 +-- .../api/MultipartMixedApiController.kt | 2 +- .../org/openapitools/api/PetApiController.kt | 16 +-- .../openapitools/api/StoreApiController.kt | 8 +- .../org/openapitools/api/UserApiController.kt | 16 +-- .../org/openapitools/api/PetApiController.kt | 16 +-- .../openapitools/api/StoreApiController.kt | 8 +- .../org/openapitools/api/UserApiController.kt | 16 +-- .../kotlin/org/openapitools/api/FakeApi.kt | 2 +- .../openapitools/api/FakeClassnameTestApi.kt | 2 +- .../kotlin/org/openapitools/api/FooApi.kt | 2 +- .../kotlin/org/openapitools/api/PetApi.kt | 16 +-- .../kotlin/org/openapitools/api/StoreApi.kt | 8 +- .../kotlin/org/openapitools/api/UserApi.kt | 16 +-- .../org/openapitools/api/PetApiController.kt | 16 +-- .../openapitools/api/StoreApiController.kt | 8 +- .../org/openapitools/api/UserApiController.kt | 16 +-- 42 files changed, 198 insertions(+), 662 deletions(-) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 61debae8049e..4c32bdacfaf8 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -56,39 +56,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -105,39 +73,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -154,23 +90,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -207,11 +127,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "code" : 0, - "type" : "type", - "message" : "message" - }""" + val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 0be923df150f..ad05b3e0d94d 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -44,14 +44,7 @@ fun Route.StoreApi() { } get { getOrderById -> val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -62,14 +55,7 @@ fun Route.StoreApi() { } post { placeOrder -> val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 3d5ba9f81352..8f72d2bdf324 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -46,16 +46,7 @@ fun Route.UserApi() { } get { getUserByName -> val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "username" : "username", - "firstName" : "firstName", - "lastName" : "lastName", - "email" : "email", - "password" : "password", - "phone" : "phone", - "userStatus" : 6 - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 61debae8049e..4c32bdacfaf8 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -56,39 +56,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -105,39 +73,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -154,23 +90,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -207,11 +127,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "code" : 0, - "type" : "type", - "message" : "message" - }""" + val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 0be923df150f..ad05b3e0d94d 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -44,14 +44,7 @@ fun Route.StoreApi() { } get { getOrderById -> val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -62,14 +55,7 @@ fun Route.StoreApi() { } post { placeOrder -> val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 3d5ba9f81352..8f72d2bdf324 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -46,16 +46,7 @@ fun Route.UserApi() { } get { getUserByName -> val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "username" : "username", - "firstName" : "firstName", - "lastName" : "lastName", - "email" : "email", - "password" : "password", - "phone" : "phone", - "userStatus" : 6 - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 6f357ec18ae9..0820dab6605a 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -60,39 +60,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -110,39 +78,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -171,23 +107,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -227,11 +147,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "code" : 0, - "type" : "type", - "message" : "message" - }""" + val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -249,11 +165,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "code" : 0, - "type" : "type", - "message" : "message" - }""" + val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 02e0b8daa27f..5885cf13a19b 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -48,14 +48,7 @@ fun Route.StoreApi() { get { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -67,14 +60,7 @@ fun Route.StoreApi() { post { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index db4f27d0eeda..61786057fa15 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -52,16 +52,7 @@ fun Route.UserApi() { get { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "username" : "username", - "firstName" : "firstName", - "lastName" : "lastName", - "email" : "email", - "password" : "password", - "phone" : "phone", - "userStatus" : 6 - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index a16ffae5996a..0c385a917215 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -38,23 +38,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -83,39 +67,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -133,39 +85,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """[ { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }, { - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - } ]""" + val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -183,23 +103,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -217,23 +121,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "category" : { - "id" : 6, - "name" : "name" - }, - "name" : "doggie", - "photoUrls" : [ "photoUrls", "photoUrls" ], - "tags" : [ { - "id" : 1, - "name" : "name" - }, { - "id" : 1, - "name" : "name" - } ], - "status" : "available" - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -262,11 +150,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """{ - "code" : 0, - "type" : "type", - "message" : "message" - }""" + val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 02e0b8daa27f..5885cf13a19b 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -48,14 +48,7 @@ fun Route.StoreApi() { get { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -67,14 +60,7 @@ fun Route.StoreApi() { post { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "petId" : 6, - "quantity" : 1, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "status" : "placed", - "complete" : false - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 19a271ae530b..20c286203caa 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -76,16 +76,7 @@ fun Route.UserApi() { get { val exampleContentType = "application/json" - val exampleContentString = """{ - "id" : 0, - "username" : "username", - "firstName" : "firstName", - "lastName" : "lastName", - "email" : "email", - "password" : "password", - "phone" : "phone", - "userStatus" : 6 - }""" + val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) 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") ] From 43cea0a57954ce7f3671101ac72f55029f0058c6 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sat, 6 Jun 2026 02:16:06 +0200 Subject: [PATCH 04/15] fix(kotlin-server): prevent dollar-sign interpolation injection in ktor triple-quoted strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A Kotlin triple-quoted string still supports dollar-sign string interpolation (\). An untrusted OpenAPI example value containing \ would therefore be evaluated at runtime inside xampleContentString. Add scapeInTripleQuotedString lambda to AbstractKotlinCodegen that replaces every \$ with \, preventing interpolation without switching away from triple-quoted strings. Apply it to both ktor and ktor2 _response.mustache. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../languages/AbstractKotlinCodegen.java | 6 ++- .../libraries/ktor/_response.mustache | 2 +- .../libraries/ktor2/_response.mustache | 2 +- .../kotlin/KotlinServerCodegenTest.java | 41 ++++++++----------- .../kotlin/cve-ktor-example-injection.yaml | 2 +- 5 files changed, 26 insertions(+), 27 deletions(-) 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 601ff8f1ad96..ceac1fc168f4 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 @@ -1318,7 +1318,11 @@ protected ImmutableMap.Builder addMustacheLambdas() { .replace("$", "\\$") .replace("\"", "\\\"") .replace("\n", "\\n") - .replace("\r", "\\r"))); + .replace("\r", "\\r"))) + // Escaping for values going into """...""" triple-quoted Kotlin strings. + // Backslash escapes do not work here; a literal $ must be written as ${'$'}. + .put("escapeInTripleQuotedString", (Mustache.Lambda) (fragment, writer) -> writer.write(fragment.execute() + .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 ca39b2272148..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 = "{{#lambda.escapeInNormalString}}{{&example}}{{/lambda.escapeInNormalString}}" +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 4713df0d70b9..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 = "{{#lambda.escapeInNormalString}}{{&example}}{{/lambda.escapeInNormalString}}" +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/test/java/org/openapitools/codegen/kotlin/KotlinServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinServerCodegenTest.java index 2cbb86c9affb..7b6601fdcc43 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 { @@ -754,12 +746,13 @@ public void testFloatingPointMultipleOfValidationUsesTolerance() throws IOExcept /** * Security regression for CVE-2026-22785 in ktor: a response schema example containing - * {@code """} must not break out of the triple-quoted Kotlin string in the generated API. - * The fix changes {@code val exampleContentString = """..."""} to a double-quoted string - * with proper escaping via {@code lambda.escapeInNormalString}. + * 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: triple-quote in response example must not inject code (ktor library)") - public void ktorTripleQuoteInExampleIsBlocked() throws IOException { + @Test(description = "CVE-2026-22785 ktor: dollar-sign interpolation in response example must be escaped (ktor library)") + public void ktorDollarInterpolationInExampleIsBlocked() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); @@ -774,22 +767,23 @@ public void ktorTripleQuoteInExampleIsBlocked() throws IOException { .generate(); Path apiFile = Paths.get(output + "/src/main/kotlin/org/openapitools/server/apis/PingApi.kt"); - // With the fix exampleContentString must use a normal double-quoted string, not triple-quoted. - assertFileNotContains(apiFile, "exampleContentString = \"\"\""); - assertFileContains(apiFile, "exampleContentString = \""); + // 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, "${'$'}"); } /** * Security regression for CVE-2026-22785 in ktor2: same check as above for the ktor2 library. */ - @Test(description = "CVE-2026-22785 ktor2: triple-quote in response example must not inject code (ktor2 library)") - public void ktor2TripleQuoteInExampleIsBlocked() throws IOException { + @Test(description = "CVE-2026-22785 ktor2: dollar-sign interpolation in response example must be escaped (ktor2 library)") + public void ktor2DollarInterpolationInExampleIsBlocked() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); KotlinServerCodegen codegen = new KotlinServerCodegen(); codegen.setOutputDir(output.getAbsolutePath()); - codegen.additionalProperties().put(LIBRARY, "ktor2"); + codegen.additionalProperties().put(LIBRARY, KTOR2); new DefaultGenerator() .opts(new ClientOptInput() @@ -798,8 +792,9 @@ public void ktor2TripleQuoteInExampleIsBlocked() throws IOException { .generate(); Path apiFile = Paths.get(output + "/src/main/kotlin/org/openapitools/server/apis/PingApi.kt"); - // With the fix exampleContentString must use a normal double-quoted string, not triple-quoted. - assertFileNotContains(apiFile, "exampleContentString = \"\"\""); - assertFileContains(apiFile, "exampleContentString = \""); + // 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/resources/3_0/kotlin/cve-ktor-example-injection.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/cve-ktor-example-injection.yaml index 610394194f84..44597cfd07e6 100644 --- 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 @@ -14,4 +14,4 @@ paths: application/json: schema: type: string - example: '"""injected"""' + example: " - ${attemptedStringInter}\backslash\"\"\"attemptToBreakOutOfMultiline" From 7e2bb91613920a9726bc72c1aa8d2149c3e3bfd5 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sat, 6 Jun 2026 02:26:41 +0200 Subject: [PATCH 05/15] update samples --- .../kotlin/org/openapitools/server/apis/PetApi.kt | 8 ++++---- .../kotlin/org/openapitools/server/apis/StoreApi.kt | 4 ++-- .../kotlin/org/openapitools/server/apis/UserApi.kt | 2 +- .../kotlin/org/openapitools/server/apis/PetApi.kt | 8 ++++---- .../kotlin/org/openapitools/server/apis/StoreApi.kt | 4 ++-- .../kotlin/org/openapitools/server/apis/UserApi.kt | 2 +- .../kotlin/org/openapitools/server/apis/PetApi.kt | 10 +++++----- .../kotlin/org/openapitools/server/apis/StoreApi.kt | 4 ++-- .../kotlin/org/openapitools/server/apis/UserApi.kt | 2 +- .../kotlin/org/openapitools/server/apis/PetApi.kt | 12 ++++++------ .../kotlin/org/openapitools/server/apis/StoreApi.kt | 4 ++-- .../kotlin/org/openapitools/server/apis/UserApi.kt | 2 +- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 4c32bdacfaf8..c0cbed934027 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -56,7 +56,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -73,7 +73,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -90,7 +90,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -127,7 +127,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index ad05b3e0d94d..6f82cf077500 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -44,7 +44,7 @@ fun Route.StoreApi() { } get { getOrderById -> val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -55,7 +55,7 @@ fun Route.StoreApi() { } post { placeOrder -> val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 8f72d2bdf324..c0ac3b029823 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -46,7 +46,7 @@ fun Route.UserApi() { } get { getUserByName -> val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 4c32bdacfaf8..c0cbed934027 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -56,7 +56,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -73,7 +73,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -90,7 +90,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -127,7 +127,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index ad05b3e0d94d..6f82cf077500 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -44,7 +44,7 @@ fun Route.StoreApi() { } get { getOrderById -> val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -55,7 +55,7 @@ fun Route.StoreApi() { } post { placeOrder -> val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 8f72d2bdf324..c0ac3b029823 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -46,7 +46,7 @@ fun Route.UserApi() { } get { getUserByName -> val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 0820dab6605a..cd72a1af6472 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -60,7 +60,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -78,7 +78,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -107,7 +107,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -147,7 +147,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -165,7 +165,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 5885cf13a19b..505948142462 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -48,7 +48,7 @@ fun Route.StoreApi() { get { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -60,7 +60,7 @@ fun Route.StoreApi() { post { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 61786057fa15..20ac7da01bf0 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -52,7 +52,7 @@ fun Route.UserApi() { get { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 0c385a917215..3c54fd787c61 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -38,7 +38,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -67,7 +67,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -85,7 +85,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "[ {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}, {\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n} ]" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -103,7 +103,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -121,7 +121,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"category\" : {\n \"id\" : 6,\n \"name\" : \"name\"\n },\n \"name\" : \"doggie\",\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"tags\" : [ {\n \"id\" : 1,\n \"name\" : \"name\"\n }, {\n \"id\" : 1,\n \"name\" : \"name\"\n } ],\n \"status\" : \"available\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -150,7 +150,7 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 5885cf13a19b..505948142462 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -48,7 +48,7 @@ fun Route.StoreApi() { get { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -60,7 +60,7 @@ fun Route.StoreApi() { post { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 20c286203caa..a7a73cb08302 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -76,7 +76,7 @@ fun Route.UserApi() { get { val exampleContentType = "application/json" - val exampleContentString = "{\n \"id\" : 0,\n \"username\" : \"username\",\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"email\" : \"email\",\n \"password\" : \"password\",\n \"phone\" : \"phone\",\n \"userStatus\" : 6\n}" + val exampleContentString = """""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) From 8f889ad5ec50b62bcc684c076402ff6558e793a8 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sun, 7 Jun 2026 09:43:13 +0200 Subject: [PATCH 06/15] update samples --- .../org/openapitools/server/apis/PetApi.kt | 92 ++++++++++++- .../org/openapitools/server/apis/StoreApi.kt | 18 ++- .../org/openapitools/server/apis/UserApi.kt | 11 +- .../org/openapitools/server/apis/PetApi.kt | 92 ++++++++++++- .../org/openapitools/server/apis/StoreApi.kt | 18 ++- .../org/openapitools/server/apis/UserApi.kt | 11 +- .../org/openapitools/server/apis/PetApi.kt | 98 +++++++++++++- .../org/openapitools/server/apis/StoreApi.kt | 18 ++- .../org/openapitools/server/apis/UserApi.kt | 11 +- .../org/openapitools/server/apis/PetApi.kt | 128 +++++++++++++++++- .../org/openapitools/server/apis/StoreApi.kt | 18 ++- .../org/openapitools/server/apis/UserApi.kt | 11 +- 12 files changed, 495 insertions(+), 31 deletions(-) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index c0cbed934027..61debae8049e 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -56,7 +56,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -73,7 +105,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -90,7 +154,23 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -127,7 +207,11 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "code" : 0, + "type" : "type", + "message" : "message" + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 6f82cf077500..0be923df150f 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -44,7 +44,14 @@ fun Route.StoreApi() { } get { getOrderById -> val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -55,7 +62,14 @@ fun Route.StoreApi() { } post { placeOrder -> val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index c0ac3b029823..3d5ba9f81352 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -46,7 +46,16 @@ fun Route.UserApi() { } get { getUserByName -> val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "username" : "username", + "firstName" : "firstName", + "lastName" : "lastName", + "email" : "email", + "password" : "password", + "phone" : "phone", + "userStatus" : 6 + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index c0cbed934027..61debae8049e 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -56,7 +56,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -73,7 +105,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -90,7 +154,23 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -127,7 +207,11 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "code" : 0, + "type" : "type", + "message" : "message" + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 6f82cf077500..0be923df150f 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -44,7 +44,14 @@ fun Route.StoreApi() { } get { getOrderById -> val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) @@ -55,7 +62,14 @@ fun Route.StoreApi() { } post { placeOrder -> val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index c0ac3b029823..3d5ba9f81352 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -46,7 +46,16 @@ fun Route.UserApi() { } get { getUserByName -> val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "username" : "username", + "firstName" : "firstName", + "lastName" : "lastName", + "email" : "email", + "password" : "password", + "phone" : "phone", + "userStatus" : 6 + }""" when (exampleContentType) { "application/json" -> call.respondText(exampleContentType, ContentType.Application.Json) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index cd72a1af6472..6f357ec18ae9 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -60,7 +60,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -78,7 +110,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -107,7 +171,23 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -147,7 +227,11 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "code" : 0, + "type" : "type", + "message" : "message" + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -165,7 +249,11 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "code" : 0, + "type" : "type", + "message" : "message" + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 505948142462..02e0b8daa27f 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -48,7 +48,14 @@ fun Route.StoreApi() { get { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -60,7 +67,14 @@ fun Route.StoreApi() { post { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index 20ac7da01bf0..db4f27d0eeda 100644 --- a/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2-usetags-false/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -52,7 +52,16 @@ fun Route.UserApi() { get { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "username" : "username", + "firstName" : "firstName", + "lastName" : "lastName", + "email" : "email", + "password" : "password", + "phone" : "phone", + "userStatus" : 6 + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt index 3c54fd787c61..a16ffae5996a 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -38,7 +38,23 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -67,7 +83,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -85,7 +133,39 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """[ { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }, { + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + } ]""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -103,7 +183,23 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -121,7 +217,23 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "category" : { + "id" : 6, + "name" : "name" + }, + "name" : "doggie", + "photoUrls" : [ "photoUrls", "photoUrls" ], + "tags" : [ { + "id" : 1, + "name" : "name" + }, { + "id" : 1, + "name" : "name" + } ], + "status" : "available" + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -150,7 +262,11 @@ fun Route.PetApi() { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "code" : 0, + "type" : "type", + "message" : "message" + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 505948142462..02e0b8daa27f 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -48,7 +48,14 @@ fun Route.StoreApi() { get { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) @@ -60,7 +67,14 @@ fun Route.StoreApi() { post { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "petId" : 6, + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "status" : "placed", + "complete" : false + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt index a7a73cb08302..19a271ae530b 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -76,7 +76,16 @@ fun Route.UserApi() { get { val exampleContentType = "application/json" - val exampleContentString = """""" + val exampleContentString = """{ + "id" : 0, + "username" : "username", + "firstName" : "firstName", + "lastName" : "lastName", + "email" : "email", + "password" : "password", + "phone" : "phone", + "userStatus" : 6 + }""" when (exampleContentType) { "application/json" -> call.respond(gson.fromJson(exampleContentString, Any::class.java)) From 1f2bc624ef061e0d0debc959f37010cfbb05ed64 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sun, 7 Jun 2026 09:47:08 +0200 Subject: [PATCH 07/15] update samples --- .../src/test/resources/2_0/petstore.yaml | 4 ++++ samples/client/petstore/kotlin-explicit/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ samples/client/petstore/kotlin-jackson/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../client/petstore/kotlin-kotlinx-datetime/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ samples/client/petstore/kotlin-modelMutable/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../client/petstore/kotlin-moshi-codegen/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../kotlin-multiplatform-kotlinx-datetime/docs/Order.md | 1 + .../kotlin/org/openapitools/client/models/Order.kt | 4 ++++ .../client/petstore/kotlin-multiplatform/docs/Order.md | 1 + .../kotlin/org/openapitools/client/models/Order.kt | 4 ++++ samples/client/petstore/kotlin-nonpublic/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ samples/client/petstore/kotlin-nullable/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../kotlin-retrofit2-kotlinx_serialization/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../client/petstore/kotlin-retrofit2-rx3/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ samples/client/petstore/kotlin-retrofit2/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ samples/client/petstore/kotlin-string/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ samples/client/petstore/kotlin-threetenbp/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ samples/client/petstore/kotlin/docs/Order.md | 1 + .../main/kotlin/org/openapitools/client/models/Order.kt | 5 +++++ .../main/kotlin/org/openapitools/server/apis/StoreApi.kt | 2 ++ .../main/kotlin/org/openapitools/server/models/Order.kt | 3 +++ .../main/kotlin/org/openapitools/server/models/Order.kt | 6 ++++++ .../main/kotlin/org/openapitools/server/models/Order.kt | 6 ++++++ .../main/kotlin/org/openapitools/server/apis/StoreApi.kt | 2 ++ .../main/kotlin/org/openapitools/server/models/Order.kt | 3 +++ .../src/main/kotlin/org/openapitools/model/Order.kt | 5 +++++ .../src/main/resources/openapi.yaml | 8 ++++++++ .../main/kotlin/org/openapitools/api/StoreApiDelegate.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++++ .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++++ .../src/main/kotlin/org/openapitools/model/Order.kt | 5 +++++ .../src/main/resources/openapi.yaml | 8 ++++++++ .../src/main/kotlin/org/openapitools/model/Order.kt | 5 +++++ .../src/main/resources/openapi.yaml | 8 ++++++++ .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++++ .../kotlin/org/openapitools/server/api/model/Order.kt | 3 +++ .../kotlin/org/openapitools/server/api/model/Order.kt | 3 +++ 53 files changed, 187 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore.yaml index 36a05a5f6fe9..ed47a090465a 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore.yaml @@ -580,6 +580,10 @@ definitions: shipDate: type: string format: date-time + stringWithAttemptedInjection: + type: string + description: 'This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline' + example: '${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline' status: type: string description: Order Status diff --git a/samples/client/petstore/kotlin-explicit/docs/Order.md b/samples/client/petstore/kotlin-explicit/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-explicit/docs/Order.md +++ b/samples/client/petstore/kotlin-explicit/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt index a3582b27d988..7d28429a6231 100644 --- a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ public data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-jackson/docs/Order.md b/samples/client/petstore/kotlin-jackson/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-jackson/docs/Order.md +++ b/samples/client/petstore/kotlin-jackson/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt index 0bd2e61f4f4d..dcc4e2197021 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @get:JsonProperty("stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt index 7f1cd63d1bd7..ac455d782aad 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @get:JsonProperty("stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt index 8204b2c16617..2592894a0e77 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @SerializedName("shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @SerializedName("stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @SerializedName("status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md b/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md index bc768aa93288..f7781eff28d4 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt index 126390b0f0cf..fb43247f19af 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: kotlin.time.Instant? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-modelMutable/docs/Order.md b/samples/client/petstore/kotlin-modelMutable/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-modelMutable/docs/Order.md +++ b/samples/client/petstore/kotlin-modelMutable/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt index 3a3ffa18ce06..6ed67f9f39dd 100644 --- a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @Json(name = "shipDate") var shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + var stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") var status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md b/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md +++ b/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt index 9ce9a41d528e..f51fafb74ab6 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md index bc768aa93288..f7781eff28d4 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index 36b2997c7f5a..7954d534f3de 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -35,6 +35,7 @@ import kotlinx.serialization.encoding.* * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -50,6 +51,9 @@ data class Order ( @SerialName(value = "shipDate") val shipDate: kotlin.time.Instant? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @SerialName(value = "stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-multiplatform/docs/Order.md b/samples/client/petstore/kotlin-multiplatform/docs/Order.md index bc768aa93288..f7781eff28d4 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/Order.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index 36b2997c7f5a..7954d534f3de 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -35,6 +35,7 @@ import kotlinx.serialization.encoding.* * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -50,6 +51,9 @@ data class Order ( @SerialName(value = "shipDate") val shipDate: kotlin.time.Instant? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @SerialName(value = "stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-nonpublic/docs/Order.md b/samples/client/petstore/kotlin-nonpublic/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-nonpublic/docs/Order.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt index f9ceb7993809..89ab558f08f4 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ internal data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-nullable/docs/Order.md b/samples/client/petstore/kotlin-nullable/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-nullable/docs/Order.md +++ b/samples/client/petstore/kotlin-nullable/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt index 27c6db7f87e1..5e162720300e 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -35,6 +35,7 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,6 +55,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt index 0e613651113b..57b4bf69b61d 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -36,6 +36,7 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -55,6 +56,10 @@ data class Order ( @Contextual @SerialName(value = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @SerialName(value = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md b/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt index 49a20f1341f3..14b7aaa89594 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-retrofit2/docs/Order.md b/samples/client/petstore/kotlin-retrofit2/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin-retrofit2/docs/Order.md +++ b/samples/client/petstore/kotlin-retrofit2/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt index 49a20f1341f3..14b7aaa89594 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-string/docs/Order.md b/samples/client/petstore/kotlin-string/docs/Order.md index 536547f457f5..e7ebd00a319d 100644 --- a/samples/client/petstore/kotlin-string/docs/Order.md +++ b/samples/client/petstore/kotlin-string/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | **kotlin.String** | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt index e481bafee69a..79161f524c1f 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -35,6 +35,7 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,6 +55,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: kotlin.String? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-threetenbp/docs/Order.md b/samples/client/petstore/kotlin-threetenbp/docs/Order.md index 72a418dabd44..8590a7d1e741 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/Order.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**org.threeten.bp.OffsetDateTime**](org.threeten.bp.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt index 2ad664202d75..0e5765b8c34e 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,6 +34,7 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -53,6 +54,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: org.threeten.bp.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin/docs/Order.md b/samples/client/petstore/kotlin/docs/Order.md index 7b7a399f7f75..dac8a5a4df01 100644 --- a/samples/client/petstore/kotlin/docs/Order.md +++ b/samples/client/petstore/kotlin/docs/Order.md @@ -8,6 +8,7 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | +| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt index 27c6db7f87e1..5e162720300e 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -35,6 +35,7 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,6 +55,10 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + @Json(name = "stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 0be923df150f..c3622ae60d0c 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -49,6 +49,7 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" @@ -67,6 +68,7 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt index d5a9b56748f7..03fb968539ee 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,6 +19,7 @@ import kotlinx.serialization.Serializable * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -28,6 +29,8 @@ data class Order( var petId: kotlin.Long? = null, var quantity: kotlin.Int? = null, var shipDate: kotlin.String? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + var stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ var status: Order.Status? = null, var complete: kotlin.Boolean? = false diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt index d4a39a2c2bb2..d4c5586b156c 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -42,6 +43,11 @@ data class Order ( @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + + @JsonProperty("stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @JsonProperty("status") diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt index d4a39a2c2bb2..d4c5586b156c 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -42,6 +43,11 @@ data class Order ( @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + + @JsonProperty("stringWithAttemptedInjection") + val stringWithAttemptedInjection: kotlin.String? = null, + /* Order Status */ @JsonProperty("status") diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index 0be923df150f..c3622ae60d0c 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -49,6 +49,7 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" @@ -67,6 +68,7 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt index b1a711510fc6..be9d8e2ae790 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,6 +19,7 @@ import kotlinx.serialization.Serializable * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -28,6 +29,8 @@ data class Order( val petId: kotlin.Long? = null, val quantity: kotlin.Int? = null, val shipDate: kotlin.String? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + val stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ val status: Order.Status? = null, val complete: kotlin.Boolean? = false diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 00a939158c1e..61cf94e01378 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.media.Schema * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -44,6 +45,10 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") var shipDate: java.time.OffsetDateTime? = null, + @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @field:JsonSetter(nulls = Nulls.FAIL) + @get:JsonProperty("stringWithAttemptedInjection") var stringWithAttemptedInjection: kotlin.String? = null, + @Schema(example = "null", description = "Order Status") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") var status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml index 10dc7fc1a3c7..c4bdd5d64507 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml @@ -570,6 +570,7 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 + stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -585,6 +586,13 @@ components: shipDate: format: date-time type: string + stringWithAttemptedInjection: + description: "This is an example of a string property that includes attempted\ + \ injection attack content. It should be properly escaped and handled\ + \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ + backslash\"\"\"attemptToBreakOutOfMultiline" + example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" + type: string status: description: Order Status enum: diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt index 149de0c4dc14..996f7faf4f20 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt @@ -41,11 +41,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"status\" : \"placed\", \"complete\" : false}") + ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"stringWithAttemptedInjection\" : \"\${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline\", \"status\" : \"placed\", \"complete\" : false}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z \${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline aeiou true") break } } @@ -62,11 +62,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"status\" : \"placed\", \"complete\" : false}") + ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"stringWithAttemptedInjection\" : \"\${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline\", \"status\" : \"placed\", \"complete\" : false}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z \${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline aeiou true") break } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt index f8819a1b18e2..dac1916db3b0 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -22,6 +22,7 @@ import javax.validation.Valid * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -39,6 +40,9 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @field:JsonSetter(nulls = Nulls.FAIL) + @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, + @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index f8819a1b18e2..dac1916db3b0 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -22,6 +22,7 @@ import javax.validation.Valid * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -39,6 +40,9 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @field:JsonSetter(nulls = Nulls.FAIL) + @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, + @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index cd6d207bf7d5..550c96b556a3 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -44,6 +45,10 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @ApiModelProperty(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @field:JsonSetter(nulls = Nulls.FAIL) + @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Order Status") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml index 10dc7fc1a3c7..c4bdd5d64507 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml @@ -570,6 +570,7 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 + stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -585,6 +586,13 @@ components: shipDate: format: date-time type: string + stringWithAttemptedInjection: + description: "This is an example of a string property that includes attempted\ + \ injection attack content. It should be properly escaped and handled\ + \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ + backslash\"\"\"attemptToBreakOutOfMultiline" + example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" + type: string status: description: Order Status enum: diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index 25a14fcf8421..ff7e0dac599c 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.media.Schema * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -44,6 +45,10 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @field:JsonSetter(nulls = Nulls.FAIL) + @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, + @Schema(example = "null", description = "Order Status") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml index 10dc7fc1a3c7..c4bdd5d64507 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml @@ -570,6 +570,7 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 + stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -585,6 +586,13 @@ components: shipDate: format: date-time type: string + stringWithAttemptedInjection: + description: "This is an example of a string property that includes attempted\ + \ injection attack content. It should be properly escaped and handled\ + \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ + backslash\"\"\"attemptToBreakOutOfMultiline" + example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" + type: string status: description: Order Status enum: diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 0aefed01433e..69fc9b8bdb77 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,6 +23,7 @@ import javax.validation.Valid * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -40,6 +41,9 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @field:JsonSetter(nulls = Nulls.FAIL) + @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, + @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt index a25f7e74bc7f..204970ecb05b 100644 --- a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt @@ -22,6 +22,7 @@ import com.fasterxml.jackson.annotation.JsonInclude * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -32,6 +33,8 @@ data class Order ( var petId: kotlin.Long? = null, var quantity: kotlin.Int? = null, var shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + var stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ var status: Order.Status? = null, var complete: kotlin.Boolean? = false diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt index 9078e0bdd256..c95838b585ab 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt @@ -22,6 +22,7 @@ import com.fasterxml.jackson.annotation.JsonInclude * @param petId * @param quantity * @param shipDate + * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -32,6 +33,8 @@ data class Order ( val petId: kotlin.Long? = null, val quantity: kotlin.Int? = null, val shipDate: java.time.OffsetDateTime? = null, + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + val stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ val status: Order.Status? = null, val complete: kotlin.Boolean? = false From d18c2fded9ce0a5c31084d2e343222a3f9e911b2 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sun, 7 Jun 2026 09:53:44 +0200 Subject: [PATCH 08/15] dry test --- .../kotlin/KotlinServerCodegenTest.java | 41 ++++++------------- 1 file changed, 12 insertions(+), 29 deletions(-) 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 7b6601fdcc43..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 @@ -744,46 +744,29 @@ public void testFloatingPointMultipleOfValidationUsesTolerance() throws IOExcept ); } + @DataProvider(name = "ktorDollarInterpolationLibraries") + private Object[][] ktorDollarInterpolationLibraries() { + return new Object[][]{ + new Object[]{KTOR}, + new Object[]{KTOR2} + }; + } + /** - * Security regression for CVE-2026-22785 in ktor: a response schema example containing + * 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: dollar-sign interpolation in response example must be escaped (ktor library)") - public void ktorDollarInterpolationInExampleIsBlocked() throws IOException { - File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); - output.deleteOnExit(); - - KotlinServerCodegen codegen = new KotlinServerCodegen(); - codegen.setOutputDir(output.getAbsolutePath()); - codegen.additionalProperties().put(LIBRARY, KTOR); - - 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, "${'$'}"); - } - - /** - * Security regression for CVE-2026-22785 in ktor2: same check as above for the ktor2 library. - */ - @Test(description = "CVE-2026-22785 ktor2: dollar-sign interpolation in response example must be escaped (ktor2 library)") - public void ktor2DollarInterpolationInExampleIsBlocked() throws IOException { + @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, KTOR2); + codegen.additionalProperties().put(LIBRARY, library); new DefaultGenerator() .opts(new ClientOptInput() From f3a1173de77a8d8afa6bfa179e6fbd10f444b93c Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sun, 7 Jun 2026 10:01:04 +0200 Subject: [PATCH 09/15] fix(kotlin-spring): escape injection attempts in schema descriptions --- .../src/main/resources/kotlin-spring/bodyParams.mustache | 2 +- .../src/main/resources/kotlin-spring/dataClassOptVar.mustache | 4 ++-- .../src/main/resources/kotlin-spring/dataClassReqVar.mustache | 4 ++-- .../src/main/resources/kotlin-spring/formParams.mustache | 2 +- .../src/main/resources/kotlin-spring/headerParams.mustache | 2 +- .../src/main/resources/kotlin-spring/implicitHeaders.mustache | 4 ++-- .../src/main/resources/kotlin-spring/interfaceOptVar.mustache | 4 ++-- .../src/main/resources/kotlin-spring/interfaceReqVar.mustache | 4 ++-- .../httpInterfaceBodyParams.mustache | 2 +- .../src/main/resources/kotlin-spring/pathParams.mustache | 2 +- .../src/main/resources/kotlin-spring/queryParams.mustache | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) 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..c84d90fcae8b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache @@ -1,5 +1,5 @@ {{#swagger2AnnotationLibrary}} - @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/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..5818ad0aa9b2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache @@ -1,5 +1,5 @@ {{#swagger2AnnotationLibrary}} - @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}} + @get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} + @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/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/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 61cf94e01378..022930a4c960 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -45,7 +45,7 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") var shipDate: java.time.OffsetDateTime? = null, - @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. \${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("stringWithAttemptedInjection") var stringWithAttemptedInjection: kotlin.String? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index 550c96b556a3..5ef0685cf683 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -45,7 +45,7 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @ApiModelProperty(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. \${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index ff7e0dac599c..d80954eb4b2f 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -45,7 +45,7 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. \${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, From a7a54e6ebde9e10f39b04684bd5a6ff64f9abe01 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sun, 7 Jun 2026 13:58:08 +0200 Subject: [PATCH 10/15] update samples --- .../petstore/cpp-ue4/Private/OpenAPIOrder.cpp | 5 +++ .../petstore/cpp-ue4/Public/OpenAPIOrder.h | 2 ++ .../java/org/openapitools/model/Order.java | 29 ++++++++++++++++- .../java/org/openapitools/model/Order.java | 29 ++++++++++++++++- .../typescript-aurelia/default/models.ts | 4 +++ .../typescript-axios/builds/default/api.ts | 4 +++ .../builds/default/docs/Order.md | 2 ++ .../typescript-axios/builds/es6-target/api.ts | 4 +++ .../builds/es6-target/docs/Order.md | 2 ++ .../api.ts | 4 +++ .../docs/Order.md | 2 ++ .../builds/with-interfaces/api.ts | 4 +++ .../builds/with-interfaces/docs/Order.md | 2 ++ .../docs/Order.md | 2 ++ .../model/some/levels/deep/order.ts | 4 +++ .../builds/with-npm-version/api.ts | 4 +++ .../builds/with-npm-version/docs/Order.md | 2 ++ .../builds/with-string-enums/api.ts | 4 +++ .../builds/with-string-enums/docs/Order.md | 2 ++ .../builds/default/docs/Order.md | 2 ++ .../builds/default/models/Order.ts | 8 +++++ .../builds/es6-target/docs/Order.md | 2 ++ .../builds/es6-target/src/models/Order.ts | 8 +++++ .../builds/multiple-parameters/docs/Order.md | 2 ++ .../multiple-parameters/models/Order.ts | 8 +++++ .../prefix-parameter-interfaces/docs/Order.md | 2 ++ .../src/models/Order.ts | 8 +++++ .../builds/with-interfaces/docs/Order.md | 2 ++ .../builds/with-interfaces/models/Order.ts | 8 +++++ .../builds/with-npm-version/docs/Order.md | 2 ++ .../with-npm-version/src/models/Order.ts | 8 +++++ .../without-runtime-checks/docs/Order.md | 1 + .../src/models/index.ts | 6 ++++ .../typescript-inversify/model/order.ts | 4 +++ .../typescript-jquery/default/model/Order.ts | 5 +++ .../typescript-jquery/npm/model/Order.ts | 5 +++ .../typescript-node/default/model/order.ts | 9 ++++++ .../typescript-node/npm/model/order.ts | 9 ++++++ .../with-npm-version/src/models/Order.ts | 8 +++++ .../builds/default/models/Order.ts | 6 ++++ .../builds/es6-target/models/Order.ts | 6 ++++ .../builds/with-npm-version/models/Order.ts | 6 ++++ .../with-progress-subscriber/models/Order.ts | 6 ++++ .../Org.OpenAPITools/Controllers/StoreApi.cs | 8 ++--- .../src/Org.OpenAPITools/Models/Order.cs | 16 ++++++++++ .../wwwroot/openapi-original.json | 6 ++++ .../petstore/cpp-pistache/model/Order.cpp | 31 ++++++++++++++++++- .../petstore/cpp-pistache/model/Order.h | 9 ++++++ .../server/src/models/OAIOrder.cpp | 30 ++++++++++++++++++ .../server/src/models/OAIOrder.h | 9 ++++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 24 +++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../app/apimodels/Order.java | 25 ++++++++++++++- .../public/openapi.json | 6 ++++ .../app/apimodels/Order.java | 25 ++++++++++++++- .../java-play-framework/public/openapi.json | 6 ++++ .../java/org/openapitools/model/Order.java | 29 ++++++++++++++++- .../java/org/openapitools/model/Order.java | 29 ++++++++++++++++- .../java/org/openapitools/model/Order.java | 18 ++++++++++- .../java/org/openapitools/model/Order.java | 18 ++++++++++- .../java/org/openapitools/model/Order.java | 18 ++++++++++- .../java/org/openapitools/model/Order.java | 18 ++++++++++- .../java/org/openapitools/model/Order.java | 18 ++++++++++- .../java/org/openapitools/model/Order.java | 18 ++++++++++- .../src/openapi_server/models/order.py | 29 ++++++++++++++++- .../src/openapi_server/openapi/openapi.yaml | 9 ++++++ .../app/openapi_server/models/order.py | 30 +++++++++++++++++- .../openapi_server/Order_ResourceType.tosca | 5 +++ 81 files changed, 866 insertions(+), 27 deletions(-) diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp index e5682b2df935..7b08534aea2f 100644 --- a/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp +++ b/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp @@ -95,6 +95,10 @@ void OpenAPIOrder::WriteJson(JsonWriter& Writer) const { Writer->WriteIdentifierPrefix(TEXT("shipDate")); WriteJsonValue(Writer, ShipDate.GetValue()); } + if (StringWithAttemptedInjection.IsSet()) + { + Writer->WriteIdentifierPrefix(TEXT("stringWithAttemptedInjection")); WriteJsonValue(Writer, StringWithAttemptedInjection.GetValue()); + } if (Status.IsSet()) { Writer->WriteIdentifierPrefix(TEXT("status")); WriteJsonValue(Writer, Status.GetValue()); @@ -118,6 +122,7 @@ bool OpenAPIOrder::FromJson(const TSharedPtr& JsonValue) ParseSuccess &= TryGetJsonValue(*Object, TEXT("petId"), PetId); ParseSuccess &= TryGetJsonValue(*Object, TEXT("quantity"), Quantity); ParseSuccess &= TryGetJsonValue(*Object, TEXT("shipDate"), ShipDate); + ParseSuccess &= TryGetJsonValue(*Object, TEXT("stringWithAttemptedInjection"), StringWithAttemptedInjection); ParseSuccess &= TryGetJsonValue(*Object, TEXT("status"), Status); ParseSuccess &= TryGetJsonValue(*Object, TEXT("complete"), Complete); diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h index 9abc0bce3f65..6431c9a94d50 100644 --- a/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h +++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h @@ -33,6 +33,8 @@ class OPENAPI_API OpenAPIOrder : public Model TOptional PetId; TOptional Quantity; TOptional ShipDate; + /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ + TOptional StringWithAttemptedInjection; enum class StatusEnum { Placed, diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java index 5765180bea89..2cbae161ed16 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java @@ -32,6 +32,13 @@ public class Order { private Date shipDate; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + + private String stringWithAttemptedInjection; + public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -146,6 +153,24 @@ public Order shipDate(Date shipDate) { return this; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + /** * Order Status * @return status @@ -198,13 +223,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -216,6 +242,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java index 3a479cb74895..672b6c97dae0 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java @@ -30,6 +30,13 @@ public class Order { private Date shipDate; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + + private String stringWithAttemptedInjection; + public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -142,6 +149,24 @@ public Order shipDate(Date shipDate) { return this; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + /** * Order Status * @return status @@ -194,13 +219,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -212,6 +238,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/typescript-aurelia/default/models.ts b/samples/client/petstore/typescript-aurelia/default/models.ts index 92e8ed2dc0db..4bf029c7745a 100644 --- a/samples/client/petstore/typescript-aurelia/default/models.ts +++ b/samples/client/petstore/typescript-aurelia/default/models.ts @@ -38,6 +38,10 @@ export interface Order { petId?: number; quantity?: number; shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + stringWithAttemptedInjection?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index fb7b6744d6aa..19928440c884 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -46,6 +46,10 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/default/docs/Order.md b/samples/client/petstore/typescript-axios/builds/default/docs/Order.md index 837df81ca85f..8a712b7b3dc7 100644 --- a/samples/client/petstore/typescript-axios/builds/default/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/default/docs/Order.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] +**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -23,6 +24,7 @@ const instance: Order = { petId, quantity, shipDate, + stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index fb7b6744d6aa..19928440c884 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -46,6 +46,10 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md b/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md index 72224c3de918..a58c4b2913fa 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] +**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -23,6 +24,7 @@ const instance: Order = { petId, quantity, shipDate, + stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts index 631262349227..a5bf6638f09f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts @@ -46,6 +46,10 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md index 837df81ca85f..8a712b7b3dc7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] +**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -23,6 +24,7 @@ const instance: Order = { petId, quantity, shipDate, + stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index a2e7d8c95bb2..123172ebe229 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -46,6 +46,10 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md index 837df81ca85f..8a712b7b3dc7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] +**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -23,6 +24,7 @@ const instance: Order = { petId, quantity, shipDate, + stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md index 72224c3de918..a58c4b2913fa 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] +**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -23,6 +24,7 @@ const instance: Order = { petId, quantity, shipDate, + stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts index dd8b5d3eb547..7b9995ad08dd 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts @@ -22,6 +22,10 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index fb7b6744d6aa..19928440c884 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -46,6 +46,10 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md index 72224c3de918..a58c4b2913fa 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] +**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -23,6 +24,7 @@ const instance: Order = { petId, quantity, shipDate, + stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts index 188ff2823dab..8995d3e4bafb 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts @@ -46,6 +46,10 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md index 837df81ca85f..8a712b7b3dc7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] +**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -23,6 +24,7 @@ const instance: Order = { petId, quantity, shipDate, + stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md index e2527b3aa31c..55e8ed8e60f3 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md @@ -11,6 +11,7 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date +`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -25,6 +26,7 @@ const example = { "petId": null, "quantity": null, "shipDate": null, + "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts index 7055ef2ef79a..e3893fd68257 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts @@ -43,6 +43,12 @@ export interface Order { * @memberof Order */ shipDate?: Date; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -90,6 +96,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), + 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -110,6 +117,7 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), + 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md index 3c1be2566f70..7705500bbffc 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md @@ -11,6 +11,7 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date +`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -25,6 +26,7 @@ const example = { "petId": null, "quantity": null, "shipDate": null, + "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts index 7055ef2ef79a..e3893fd68257 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts @@ -43,6 +43,12 @@ export interface Order { * @memberof Order */ shipDate?: Date; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -90,6 +96,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), + 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -110,6 +117,7 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), + 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md index e2527b3aa31c..55e8ed8e60f3 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md @@ -11,6 +11,7 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date +`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -25,6 +26,7 @@ const example = { "petId": null, "quantity": null, "shipDate": null, + "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts index 7055ef2ef79a..e3893fd68257 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts @@ -43,6 +43,12 @@ export interface Order { * @memberof Order */ shipDate?: Date; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -90,6 +96,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), + 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -110,6 +117,7 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), + 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md index 3c1be2566f70..7705500bbffc 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md @@ -11,6 +11,7 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date +`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -25,6 +26,7 @@ const example = { "petId": null, "quantity": null, "shipDate": null, + "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts index 7055ef2ef79a..e3893fd68257 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts @@ -43,6 +43,12 @@ export interface Order { * @memberof Order */ shipDate?: Date; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -90,6 +96,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), + 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -110,6 +117,7 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), + 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md index e2527b3aa31c..55e8ed8e60f3 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md @@ -11,6 +11,7 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date +`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -25,6 +26,7 @@ const example = { "petId": null, "quantity": null, "shipDate": null, + "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts index 7055ef2ef79a..e3893fd68257 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts @@ -43,6 +43,12 @@ export interface Order { * @memberof Order */ shipDate?: Date; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -90,6 +96,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), + 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -110,6 +117,7 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), + 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md index 3c1be2566f70..7705500bbffc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md @@ -11,6 +11,7 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date +`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -25,6 +26,7 @@ const example = { "petId": null, "quantity": null, "shipDate": null, + "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts index 7055ef2ef79a..e3893fd68257 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts @@ -43,6 +43,12 @@ export interface Order { * @memberof Order */ shipDate?: Date; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -90,6 +96,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), + 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -110,6 +117,7 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), + 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md index 1a0daa42d1f4..7e9d9168b254 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md @@ -11,6 +11,7 @@ Name | Type `petId` | number `quantity` | number `shipDate` | string +`stringWithAttemptedInjection` | string `status` | string `complete` | boolean diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts index 806093189e76..7b614c278c43 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts @@ -74,6 +74,12 @@ export interface Order { * @memberof Order */ shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} diff --git a/samples/client/petstore/typescript-inversify/model/order.ts b/samples/client/petstore/typescript-inversify/model/order.ts index 4bd3d5e3c678..a0f8379a3cfa 100644 --- a/samples/client/petstore/typescript-inversify/model/order.ts +++ b/samples/client/petstore/typescript-inversify/model/order.ts @@ -19,6 +19,10 @@ export interface Order { petId?: number; quantity?: number; shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + stringWithAttemptedInjection?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Order.ts b/samples/client/petstore/typescript-jquery/default/model/Order.ts index af5570597c88..f5a0439d050d 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Order.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Order.ts @@ -24,6 +24,11 @@ export interface Order { shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + stringWithAttemptedInjection?: string; + /** * Order Status */ diff --git a/samples/client/petstore/typescript-jquery/npm/model/Order.ts b/samples/client/petstore/typescript-jquery/npm/model/Order.ts index af5570597c88..f5a0439d050d 100644 --- a/samples/client/petstore/typescript-jquery/npm/model/Order.ts +++ b/samples/client/petstore/typescript-jquery/npm/model/Order.ts @@ -24,6 +24,11 @@ export interface Order { shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + stringWithAttemptedInjection?: string; + /** * Order Status */ diff --git a/samples/client/petstore/typescript-node/default/model/order.ts b/samples/client/petstore/typescript-node/default/model/order.ts index f3af391f88d2..15cb963f8f17 100644 --- a/samples/client/petstore/typescript-node/default/model/order.ts +++ b/samples/client/petstore/typescript-node/default/model/order.ts @@ -21,6 +21,10 @@ export class Order { 'quantity'?: number; 'shipDate'?: Date; /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; + /** * Order Status */ 'status'?: Order.StatusEnum; @@ -49,6 +53,11 @@ export class Order { "baseName": "shipDate", "type": "Date" }, + { + "name": "stringWithAttemptedInjection", + "baseName": "stringWithAttemptedInjection", + "type": "string" + }, { "name": "status", "baseName": "status", diff --git a/samples/client/petstore/typescript-node/npm/model/order.ts b/samples/client/petstore/typescript-node/npm/model/order.ts index f3af391f88d2..15cb963f8f17 100644 --- a/samples/client/petstore/typescript-node/npm/model/order.ts +++ b/samples/client/petstore/typescript-node/npm/model/order.ts @@ -21,6 +21,10 @@ export class Order { 'quantity'?: number; 'shipDate'?: Date; /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + 'stringWithAttemptedInjection'?: string; + /** * Order Status */ 'status'?: Order.StatusEnum; @@ -49,6 +53,11 @@ export class Order { "baseName": "shipDate", "type": "Date" }, + { + "name": "stringWithAttemptedInjection", + "baseName": "stringWithAttemptedInjection", + "type": "string" + }, { "name": "status", "baseName": "status", diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts index ff701de3c3b2..c60369ef48b3 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts @@ -42,6 +42,12 @@ export interface Order { * @memberof Order */ shipDate?: Date; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {string} @@ -62,6 +68,7 @@ export function OrderFromJSON(json: any): Order { 'petId': !exists(json, 'petId') ? undefined : json['petId'], 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'], 'shipDate': !exists(json, 'shipDate') ? undefined : new Date(json['shipDate']), + 'stringWithAttemptedInjection': !exists(json, 'stringWithAttemptedInjection') ? undefined : json['stringWithAttemptedInjection'], 'status': !exists(json, 'status') ? undefined : json['status'], 'complete': !exists(json, 'complete') ? undefined : json['complete'], }; @@ -76,6 +83,7 @@ export function OrderToJSON(value?: Order): any { 'petId': value.petId, 'quantity': value.quantity, 'shipDate': value.shipDate === undefined ? undefined : value.shipDate.toISOString(), + 'stringWithAttemptedInjection': value.stringWithAttemptedInjection, 'status': value.status, 'complete': value.complete, }; diff --git a/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts index c6b7790d7024..8322f85fc7bd 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts @@ -37,6 +37,12 @@ export interface Order { * @memberof Order */ shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts index c6b7790d7024..8322f85fc7bd 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts @@ -37,6 +37,12 @@ export interface Order { * @memberof Order */ shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts index c6b7790d7024..8322f85fc7bd 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts @@ -37,6 +37,12 @@ export interface Order { * @memberof Order */ shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts index c6b7790d7024..8322f85fc7bd 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts @@ -37,6 +37,12 @@ export interface Order { * @memberof Order */ shipDate?: string; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @type {string} + * @memberof Order + */ + stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index b140b22d6595..adb5da825d33 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,8 +98,8 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; - exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; + exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"stringWithAttemptedInjection\" : \"${attemptedStringInter}\\backslash\\"\\"\\"attemptToBreakOutOfMultiline\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; + exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n ${attemptedStringInter}\backslash\"\"\"attemptToBreakOutOfMultiline\n aeiou\n true\n"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) @@ -127,8 +127,8 @@ public virtual IActionResult PlaceOrder([FromBody]Order body) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; - exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; + exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"stringWithAttemptedInjection\" : \"${attemptedStringInter}\\backslash\\"\\"\\"attemptToBreakOutOfMultiline\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; + exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n ${attemptedStringInter}\backslash\"\"\"attemptToBreakOutOfMultiline\n aeiou\n true\n"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs index c570b90ac842..2710d493f3be 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs @@ -50,6 +50,14 @@ public partial class Order : IEquatable [DataMember(Name="shipDate", EmitDefaultValue=false)] public DateTime ShipDate { get; set; } + /// + /// This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + /// + /// This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + /* ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline */ + [DataMember(Name="stringWithAttemptedInjection", EmitDefaultValue=false)] + public string StringWithAttemptedInjection { get; set; } + /// /// Order Status @@ -104,6 +112,7 @@ public override string ToString() sb.Append(" PetId: ").Append(PetId).Append("\n"); sb.Append(" Quantity: ").Append(Quantity).Append("\n"); sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" StringWithAttemptedInjection: ").Append(StringWithAttemptedInjection).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" Complete: ").Append(Complete).Append("\n"); sb.Append("}\n"); @@ -162,6 +171,11 @@ public bool Equals(Order other) ShipDate.Equals(other.ShipDate) ) && + ( + StringWithAttemptedInjection == other.StringWithAttemptedInjection || + StringWithAttemptedInjection != null && + StringWithAttemptedInjection.Equals(other.StringWithAttemptedInjection) + ) && ( Status == other.Status || @@ -192,6 +206,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + Quantity.GetHashCode(); hashCode = hashCode * 59 + ShipDate.GetHashCode(); + if (StringWithAttemptedInjection != null) + hashCode = hashCode * 59 + StringWithAttemptedInjection.GetHashCode(); hashCode = hashCode * 59 + Status.GetHashCode(); diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index 36c014dba742..79de2c696b7a 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -758,6 +758,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -778,6 +779,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/cpp-pistache/model/Order.cpp b/samples/server/petstore/cpp-pistache/model/Order.cpp index 50206a78b420..26af1204205d 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.cpp +++ b/samples/server/petstore/cpp-pistache/model/Order.cpp @@ -29,6 +29,8 @@ Order::Order() m_QuantityIsSet = false; m_ShipDate = ""; m_ShipDateIsSet = false; + m_StringWithAttemptedInjection = ""; + m_StringWithAttemptedInjectionIsSet = false; m_Status = ""; m_StatusIsSet = false; m_Complete = false; @@ -57,7 +59,7 @@ bool Order::validate(std::stringstream& msg, const std::string& pathPrefix) cons bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Order" : pathPrefix; - + return success; } @@ -79,6 +81,9 @@ bool Order::operator==(const Order& rhs) const ((!shipDateIsSet() && !rhs.shipDateIsSet()) || (shipDateIsSet() && rhs.shipDateIsSet() && getShipDate() == rhs.getShipDate())) && + ((!stringWithAttemptedInjectionIsSet() && !rhs.stringWithAttemptedInjectionIsSet()) || (stringWithAttemptedInjectionIsSet() && rhs.stringWithAttemptedInjectionIsSet() && getStringWithAttemptedInjection() == rhs.getStringWithAttemptedInjection())) && + + ((!statusIsSet() && !rhs.statusIsSet()) || (statusIsSet() && rhs.statusIsSet() && getStatus() == rhs.getStatus())) && @@ -103,6 +108,8 @@ void to_json(nlohmann::json& j, const Order& o) j["quantity"] = o.m_Quantity; if(o.shipDateIsSet()) j["shipDate"] = o.m_ShipDate; + if(o.stringWithAttemptedInjectionIsSet()) + j["stringWithAttemptedInjection"] = o.m_StringWithAttemptedInjection; if(o.statusIsSet()) j["status"] = o.m_Status; if(o.completeIsSet()) @@ -132,6 +139,11 @@ void from_json(const nlohmann::json& j, Order& o) j.at("shipDate").get_to(o.m_ShipDate); o.m_ShipDateIsSet = true; } + if(j.find("stringWithAttemptedInjection") != j.end()) + { + j.at("stringWithAttemptedInjection").get_to(o.m_StringWithAttemptedInjection); + o.m_StringWithAttemptedInjectionIsSet = true; + } if(j.find("status") != j.end()) { j.at("status").get_to(o.m_Status); @@ -213,6 +225,23 @@ void Order::unsetShipDate() { m_ShipDateIsSet = false; } +std::string Order::getStringWithAttemptedInjection() const +{ + return m_StringWithAttemptedInjection; +} +void Order::setStringWithAttemptedInjection(std::string const& value) +{ + m_StringWithAttemptedInjection = value; + m_StringWithAttemptedInjectionIsSet = true; +} +bool Order::stringWithAttemptedInjectionIsSet() const +{ + return m_StringWithAttemptedInjectionIsSet; +} +void Order::unsetStringWithAttemptedInjection() +{ + m_StringWithAttemptedInjectionIsSet = false; +} std::string Order::getStatus() const { return m_Status; diff --git a/samples/server/petstore/cpp-pistache/model/Order.h b/samples/server/petstore/cpp-pistache/model/Order.h index 0748745a14f0..ae0358b3e0cd 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.h +++ b/samples/server/petstore/cpp-pistache/model/Order.h @@ -87,6 +87,13 @@ class Order bool shipDateIsSet() const; void unsetShipDate(); /// + /// This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + /// + std::string getStringWithAttemptedInjection() const; + void setStringWithAttemptedInjection(std::string const& value); + bool stringWithAttemptedInjectionIsSet() const; + void unsetStringWithAttemptedInjection(); + /// /// Order Status /// std::string getStatus() const; @@ -112,6 +119,8 @@ class Order bool m_QuantityIsSet; std::string m_ShipDate; bool m_ShipDateIsSet; + std::string m_StringWithAttemptedInjection; + bool m_StringWithAttemptedInjectionIsSet; std::string m_Status; bool m_StatusIsSet; bool m_Complete; diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp index 28536d66f27b..e23b4de5c527 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp @@ -45,6 +45,9 @@ void OAIOrder::initializeModel() { m_ship_date_isSet = false; m_ship_date_isValid = false; + m_string_with_attempted_injection_isSet = false; + m_string_with_attempted_injection_isValid = false; + m_status_isSet = false; m_status_isValid = false; @@ -73,6 +76,9 @@ void OAIOrder::fromJsonObject(QJsonObject json) { m_ship_date_isValid = ::OpenAPI::fromJsonValue(ship_date, json[QString("shipDate")]); m_ship_date_isSet = !json[QString("shipDate")].isNull() && m_ship_date_isValid; + m_string_with_attempted_injection_isValid = ::OpenAPI::fromJsonValue(string_with_attempted_injection, json[QString("stringWithAttemptedInjection")]); + m_string_with_attempted_injection_isSet = !json[QString("stringWithAttemptedInjection")].isNull() && m_string_with_attempted_injection_isValid; + m_status_isValid = ::OpenAPI::fromJsonValue(status, json[QString("status")]); m_status_isSet = !json[QString("status")].isNull() && m_status_isValid; @@ -101,6 +107,9 @@ QJsonObject OAIOrder::asJsonObject() const { if (m_ship_date_isSet) { obj.insert(QString("shipDate"), ::OpenAPI::toJsonValue(ship_date)); } + if (m_string_with_attempted_injection_isSet) { + obj.insert(QString("stringWithAttemptedInjection"), ::OpenAPI::toJsonValue(string_with_attempted_injection)); + } if (m_status_isSet) { obj.insert(QString("status"), ::OpenAPI::toJsonValue(status)); } @@ -174,6 +183,22 @@ bool OAIOrder::is_ship_date_Valid() const{ return m_ship_date_isValid; } +QString OAIOrder::getStringWithAttemptedInjection() const { + return string_with_attempted_injection; +} +void OAIOrder::setStringWithAttemptedInjection(const QString &string_with_attempted_injection) { + this->string_with_attempted_injection = string_with_attempted_injection; + this->m_string_with_attempted_injection_isSet = true; +} + +bool OAIOrder::is_string_with_attempted_injection_Set() const{ + return m_string_with_attempted_injection_isSet; +} + +bool OAIOrder::is_string_with_attempted_injection_Valid() const{ + return m_string_with_attempted_injection_isValid; +} + QString OAIOrder::getStatus() const { return status; } @@ -229,6 +254,11 @@ bool OAIOrder::isSet() const { break; } + if (m_string_with_attempted_injection_isSet) { + isObjectUpdated = true; + break; + } + if (m_status_isSet) { isObjectUpdated = true; break; diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h index 0812753b8f19..7d090f7cf1aa 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h @@ -59,6 +59,11 @@ class OAIOrder : public OAIObject { bool is_ship_date_Set() const; bool is_ship_date_Valid() const; + QString getStringWithAttemptedInjection() const; + void setStringWithAttemptedInjection(const QString &string_with_attempted_injection); + bool is_string_with_attempted_injection_Set() const; + bool is_string_with_attempted_injection_Valid() const; + QString getStatus() const; void setStatus(const QString &status); bool is_status_Set() const; @@ -91,6 +96,10 @@ class OAIOrder : public OAIObject { bool m_ship_date_isSet; bool m_ship_date_isValid; + QString string_with_attempted_injection; + bool m_string_with_attempted_injection_isSet; + bool m_string_with_attempted_injection_isValid; + QString status; bool m_status_isSet; bool m_status_isValid; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java index e2410a375371..5f854688a991 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java @@ -23,6 +23,9 @@ public class Order { @JsonProperty("shipDate") private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -130,6 +133,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -178,13 +198,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -197,6 +218,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Order.java b/samples/server/petstore/java-play-framework/app/apimodels/Order.java index 70d3431c2442..95760d7312cd 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Order.java @@ -30,6 +30,10 @@ public class Order { private OffsetDateTime shipDate; + @JsonProperty("stringWithAttemptedInjection") + + private String stringWithAttemptedInjection; + /** * Order Status */ @@ -139,6 +143,23 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + public Order status(StatusEnum status) { this.status = status; return this; @@ -187,13 +208,14 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && + Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -206,6 +228,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index c1ca9eb6d8e9..028b77859bf4 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -787,6 +787,7 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", + "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -807,6 +808,11 @@ "format" : "date-time", "type" : "string" }, + "stringWithAttemptedInjection" : { + "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", + "type" : "string" + }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java index 1e9038ab5e8f..f28d6312a6c5 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java @@ -34,6 +34,13 @@ public class Order { private Date shipDate; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + + private String stringWithAttemptedInjection; + public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -148,6 +155,24 @@ public Order shipDate(Date shipDate) { return this; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + /** * Order Status * @return status @@ -200,13 +225,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -218,6 +244,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java index 1e9038ab5e8f..f28d6312a6c5 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java @@ -34,6 +34,13 @@ public class Order { private Date shipDate; + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + */ + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + + private String stringWithAttemptedInjection; + public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -148,6 +155,24 @@ public Order shipDate(Date shipDate) { return this; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + * @return stringWithAttemptedInjection + **/ + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + + public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + return this; + } + /** * Order Status * @return status @@ -200,13 +225,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -218,6 +244,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java index 31fdca5b21a8..498ebaeb25fd 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java @@ -19,6 +19,7 @@ public class Order { private Long petId; private Integer quantity; private Date shipDate; + private String stringWithAttemptedInjection; /** * Order Status @@ -93,6 +94,19 @@ public void setShipDate(Date shipDate) { this.shipDate = shipDate; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + **/ + + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + /** * Order Status **/ @@ -132,13 +146,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -150,6 +165,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java index 067ec1ccc2c5..7ec6475c9d06 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java @@ -19,6 +19,7 @@ public class Order { private Long petId; private Integer quantity; private OffsetDateTime shipDate; + private String stringWithAttemptedInjection; /** * Order Status @@ -93,6 +94,19 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + **/ + + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + /** * Order Status **/ @@ -132,13 +146,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -150,6 +165,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java index 035ab5ec1f84..7d259bb0e1e5 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java @@ -19,6 +19,7 @@ public class Order { private Long petId; private Integer quantity; private DateTime shipDate; + private String stringWithAttemptedInjection; /** * Order Status @@ -93,6 +94,19 @@ public void setShipDate(DateTime shipDate) { this.shipDate = shipDate; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + **/ + + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + /** * Order Status **/ @@ -132,13 +146,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -150,6 +165,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java index 154e14a87486..c4968b50d6db 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java @@ -19,6 +19,7 @@ public class Order { private Long petId; private Integer quantity; private Date shipDate; + private String stringWithAttemptedInjection; /** * Order Status @@ -93,6 +94,19 @@ public void setShipDate(Date shipDate) { this.shipDate = shipDate; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + **/ + + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + /** * Order Status **/ @@ -132,13 +146,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -150,6 +165,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java index c96163f3dd4e..d1a3b062210c 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java @@ -19,6 +19,7 @@ public class Order { private Long petId; private Integer quantity; private OffsetDateTime shipDate; + private String stringWithAttemptedInjection; /** * Order Status @@ -93,6 +94,19 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + **/ + + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + /** * Order Status **/ @@ -132,13 +146,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -150,6 +165,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java index fef298045c04..47b0dda5da62 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java @@ -19,6 +19,7 @@ public class Order { private Long petId; private Integer quantity; private DateTime shipDate; + private String stringWithAttemptedInjection; /** * Order Status @@ -93,6 +94,19 @@ public void setShipDate(DateTime shipDate) { this.shipDate = shipDate; } + /** + * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + **/ + + @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") + @JsonProperty("stringWithAttemptedInjection") + public String getStringWithAttemptedInjection() { + return stringWithAttemptedInjection; + } + public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { + this.stringWithAttemptedInjection = stringWithAttemptedInjection; + } + /** * Order Status **/ @@ -132,13 +146,14 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); } @Override @@ -150,6 +165,7 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py index 6fab59c0350c..ab0803c0b2e0 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py +++ b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py @@ -14,13 +14,14 @@ class Order(Model): Do not edit the class manually. """ - def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, status: str=None, complete: bool=False): + def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, string_with_attempted_injection: str=None, status: str=None, complete: bool=False): """Order - a model defined in OpenAPI :param id: The id of this Order. :param pet_id: The pet_id of this Order. :param quantity: The quantity of this Order. :param ship_date: The ship_date of this Order. + :param string_with_attempted_injection: The string_with_attempted_injection of this Order. :param status: The status of this Order. :param complete: The complete of this Order. """ @@ -29,6 +30,7 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': int, 'quantity': int, 'ship_date': datetime, + 'string_with_attempted_injection': str, 'status': str, 'complete': bool } @@ -38,6 +40,7 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': 'petId', 'quantity': 'quantity', 'ship_date': 'shipDate', + 'string_with_attempted_injection': 'stringWithAttemptedInjection', 'status': 'status', 'complete': 'complete' } @@ -46,6 +49,7 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date self._pet_id = pet_id self._quantity = quantity self._ship_date = ship_date + self._string_with_attempted_injection = string_with_attempted_injection self._status = status self._complete = complete @@ -142,6 +146,29 @@ def ship_date(self, ship_date): self._ship_date = ship_date + @property + def string_with_attempted_injection(self): + """Gets the string_with_attempted_injection of this Order. + + This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + + :return: The string_with_attempted_injection of this Order. + :rtype: str + """ + return self._string_with_attempted_injection + + @string_with_attempted_injection.setter + def string_with_attempted_injection(self, string_with_attempted_injection): + """Sets the string_with_attempted_injection of this Order. + + This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline + + :param string_with_attempted_injection: The string_with_attempted_injection of this Order. + :type string_with_attempted_injection: str + """ + + self._string_with_attempted_injection = string_with_attempted_injection + @property def status(self): """Gets the status of this Order. diff --git a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml index ecfc98a40658..efe61da2a715 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml @@ -601,6 +601,7 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 + stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -620,6 +621,14 @@ components: format: date-time title: shipDate type: string + stringWithAttemptedInjection: + description: "This is an example of a string property that includes attempted\ + \ injection attack content. It should be properly escaped and handled\ + \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ + backslash\"\"\"attemptToBreakOutOfMultiline" + example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" + title: stringWithAttemptedInjection + type: string status: description: Order Status enum: diff --git a/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py b/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py index dbf5ce956c49..ba421411e54c 100644 --- a/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py +++ b/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py @@ -15,7 +15,7 @@ class Order(Model): Do not edit the class manually. """ - def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, status: str=None, complete: bool=False): # noqa: E501 + def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, string_with_attempted_injection: str=None, status: str=None, complete: bool=False): # noqa: E501 """Order - a model defined in Swagger :param id: The id of this Order. # noqa: E501 @@ -26,6 +26,8 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date :type quantity: int :param ship_date: The ship_date of this Order. # noqa: E501 :type ship_date: datetime + :param string_with_attempted_injection: The string_with_attempted_injection of this Order. # noqa: E501 + :type string_with_attempted_injection: str :param status: The status of this Order. # noqa: E501 :type status: str :param complete: The complete of this Order. # noqa: E501 @@ -36,6 +38,7 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': int, 'quantity': int, 'ship_date': datetime, + 'string_with_attempted_injection': str, 'status': str, 'complete': bool } @@ -45,6 +48,7 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': 'petId', 'quantity': 'quantity', 'ship_date': 'shipDate', + 'string_with_attempted_injection': 'stringWithAttemptedInjection', 'status': 'status', 'complete': 'complete' } @@ -53,6 +57,7 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date self._pet_id = pet_id self._quantity = quantity self._ship_date = ship_date + self._string_with_attempted_injection = string_with_attempted_injection self._status = status self._complete = complete @@ -151,6 +156,29 @@ def ship_date(self, ship_date: datetime): self._ship_date = ship_date + @property + def string_with_attempted_injection(self) -> str: + """Gets the string_with_attempted_injection of this Order. + + This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline # noqa: E501 + + :return: The string_with_attempted_injection of this Order. + :rtype: str + """ + return self._string_with_attempted_injection + + @string_with_attempted_injection.setter + def string_with_attempted_injection(self, string_with_attempted_injection: str): + """Sets the string_with_attempted_injection of this Order. + + This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline # noqa: E501 + + :param string_with_attempted_injection: The string_with_attempted_injection of this Order. + :type string_with_attempted_injection: str + """ + + self._string_with_attempted_injection = string_with_attempted_injection + @property def status(self) -> str: """Gets the status of this Order. diff --git a/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca b/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca index cf6768d1dea1..cb4757ae3f87 100644 --- a/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca +++ b/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca @@ -35,6 +35,11 @@ resourceTypes { description = "" optional = false } + string_with_attempted_injection { + type = string + description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" + optional = false + } status { type = string description = "Order Status" From ec03996a53c8c38d0bac8162a35018e43f0c9ff7 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sun, 7 Jun 2026 14:56:39 +0200 Subject: [PATCH 11/15] update samples --- .../src/test/resources/2_0/petstore.yaml | 4 --- .../petstore/cpp-ue4/Private/OpenAPIOrder.cpp | 5 --- .../petstore/cpp-ue4/Public/OpenAPIOrder.h | 2 -- .../java/org/openapitools/model/Order.java | 29 +---------------- .../java/org/openapitools/model/Order.java | 29 +---------------- .../petstore/kotlin-explicit/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../petstore/kotlin-jackson/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../kotlin-jvm-ktor-jackson/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../kotlin-kotlinx-datetime/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../kotlin-modelMutable/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../kotlin-moshi-codegen/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 4 --- .../kotlin-multiplatform/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 4 --- .../petstore/kotlin-nonpublic/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../petstore/kotlin-nullable/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../kotlin-retrofit2-rx3/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../petstore/kotlin-retrofit2/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../petstore/kotlin-string/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../petstore/kotlin-threetenbp/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- samples/client/petstore/kotlin/docs/Order.md | 1 - .../org/openapitools/client/models/Order.kt | 5 --- .../typescript-aurelia/default/models.ts | 4 --- .../typescript-axios/builds/default/api.ts | 4 --- .../builds/default/docs/Order.md | 2 -- .../typescript-axios/builds/es6-target/api.ts | 4 --- .../builds/es6-target/docs/Order.md | 2 -- .../api.ts | 4 --- .../docs/Order.md | 2 -- .../builds/with-interfaces/api.ts | 4 --- .../builds/with-interfaces/docs/Order.md | 2 -- .../docs/Order.md | 2 -- .../model/some/levels/deep/order.ts | 4 --- .../builds/with-npm-version/api.ts | 4 --- .../builds/with-npm-version/docs/Order.md | 2 -- .../builds/with-string-enums/api.ts | 4 --- .../builds/with-string-enums/docs/Order.md | 2 -- .../builds/default/docs/Order.md | 2 -- .../builds/default/models/Order.ts | 8 ----- .../builds/es6-target/docs/Order.md | 2 -- .../builds/es6-target/src/models/Order.ts | 8 ----- .../builds/multiple-parameters/docs/Order.md | 2 -- .../multiple-parameters/models/Order.ts | 8 ----- .../prefix-parameter-interfaces/docs/Order.md | 2 -- .../src/models/Order.ts | 8 ----- .../builds/with-interfaces/docs/Order.md | 2 -- .../builds/with-interfaces/models/Order.ts | 8 ----- .../builds/with-npm-version/docs/Order.md | 2 -- .../with-npm-version/src/models/Order.ts | 8 ----- .../without-runtime-checks/docs/Order.md | 1 - .../src/models/index.ts | 6 ---- .../typescript-inversify/model/order.ts | 4 --- .../typescript-jquery/default/model/Order.ts | 5 --- .../typescript-jquery/npm/model/Order.ts | 5 --- .../typescript-node/default/model/order.ts | 9 ------ .../typescript-node/npm/model/order.ts | 9 ------ .../with-npm-version/src/models/Order.ts | 8 ----- .../builds/default/models/Order.ts | 6 ---- .../builds/es6-target/models/Order.ts | 6 ---- .../builds/with-npm-version/models/Order.ts | 6 ---- .../with-progress-subscriber/models/Order.ts | 6 ---- .../Org.OpenAPITools/Controllers/StoreApi.cs | 8 ++--- .../src/Org.OpenAPITools/Models/Order.cs | 16 ---------- .../wwwroot/openapi-original.json | 6 ---- .../petstore/cpp-pistache/model/Order.cpp | 31 +------------------ .../petstore/cpp-pistache/model/Order.h | 9 ------ .../server/src/models/OAIOrder.cpp | 30 ------------------ .../server/src/models/OAIOrder.h | 9 ------ .../app/apimodels/Order.java | 25 +-------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 25 +-------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 25 +-------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 24 +------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 25 +-------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 25 +-------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 25 +-------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 25 +-------------- .../app/apimodels/Order.java | 25 +-------------- .../public/openapi.json | 6 ---- .../app/apimodels/Order.java | 25 +-------------- .../java-play-framework/public/openapi.json | 6 ---- .../java/org/openapitools/model/Order.java | 29 +---------------- .../java/org/openapitools/model/Order.java | 29 +---------------- .../java/org/openapitools/model/Order.java | 18 +---------- .../java/org/openapitools/model/Order.java | 18 +---------- .../java/org/openapitools/model/Order.java | 18 +---------- .../java/org/openapitools/model/Order.java | 18 +---------- .../java/org/openapitools/model/Order.java | 18 +---------- .../java/org/openapitools/model/Order.java | 18 +---------- .../org/openapitools/server/apis/StoreApi.kt | 2 -- .../org/openapitools/server/models/Order.kt | 3 -- .../org/openapitools/server/models/Order.kt | 6 ---- .../org/openapitools/server/models/Order.kt | 6 ---- .../org/openapitools/server/apis/StoreApi.kt | 2 -- .../org/openapitools/server/models/Order.kt | 3 -- .../kotlin/org/openapitools/model/Order.kt | 5 --- .../src/main/resources/openapi.yaml | 8 ----- .../org/openapitools/api/StoreApiDelegate.kt | 8 ++--- .../kotlin/org/openapitools/model/Order.kt | 4 --- .../kotlin/org/openapitools/model/Order.kt | 4 --- .../kotlin/org/openapitools/model/Order.kt | 5 --- .../src/main/resources/openapi.yaml | 8 ----- .../kotlin/org/openapitools/model/Order.kt | 5 --- .../src/main/resources/openapi.yaml | 8 ----- .../kotlin/org/openapitools/model/Order.kt | 4 --- .../openapitools/server/api/model/Order.kt | 3 -- .../openapitools/server/api/model/Order.kt | 3 -- .../src/openapi_server/models/order.py | 29 +---------------- .../src/openapi_server/openapi/openapi.yaml | 9 ------ .../app/openapi_server/models/order.py | 30 +----------------- .../openapi_server/Order_ResourceType.tosca | 5 --- 134 files changed, 31 insertions(+), 1053 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore.yaml index ed47a090465a..36a05a5f6fe9 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore.yaml @@ -580,10 +580,6 @@ definitions: shipDate: type: string format: date-time - stringWithAttemptedInjection: - type: string - description: 'This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline' - example: '${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline' status: type: string description: Order Status diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp index 7b08534aea2f..e5682b2df935 100644 --- a/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp +++ b/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp @@ -95,10 +95,6 @@ void OpenAPIOrder::WriteJson(JsonWriter& Writer) const { Writer->WriteIdentifierPrefix(TEXT("shipDate")); WriteJsonValue(Writer, ShipDate.GetValue()); } - if (StringWithAttemptedInjection.IsSet()) - { - Writer->WriteIdentifierPrefix(TEXT("stringWithAttemptedInjection")); WriteJsonValue(Writer, StringWithAttemptedInjection.GetValue()); - } if (Status.IsSet()) { Writer->WriteIdentifierPrefix(TEXT("status")); WriteJsonValue(Writer, Status.GetValue()); @@ -122,7 +118,6 @@ bool OpenAPIOrder::FromJson(const TSharedPtr& JsonValue) ParseSuccess &= TryGetJsonValue(*Object, TEXT("petId"), PetId); ParseSuccess &= TryGetJsonValue(*Object, TEXT("quantity"), Quantity); ParseSuccess &= TryGetJsonValue(*Object, TEXT("shipDate"), ShipDate); - ParseSuccess &= TryGetJsonValue(*Object, TEXT("stringWithAttemptedInjection"), StringWithAttemptedInjection); ParseSuccess &= TryGetJsonValue(*Object, TEXT("status"), Status); ParseSuccess &= TryGetJsonValue(*Object, TEXT("complete"), Complete); diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h index 6431c9a94d50..9abc0bce3f65 100644 --- a/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h +++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h @@ -33,8 +33,6 @@ class OPENAPI_API OpenAPIOrder : public Model TOptional PetId; TOptional Quantity; TOptional ShipDate; - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - TOptional StringWithAttemptedInjection; enum class StatusEnum { Placed, diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java index 2cbae161ed16..5765180bea89 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java @@ -32,13 +32,6 @@ public class Order { private Date shipDate; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - - private String stringWithAttemptedInjection; - public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -153,24 +146,6 @@ public Order shipDate(Date shipDate) { return this; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - /** * Order Status * @return status @@ -223,14 +198,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -242,7 +216,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java index 672b6c97dae0..3a479cb74895 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java @@ -30,13 +30,6 @@ public class Order { private Date shipDate; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - - private String stringWithAttemptedInjection; - public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -149,24 +142,6 @@ public Order shipDate(Date shipDate) { return this; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - /** * Order Status * @return status @@ -219,14 +194,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -238,7 +212,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/kotlin-explicit/docs/Order.md b/samples/client/petstore/kotlin-explicit/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-explicit/docs/Order.md +++ b/samples/client/petstore/kotlin-explicit/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt index 7d28429a6231..a3582b27d988 100644 --- a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ public data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-jackson/docs/Order.md b/samples/client/petstore/kotlin-jackson/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-jackson/docs/Order.md +++ b/samples/client/petstore/kotlin-jackson/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt index dcc4e2197021..0bd2e61f4f4d 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @get:JsonProperty("stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt index ac455d782aad..7f1cd63d1bd7 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @get:JsonProperty("stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt index 2592894a0e77..8204b2c16617 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @SerializedName("shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @SerializedName("stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @SerializedName("status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md b/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md index f7781eff28d4..bc768aa93288 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt index fb43247f19af..126390b0f0cf 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: kotlin.time.Instant? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-modelMutable/docs/Order.md b/samples/client/petstore/kotlin-modelMutable/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-modelMutable/docs/Order.md +++ b/samples/client/petstore/kotlin-modelMutable/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt index 6ed67f9f39dd..3a3ffa18ce06 100644 --- a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @Json(name = "shipDate") var shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - var stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") var status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md b/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md +++ b/samples/client/petstore/kotlin-moshi-codegen/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt index f51fafb74ab6..9ce9a41d528e 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md index f7781eff28d4..bc768aa93288 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index 7954d534f3de..36b2997c7f5a 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -35,7 +35,6 @@ import kotlinx.serialization.encoding.* * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -51,9 +50,6 @@ data class Order ( @SerialName(value = "shipDate") val shipDate: kotlin.time.Instant? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @SerialName(value = "stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-multiplatform/docs/Order.md b/samples/client/petstore/kotlin-multiplatform/docs/Order.md index f7781eff28d4..bc768aa93288 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/Order.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index 7954d534f3de..36b2997c7f5a 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -35,7 +35,6 @@ import kotlinx.serialization.encoding.* * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -51,9 +50,6 @@ data class Order ( @SerialName(value = "shipDate") val shipDate: kotlin.time.Instant? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @SerialName(value = "stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-nonpublic/docs/Order.md b/samples/client/petstore/kotlin-nonpublic/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-nonpublic/docs/Order.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt index 89ab558f08f4..f9ceb7993809 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ internal data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-nullable/docs/Order.md b/samples/client/petstore/kotlin-nullable/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-nullable/docs/Order.md +++ b/samples/client/petstore/kotlin-nullable/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt index 5e162720300e..27c6db7f87e1 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -35,7 +35,6 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -55,10 +54,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt index 57b4bf69b61d..0e613651113b 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -36,7 +36,6 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -56,10 +55,6 @@ data class Order ( @Contextual @SerialName(value = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @SerialName(value = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md b/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt index 14b7aaa89594..49a20f1341f3 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-retrofit2/docs/Order.md b/samples/client/petstore/kotlin-retrofit2/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin-retrofit2/docs/Order.md +++ b/samples/client/petstore/kotlin-retrofit2/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt index 14b7aaa89594..49a20f1341f3 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-string/docs/Order.md b/samples/client/petstore/kotlin-string/docs/Order.md index e7ebd00a319d..536547f457f5 100644 --- a/samples/client/petstore/kotlin-string/docs/Order.md +++ b/samples/client/petstore/kotlin-string/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | **kotlin.String** | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt index 79161f524c1f..e481bafee69a 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -35,7 +35,6 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -55,10 +54,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: kotlin.String? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-threetenbp/docs/Order.md b/samples/client/petstore/kotlin-threetenbp/docs/Order.md index 8590a7d1e741..72a418dabd44 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/Order.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**org.threeten.bp.OffsetDateTime**](org.threeten.bp.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt index 0e5765b8c34e..2ad664202d75 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -34,7 +34,6 @@ import com.squareup.moshi.JsonClass * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -54,10 +53,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: org.threeten.bp.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin/docs/Order.md b/samples/client/petstore/kotlin/docs/Order.md index dac8a5a4df01..7b7a399f7f75 100644 --- a/samples/client/petstore/kotlin/docs/Order.md +++ b/samples/client/petstore/kotlin/docs/Order.md @@ -8,7 +8,6 @@ | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | | **shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] | -| **stringWithAttemptedInjection** | **kotlin.String** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt index 5e162720300e..27c6db7f87e1 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -35,7 +35,6 @@ import java.io.Serializable * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -55,10 +54,6 @@ data class Order ( @Json(name = "shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - @Json(name = "stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @Json(name = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/typescript-aurelia/default/models.ts b/samples/client/petstore/typescript-aurelia/default/models.ts index 4bf029c7745a..92e8ed2dc0db 100644 --- a/samples/client/petstore/typescript-aurelia/default/models.ts +++ b/samples/client/petstore/typescript-aurelia/default/models.ts @@ -38,10 +38,6 @@ export interface Order { petId?: number; quantity?: number; shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - stringWithAttemptedInjection?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index 19928440c884..fb7b6744d6aa 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -46,10 +46,6 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/default/docs/Order.md b/samples/client/petstore/typescript-axios/builds/default/docs/Order.md index 8a712b7b3dc7..837df81ca85f 100644 --- a/samples/client/petstore/typescript-axios/builds/default/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/default/docs/Order.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] -**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -24,7 +23,6 @@ const instance: Order = { petId, quantity, shipDate, - stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index 19928440c884..fb7b6744d6aa 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -46,10 +46,6 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md b/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md index a58c4b2913fa..72224c3de918 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/es6-target/docs/Order.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] -**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -24,7 +23,6 @@ const instance: Order = { petId, quantity, shipDate, - stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts index a5bf6638f09f..631262349227 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/api.ts @@ -46,10 +46,6 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md index 8a712b7b3dc7..837df81ca85f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/docs/Order.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] -**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -24,7 +23,6 @@ const instance: Order = { petId, quantity, shipDate, - stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index 123172ebe229..a2e7d8c95bb2 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -46,10 +46,6 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md index 8a712b7b3dc7..837df81ca85f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/docs/Order.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] -**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -24,7 +23,6 @@ const instance: Order = { petId, quantity, shipDate, - stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md index a58c4b2913fa..72224c3de918 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/docs/Order.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] -**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -24,7 +23,6 @@ const instance: Order = { petId, quantity, shipDate, - stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts index 7b9995ad08dd..dd8b5d3eb547 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts @@ -22,10 +22,6 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index 19928440c884..fb7b6744d6aa 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -46,10 +46,6 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md index a58c4b2913fa..72224c3de918 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/docs/Order.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] -**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -24,7 +23,6 @@ const instance: Order = { petId, quantity, shipDate, - stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts index 8995d3e4bafb..188ff2823dab 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts @@ -46,10 +46,6 @@ export interface Order { 'petId'?: number; 'quantity'?: number; 'shipDate'?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md b/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md index 8a712b7b3dc7..837df81ca85f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/docs/Order.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **petId** | **number** | | [optional] [default to undefined] **quantity** | **number** | | [optional] [default to undefined] **shipDate** | **string** | | [optional] [default to undefined] -**stringWithAttemptedInjection** | **string** | This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline | [optional] [default to undefined] **status** | **string** | Order Status | [optional] [default to undefined] **complete** | **boolean** | | [optional] [default to false] @@ -24,7 +23,6 @@ const instance: Order = { petId, quantity, shipDate, - stringWithAttemptedInjection, status, complete, }; diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md index 55e8ed8e60f3..e2527b3aa31c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md @@ -11,7 +11,6 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date -`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -26,7 +25,6 @@ const example = { "petId": null, "quantity": null, "shipDate": null, - "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts index e3893fd68257..7055ef2ef79a 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts @@ -43,12 +43,6 @@ export interface Order { * @memberof Order */ shipDate?: Date; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -96,7 +90,6 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), - 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -117,7 +110,6 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), - 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md index 7705500bbffc..3c1be2566f70 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/docs/Order.md @@ -11,7 +11,6 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date -`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -26,7 +25,6 @@ const example = { "petId": null, "quantity": null, "shipDate": null, - "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts index e3893fd68257..7055ef2ef79a 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts @@ -43,12 +43,6 @@ export interface Order { * @memberof Order */ shipDate?: Date; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -96,7 +90,6 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), - 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -117,7 +110,6 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), - 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md index 55e8ed8e60f3..e2527b3aa31c 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/docs/Order.md @@ -11,7 +11,6 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date -`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -26,7 +25,6 @@ const example = { "petId": null, "quantity": null, "shipDate": null, - "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts index e3893fd68257..7055ef2ef79a 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts @@ -43,12 +43,6 @@ export interface Order { * @memberof Order */ shipDate?: Date; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -96,7 +90,6 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), - 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -117,7 +110,6 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), - 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md index 7705500bbffc..3c1be2566f70 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/docs/Order.md @@ -11,7 +11,6 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date -`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -26,7 +25,6 @@ const example = { "petId": null, "quantity": null, "shipDate": null, - "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts index e3893fd68257..7055ef2ef79a 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts @@ -43,12 +43,6 @@ export interface Order { * @memberof Order */ shipDate?: Date; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -96,7 +90,6 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), - 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -117,7 +110,6 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), - 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md index 55e8ed8e60f3..e2527b3aa31c 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/docs/Order.md @@ -11,7 +11,6 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date -`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -26,7 +25,6 @@ const example = { "petId": null, "quantity": null, "shipDate": null, - "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts index e3893fd68257..7055ef2ef79a 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts @@ -43,12 +43,6 @@ export interface Order { * @memberof Order */ shipDate?: Date; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -96,7 +90,6 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), - 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -117,7 +110,6 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), - 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md index 7705500bbffc..3c1be2566f70 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/docs/Order.md @@ -11,7 +11,6 @@ Name | Type `petId` | number `quantity` | number `shipDate` | Date -`stringWithAttemptedInjection` | string `status` | string `complete` | boolean @@ -26,7 +25,6 @@ const example = { "petId": null, "quantity": null, "shipDate": null, - "stringWithAttemptedInjection": ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline, "status": null, "complete": null, } satisfies Order diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts index e3893fd68257..7055ef2ef79a 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts @@ -43,12 +43,6 @@ export interface Order { * @memberof Order */ shipDate?: Date; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} @@ -96,7 +90,6 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord 'petId': json['petId'] == null ? undefined : json['petId'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])), - 'stringWithAttemptedInjection': json['stringWithAttemptedInjection'] == null ? undefined : json['stringWithAttemptedInjection'], 'status': json['status'] == null ? undefined : json['status'], 'complete': json['complete'] == null ? undefined : json['complete'], }; @@ -117,7 +110,6 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool 'petId': value['petId'], 'quantity': value['quantity'], 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(), - 'stringWithAttemptedInjection': value['stringWithAttemptedInjection'], 'status': value['status'], 'complete': value['complete'], }; diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md index 7e9d9168b254..1a0daa42d1f4 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/docs/Order.md @@ -11,7 +11,6 @@ Name | Type `petId` | number `quantity` | number `shipDate` | string -`stringWithAttemptedInjection` | string `status` | string `complete` | boolean diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts index 7b614c278c43..806093189e76 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/index.ts @@ -74,12 +74,6 @@ export interface Order { * @memberof Order */ shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {OrderStatusEnum} diff --git a/samples/client/petstore/typescript-inversify/model/order.ts b/samples/client/petstore/typescript-inversify/model/order.ts index a0f8379a3cfa..4bd3d5e3c678 100644 --- a/samples/client/petstore/typescript-inversify/model/order.ts +++ b/samples/client/petstore/typescript-inversify/model/order.ts @@ -19,10 +19,6 @@ export interface Order { petId?: number; quantity?: number; shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - stringWithAttemptedInjection?: string; /** * Order Status */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Order.ts b/samples/client/petstore/typescript-jquery/default/model/Order.ts index f5a0439d050d..af5570597c88 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Order.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Order.ts @@ -24,11 +24,6 @@ export interface Order { shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - stringWithAttemptedInjection?: string; - /** * Order Status */ diff --git a/samples/client/petstore/typescript-jquery/npm/model/Order.ts b/samples/client/petstore/typescript-jquery/npm/model/Order.ts index f5a0439d050d..af5570597c88 100644 --- a/samples/client/petstore/typescript-jquery/npm/model/Order.ts +++ b/samples/client/petstore/typescript-jquery/npm/model/Order.ts @@ -24,11 +24,6 @@ export interface Order { shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - stringWithAttemptedInjection?: string; - /** * Order Status */ diff --git a/samples/client/petstore/typescript-node/default/model/order.ts b/samples/client/petstore/typescript-node/default/model/order.ts index 15cb963f8f17..f3af391f88d2 100644 --- a/samples/client/petstore/typescript-node/default/model/order.ts +++ b/samples/client/petstore/typescript-node/default/model/order.ts @@ -21,10 +21,6 @@ export class Order { 'quantity'?: number; 'shipDate'?: Date; /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; - /** * Order Status */ 'status'?: Order.StatusEnum; @@ -53,11 +49,6 @@ export class Order { "baseName": "shipDate", "type": "Date" }, - { - "name": "stringWithAttemptedInjection", - "baseName": "stringWithAttemptedInjection", - "type": "string" - }, { "name": "status", "baseName": "status", diff --git a/samples/client/petstore/typescript-node/npm/model/order.ts b/samples/client/petstore/typescript-node/npm/model/order.ts index 15cb963f8f17..f3af391f88d2 100644 --- a/samples/client/petstore/typescript-node/npm/model/order.ts +++ b/samples/client/petstore/typescript-node/npm/model/order.ts @@ -21,10 +21,6 @@ export class Order { 'quantity'?: number; 'shipDate'?: Date; /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - 'stringWithAttemptedInjection'?: string; - /** * Order Status */ 'status'?: Order.StatusEnum; @@ -53,11 +49,6 @@ export class Order { "baseName": "shipDate", "type": "Date" }, - { - "name": "stringWithAttemptedInjection", - "baseName": "stringWithAttemptedInjection", - "type": "string" - }, { "name": "status", "baseName": "status", diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts index c60369ef48b3..ff701de3c3b2 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/models/Order.ts @@ -42,12 +42,6 @@ export interface Order { * @memberof Order */ shipDate?: Date; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {string} @@ -68,7 +62,6 @@ export function OrderFromJSON(json: any): Order { 'petId': !exists(json, 'petId') ? undefined : json['petId'], 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'], 'shipDate': !exists(json, 'shipDate') ? undefined : new Date(json['shipDate']), - 'stringWithAttemptedInjection': !exists(json, 'stringWithAttemptedInjection') ? undefined : json['stringWithAttemptedInjection'], 'status': !exists(json, 'status') ? undefined : json['status'], 'complete': !exists(json, 'complete') ? undefined : json['complete'], }; @@ -83,7 +76,6 @@ export function OrderToJSON(value?: Order): any { 'petId': value.petId, 'quantity': value.quantity, 'shipDate': value.shipDate === undefined ? undefined : value.shipDate.toISOString(), - 'stringWithAttemptedInjection': value.stringWithAttemptedInjection, 'status': value.status, 'complete': value.complete, }; diff --git a/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts index 8322f85fc7bd..c6b7790d7024 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/models/Order.ts @@ -37,12 +37,6 @@ export interface Order { * @memberof Order */ shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts index 8322f85fc7bd..c6b7790d7024 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/models/Order.ts @@ -37,12 +37,6 @@ export interface Order { * @memberof Order */ shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts index 8322f85fc7bd..c6b7790d7024 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/models/Order.ts @@ -37,12 +37,6 @@ export interface Order { * @memberof Order */ shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts index 8322f85fc7bd..c6b7790d7024 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/models/Order.ts @@ -37,12 +37,6 @@ export interface Order { * @memberof Order */ shipDate?: string; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @type {string} - * @memberof Order - */ - stringWithAttemptedInjection?: string; /** * Order Status * @type {string} diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index adb5da825d33..b140b22d6595 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,8 +98,8 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"stringWithAttemptedInjection\" : \"${attemptedStringInter}\\backslash\\"\\"\\"attemptToBreakOutOfMultiline\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; - exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n ${attemptedStringInter}\backslash\"\"\"attemptToBreakOutOfMultiline\n aeiou\n true\n"; + exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; + exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) @@ -127,8 +127,8 @@ public virtual IActionResult PlaceOrder([FromBody]Order body) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"stringWithAttemptedInjection\" : \"${attemptedStringInter}\\backslash\\"\\"\\"attemptToBreakOutOfMultiline\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; - exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n ${attemptedStringInter}\backslash\"\"\"attemptToBreakOutOfMultiline\n aeiou\n true\n"; + exampleJson = "{\n \"id\" : 0,\n \"petId\" : 6,\n \"quantity\" : 1,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"status\" : \"placed\",\n \"complete\" : false\n}"; + exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs index 2710d493f3be..c570b90ac842 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs @@ -50,14 +50,6 @@ public partial class Order : IEquatable [DataMember(Name="shipDate", EmitDefaultValue=false)] public DateTime ShipDate { get; set; } - /// - /// This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - /// - /// This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - /* ${attemptedStringInter}\backslash"""attemptToBreakOutOfMultiline */ - [DataMember(Name="stringWithAttemptedInjection", EmitDefaultValue=false)] - public string StringWithAttemptedInjection { get; set; } - /// /// Order Status @@ -112,7 +104,6 @@ public override string ToString() sb.Append(" PetId: ").Append(PetId).Append("\n"); sb.Append(" Quantity: ").Append(Quantity).Append("\n"); sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" StringWithAttemptedInjection: ").Append(StringWithAttemptedInjection).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" Complete: ").Append(Complete).Append("\n"); sb.Append("}\n"); @@ -171,11 +162,6 @@ public bool Equals(Order other) ShipDate.Equals(other.ShipDate) ) && - ( - StringWithAttemptedInjection == other.StringWithAttemptedInjection || - StringWithAttemptedInjection != null && - StringWithAttemptedInjection.Equals(other.StringWithAttemptedInjection) - ) && ( Status == other.Status || @@ -206,8 +192,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + Quantity.GetHashCode(); hashCode = hashCode * 59 + ShipDate.GetHashCode(); - if (StringWithAttemptedInjection != null) - hashCode = hashCode * 59 + StringWithAttemptedInjection.GetHashCode(); hashCode = hashCode * 59 + Status.GetHashCode(); diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index 79de2c696b7a..36c014dba742 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -758,7 +758,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -779,11 +778,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/cpp-pistache/model/Order.cpp b/samples/server/petstore/cpp-pistache/model/Order.cpp index 26af1204205d..50206a78b420 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.cpp +++ b/samples/server/petstore/cpp-pistache/model/Order.cpp @@ -29,8 +29,6 @@ Order::Order() m_QuantityIsSet = false; m_ShipDate = ""; m_ShipDateIsSet = false; - m_StringWithAttemptedInjection = ""; - m_StringWithAttemptedInjectionIsSet = false; m_Status = ""; m_StatusIsSet = false; m_Complete = false; @@ -59,7 +57,7 @@ bool Order::validate(std::stringstream& msg, const std::string& pathPrefix) cons bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Order" : pathPrefix; - + return success; } @@ -81,9 +79,6 @@ bool Order::operator==(const Order& rhs) const ((!shipDateIsSet() && !rhs.shipDateIsSet()) || (shipDateIsSet() && rhs.shipDateIsSet() && getShipDate() == rhs.getShipDate())) && - ((!stringWithAttemptedInjectionIsSet() && !rhs.stringWithAttemptedInjectionIsSet()) || (stringWithAttemptedInjectionIsSet() && rhs.stringWithAttemptedInjectionIsSet() && getStringWithAttemptedInjection() == rhs.getStringWithAttemptedInjection())) && - - ((!statusIsSet() && !rhs.statusIsSet()) || (statusIsSet() && rhs.statusIsSet() && getStatus() == rhs.getStatus())) && @@ -108,8 +103,6 @@ void to_json(nlohmann::json& j, const Order& o) j["quantity"] = o.m_Quantity; if(o.shipDateIsSet()) j["shipDate"] = o.m_ShipDate; - if(o.stringWithAttemptedInjectionIsSet()) - j["stringWithAttemptedInjection"] = o.m_StringWithAttemptedInjection; if(o.statusIsSet()) j["status"] = o.m_Status; if(o.completeIsSet()) @@ -139,11 +132,6 @@ void from_json(const nlohmann::json& j, Order& o) j.at("shipDate").get_to(o.m_ShipDate); o.m_ShipDateIsSet = true; } - if(j.find("stringWithAttemptedInjection") != j.end()) - { - j.at("stringWithAttemptedInjection").get_to(o.m_StringWithAttemptedInjection); - o.m_StringWithAttemptedInjectionIsSet = true; - } if(j.find("status") != j.end()) { j.at("status").get_to(o.m_Status); @@ -225,23 +213,6 @@ void Order::unsetShipDate() { m_ShipDateIsSet = false; } -std::string Order::getStringWithAttemptedInjection() const -{ - return m_StringWithAttemptedInjection; -} -void Order::setStringWithAttemptedInjection(std::string const& value) -{ - m_StringWithAttemptedInjection = value; - m_StringWithAttemptedInjectionIsSet = true; -} -bool Order::stringWithAttemptedInjectionIsSet() const -{ - return m_StringWithAttemptedInjectionIsSet; -} -void Order::unsetStringWithAttemptedInjection() -{ - m_StringWithAttemptedInjectionIsSet = false; -} std::string Order::getStatus() const { return m_Status; diff --git a/samples/server/petstore/cpp-pistache/model/Order.h b/samples/server/petstore/cpp-pistache/model/Order.h index ae0358b3e0cd..0748745a14f0 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.h +++ b/samples/server/petstore/cpp-pistache/model/Order.h @@ -87,13 +87,6 @@ class Order bool shipDateIsSet() const; void unsetShipDate(); /// - /// This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - /// - std::string getStringWithAttemptedInjection() const; - void setStringWithAttemptedInjection(std::string const& value); - bool stringWithAttemptedInjectionIsSet() const; - void unsetStringWithAttemptedInjection(); - /// /// Order Status /// std::string getStatus() const; @@ -119,8 +112,6 @@ class Order bool m_QuantityIsSet; std::string m_ShipDate; bool m_ShipDateIsSet; - std::string m_StringWithAttemptedInjection; - bool m_StringWithAttemptedInjectionIsSet; std::string m_Status; bool m_StatusIsSet; bool m_Complete; diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp index e23b4de5c527..28536d66f27b 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.cpp @@ -45,9 +45,6 @@ void OAIOrder::initializeModel() { m_ship_date_isSet = false; m_ship_date_isValid = false; - m_string_with_attempted_injection_isSet = false; - m_string_with_attempted_injection_isValid = false; - m_status_isSet = false; m_status_isValid = false; @@ -76,9 +73,6 @@ void OAIOrder::fromJsonObject(QJsonObject json) { m_ship_date_isValid = ::OpenAPI::fromJsonValue(ship_date, json[QString("shipDate")]); m_ship_date_isSet = !json[QString("shipDate")].isNull() && m_ship_date_isValid; - m_string_with_attempted_injection_isValid = ::OpenAPI::fromJsonValue(string_with_attempted_injection, json[QString("stringWithAttemptedInjection")]); - m_string_with_attempted_injection_isSet = !json[QString("stringWithAttemptedInjection")].isNull() && m_string_with_attempted_injection_isValid; - m_status_isValid = ::OpenAPI::fromJsonValue(status, json[QString("status")]); m_status_isSet = !json[QString("status")].isNull() && m_status_isValid; @@ -107,9 +101,6 @@ QJsonObject OAIOrder::asJsonObject() const { if (m_ship_date_isSet) { obj.insert(QString("shipDate"), ::OpenAPI::toJsonValue(ship_date)); } - if (m_string_with_attempted_injection_isSet) { - obj.insert(QString("stringWithAttemptedInjection"), ::OpenAPI::toJsonValue(string_with_attempted_injection)); - } if (m_status_isSet) { obj.insert(QString("status"), ::OpenAPI::toJsonValue(status)); } @@ -183,22 +174,6 @@ bool OAIOrder::is_ship_date_Valid() const{ return m_ship_date_isValid; } -QString OAIOrder::getStringWithAttemptedInjection() const { - return string_with_attempted_injection; -} -void OAIOrder::setStringWithAttemptedInjection(const QString &string_with_attempted_injection) { - this->string_with_attempted_injection = string_with_attempted_injection; - this->m_string_with_attempted_injection_isSet = true; -} - -bool OAIOrder::is_string_with_attempted_injection_Set() const{ - return m_string_with_attempted_injection_isSet; -} - -bool OAIOrder::is_string_with_attempted_injection_Valid() const{ - return m_string_with_attempted_injection_isValid; -} - QString OAIOrder::getStatus() const { return status; } @@ -254,11 +229,6 @@ bool OAIOrder::isSet() const { break; } - if (m_string_with_attempted_injection_isSet) { - isObjectUpdated = true; - break; - } - if (m_status_isSet) { isObjectUpdated = true; break; diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h index 7d090f7cf1aa..0812753b8f19 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIOrder.h @@ -59,11 +59,6 @@ class OAIOrder : public OAIObject { bool is_ship_date_Set() const; bool is_ship_date_Valid() const; - QString getStringWithAttemptedInjection() const; - void setStringWithAttemptedInjection(const QString &string_with_attempted_injection); - bool is_string_with_attempted_injection_Set() const; - bool is_string_with_attempted_injection_Valid() const; - QString getStatus() const; void setStatus(const QString &status); bool is_status_Set() const; @@ -96,10 +91,6 @@ class OAIOrder : public OAIObject { bool m_ship_date_isSet; bool m_ship_date_isValid; - QString string_with_attempted_injection; - bool m_string_with_attempted_injection_isSet; - bool m_string_with_attempted_injection_isValid; - QString status; bool m_status_isSet; bool m_status_isValid; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java index 5f854688a991..e2410a375371 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java @@ -23,9 +23,6 @@ public class Order { @JsonProperty("shipDate") private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -133,23 +130,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -198,14 +178,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -218,7 +197,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-excp-handling/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-excp-handling/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Order.java b/samples/server/petstore/java-play-framework/app/apimodels/Order.java index 95760d7312cd..70d3431c2442 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Order.java @@ -30,10 +30,6 @@ public class Order { private OffsetDateTime shipDate; - @JsonProperty("stringWithAttemptedInjection") - - private String stringWithAttemptedInjection; - /** * Order Status */ @@ -143,23 +139,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - public Order status(StatusEnum status) { this.status = status; return this; @@ -208,14 +187,13 @@ public boolean equals(Object o) { Objects.equals(petId, order.petId) && Objects.equals(quantity, order.quantity) && Objects.equals(shipDate, order.shipDate) && - Objects.equals(stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(status, order.status) && Objects.equals(complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @SuppressWarnings("StringBufferReplaceableByString") @@ -228,7 +206,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index 028b77859bf4..c1ca9eb6d8e9 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -787,7 +787,6 @@ "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }, @@ -808,11 +807,6 @@ "format" : "date-time", "type" : "string" }, - "stringWithAttemptedInjection" : { - "description" : "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "example" : "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", - "type" : "string" - }, "status" : { "description" : "Order Status", "enum" : [ "placed", "approved", "delivered" ], diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java index f28d6312a6c5..1e9038ab5e8f 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Order.java @@ -34,13 +34,6 @@ public class Order { private Date shipDate; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - - private String stringWithAttemptedInjection; - public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -155,24 +148,6 @@ public Order shipDate(Date shipDate) { return this; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - /** * Order Status * @return status @@ -225,14 +200,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -244,7 +218,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java index f28d6312a6c5..1e9038ab5e8f 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Order.java @@ -34,13 +34,6 @@ public class Order { private Date shipDate; - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - */ - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - - private String stringWithAttemptedInjection; - public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -155,24 +148,6 @@ public Order shipDate(Date shipDate) { return this; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - * @return stringWithAttemptedInjection - **/ - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - - public Order stringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - return this; - } - /** * Order Status * @return status @@ -225,14 +200,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -244,7 +218,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java index 498ebaeb25fd..31fdca5b21a8 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java @@ -19,7 +19,6 @@ public class Order { private Long petId; private Integer quantity; private Date shipDate; - private String stringWithAttemptedInjection; /** * Order Status @@ -94,19 +93,6 @@ public void setShipDate(Date shipDate) { this.shipDate = shipDate; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - **/ - - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - /** * Order Status **/ @@ -146,14 +132,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -165,7 +150,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java index 7ec6475c9d06..067ec1ccc2c5 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java @@ -19,7 +19,6 @@ public class Order { private Long petId; private Integer quantity; private OffsetDateTime shipDate; - private String stringWithAttemptedInjection; /** * Order Status @@ -94,19 +93,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - **/ - - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - /** * Order Status **/ @@ -146,14 +132,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -165,7 +150,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java index 7d259bb0e1e5..035ab5ec1f84 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java @@ -19,7 +19,6 @@ public class Order { private Long petId; private Integer quantity; private DateTime shipDate; - private String stringWithAttemptedInjection; /** * Order Status @@ -94,19 +93,6 @@ public void setShipDate(DateTime shipDate) { this.shipDate = shipDate; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - **/ - - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - /** * Order Status **/ @@ -146,14 +132,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -165,7 +150,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java index c4968b50d6db..154e14a87486 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java @@ -19,7 +19,6 @@ public class Order { private Long petId; private Integer quantity; private Date shipDate; - private String stringWithAttemptedInjection; /** * Order Status @@ -94,19 +93,6 @@ public void setShipDate(Date shipDate) { this.shipDate = shipDate; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - **/ - - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - /** * Order Status **/ @@ -146,14 +132,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -165,7 +150,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java index d1a3b062210c..c96163f3dd4e 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java @@ -19,7 +19,6 @@ public class Order { private Long petId; private Integer quantity; private OffsetDateTime shipDate; - private String stringWithAttemptedInjection; /** * Order Status @@ -94,19 +93,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - **/ - - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - /** * Order Status **/ @@ -146,14 +132,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -165,7 +150,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java index 47b0dda5da62..fef298045c04 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java @@ -19,7 +19,6 @@ public class Order { private Long petId; private Integer quantity; private DateTime shipDate; - private String stringWithAttemptedInjection; /** * Order Status @@ -94,19 +93,6 @@ public void setShipDate(DateTime shipDate) { this.shipDate = shipDate; } - /** - * This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - **/ - - @ApiModelProperty(example = "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline") - @JsonProperty("stringWithAttemptedInjection") - public String getStringWithAttemptedInjection() { - return stringWithAttemptedInjection; - } - public void setStringWithAttemptedInjection(String stringWithAttemptedInjection) { - this.stringWithAttemptedInjection = stringWithAttemptedInjection; - } - /** * Order Status **/ @@ -146,14 +132,13 @@ public boolean equals(Object o) { Objects.equals(this.petId, order.petId) && Objects.equals(this.quantity, order.quantity) && Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.stringWithAttemptedInjection, order.stringWithAttemptedInjection) && Objects.equals(this.status, order.status) && Objects.equals(this.complete, order.complete); } @Override public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, stringWithAttemptedInjection, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } @Override @@ -165,7 +150,6 @@ public String toString() { sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" stringWithAttemptedInjection: ").append(toIndentedString(stringWithAttemptedInjection)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index c3622ae60d0c..0be923df150f 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -49,7 +49,6 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" @@ -68,7 +67,6 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt index 03fb968539ee..d5a9b56748f7 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,7 +19,6 @@ import kotlinx.serialization.Serializable * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -29,8 +28,6 @@ data class Order( var petId: kotlin.Long? = null, var quantity: kotlin.Int? = null, var shipDate: kotlin.String? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - var stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ var status: Order.Status? = null, var complete: kotlin.Boolean? = false diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt index d4c5586b156c..d4a39a2c2bb2 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,7 +19,6 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -43,11 +42,6 @@ data class Order ( @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - - @JsonProperty("stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @JsonProperty("status") diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt index d4c5586b156c..d4a39a2c2bb2 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,7 +19,6 @@ import com.fasterxml.jackson.annotation.JsonProperty * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -43,11 +42,6 @@ data class Order ( @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - - @JsonProperty("stringWithAttemptedInjection") - val stringWithAttemptedInjection: kotlin.String? = null, - /* Order Status */ @JsonProperty("status") diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt index c3622ae60d0c..0be923df150f 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -49,7 +49,6 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" @@ -68,7 +67,6 @@ fun Route.StoreApi() { "petId" : 6, "quantity" : 1, "shipDate" : "2000-01-23T04:56:07.000+00:00", - "stringWithAttemptedInjection" : "${'$'}{attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", "status" : "placed", "complete" : false }""" diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt index be9d8e2ae790..b1a711510fc6 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -19,7 +19,6 @@ import kotlinx.serialization.Serializable * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -29,8 +28,6 @@ data class Order( val petId: kotlin.Long? = null, val quantity: kotlin.Int? = null, val shipDate: kotlin.String? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - val stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ val status: Order.Status? = null, val complete: kotlin.Boolean? = false diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 022930a4c960..00a939158c1e 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.media.Schema * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -45,10 +44,6 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") var shipDate: java.time.OffsetDateTime? = null, - @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. \${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline") - @field:JsonSetter(nulls = Nulls.FAIL) - @get:JsonProperty("stringWithAttemptedInjection") var stringWithAttemptedInjection: kotlin.String? = null, - @Schema(example = "null", description = "Order Status") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") var status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml index c4bdd5d64507..10dc7fc1a3c7 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml @@ -570,7 +570,6 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 - stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -586,13 +585,6 @@ components: shipDate: format: date-time type: string - stringWithAttemptedInjection: - description: "This is an example of a string property that includes attempted\ - \ injection attack content. It should be properly escaped and handled\ - \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ - backslash\"\"\"attemptToBreakOutOfMultiline" - example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" - type: string status: description: Order Status enum: diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt index 996f7faf4f20..149de0c4dc14 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiDelegate.kt @@ -41,11 +41,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"stringWithAttemptedInjection\" : \"\${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline\", \"status\" : \"placed\", \"complete\" : false}") + ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"status\" : \"placed\", \"complete\" : false}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z \${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") break } } @@ -62,11 +62,11 @@ interface StoreApiDelegate { getRequest().ifPresent { request -> for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"stringWithAttemptedInjection\" : \"\${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline\", \"status\" : \"placed\", \"complete\" : false}") + ApiUtil.setExampleResponse(request, "application/json", "{ \"id\" : 0, \"petId\" : 6, \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"status\" : \"placed\", \"complete\" : false}") break } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z \${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline aeiou true") + ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true") break } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt index dac1916db3b0..f8819a1b18e2 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -22,7 +22,6 @@ import javax.validation.Valid * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -40,9 +39,6 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @field:JsonSetter(nulls = Nulls.FAIL) - @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, - @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index dac1916db3b0..f8819a1b18e2 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -22,7 +22,6 @@ import javax.validation.Valid * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -40,9 +39,6 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @field:JsonSetter(nulls = Nulls.FAIL) - @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, - @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index 5ef0685cf683..cd6d207bf7d5 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,7 +23,6 @@ import io.swagger.annotations.ApiModelProperty * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -45,10 +44,6 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", value = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. \${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline") - @field:JsonSetter(nulls = Nulls.FAIL) - @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "Order Status") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml index c4bdd5d64507..10dc7fc1a3c7 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml @@ -570,7 +570,6 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 - stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -586,13 +585,6 @@ components: shipDate: format: date-time type: string - stringWithAttemptedInjection: - description: "This is an example of a string property that includes attempted\ - \ injection attack content. It should be properly escaped and handled\ - \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ - backslash\"\"\"attemptToBreakOutOfMultiline" - example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" - type: string status: description: Order Status enum: diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index d80954eb4b2f..25a14fcf8421 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.media.Schema * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -45,10 +44,6 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @Schema(example = "\${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline", description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. \${attemptedStringInter}\\\\backslash\\\"\\\"\\\"attemptToBreakOutOfMultiline") - @field:JsonSetter(nulls = Nulls.FAIL) - @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, - @Schema(example = "null", description = "Order Status") @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml index c4bdd5d64507..10dc7fc1a3c7 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml @@ -570,7 +570,6 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 - stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -586,13 +585,6 @@ components: shipDate: format: date-time type: string - stringWithAttemptedInjection: - description: "This is an example of a string property that includes attempted\ - \ injection attack content. It should be properly escaped and handled\ - \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ - backslash\"\"\"attemptToBreakOutOfMultiline" - example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" - type: string status: description: Order Status enum: diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 69fc9b8bdb77..0aefed01433e 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -23,7 +23,6 @@ import javax.validation.Valid * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -41,9 +40,6 @@ data class Order( @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @field:JsonSetter(nulls = Nulls.FAIL) - @get:JsonProperty("stringWithAttemptedInjection") val stringWithAttemptedInjection: kotlin.String? = null, - @field:JsonSetter(nulls = Nulls.FAIL) @get:JsonProperty("status") val status: Order.Status? = null, diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt index 204970ecb05b..a25f7e74bc7f 100644 --- a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt @@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonInclude * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -33,8 +32,6 @@ data class Order ( var petId: kotlin.Long? = null, var quantity: kotlin.Int? = null, var shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - var stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ var status: Order.Status? = null, var complete: kotlin.Boolean? = false diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt index c95838b585ab..9078e0bdd256 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt @@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonInclude * @param petId * @param quantity * @param shipDate - * @param stringWithAttemptedInjection This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline * @param status Order Status * @param complete */ @@ -33,8 +32,6 @@ data class Order ( val petId: kotlin.Long? = null, val quantity: kotlin.Int? = null, val shipDate: java.time.OffsetDateTime? = null, - /* This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline */ - val stringWithAttemptedInjection: kotlin.String? = null, /* Order Status */ val status: Order.Status? = null, val complete: kotlin.Boolean? = false diff --git a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py index ab0803c0b2e0..6fab59c0350c 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py +++ b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/models/order.py @@ -14,14 +14,13 @@ class Order(Model): Do not edit the class manually. """ - def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, string_with_attempted_injection: str=None, status: str=None, complete: bool=False): + def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, status: str=None, complete: bool=False): """Order - a model defined in OpenAPI :param id: The id of this Order. :param pet_id: The pet_id of this Order. :param quantity: The quantity of this Order. :param ship_date: The ship_date of this Order. - :param string_with_attempted_injection: The string_with_attempted_injection of this Order. :param status: The status of this Order. :param complete: The complete of this Order. """ @@ -30,7 +29,6 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': int, 'quantity': int, 'ship_date': datetime, - 'string_with_attempted_injection': str, 'status': str, 'complete': bool } @@ -40,7 +38,6 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': 'petId', 'quantity': 'quantity', 'ship_date': 'shipDate', - 'string_with_attempted_injection': 'stringWithAttemptedInjection', 'status': 'status', 'complete': 'complete' } @@ -49,7 +46,6 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date self._pet_id = pet_id self._quantity = quantity self._ship_date = ship_date - self._string_with_attempted_injection = string_with_attempted_injection self._status = status self._complete = complete @@ -146,29 +142,6 @@ def ship_date(self, ship_date): self._ship_date = ship_date - @property - def string_with_attempted_injection(self): - """Gets the string_with_attempted_injection of this Order. - - This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - - :return: The string_with_attempted_injection of this Order. - :rtype: str - """ - return self._string_with_attempted_injection - - @string_with_attempted_injection.setter - def string_with_attempted_injection(self, string_with_attempted_injection): - """Sets the string_with_attempted_injection of this Order. - - This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline - - :param string_with_attempted_injection: The string_with_attempted_injection of this Order. - :type string_with_attempted_injection: str - """ - - self._string_with_attempted_injection = string_with_attempted_injection - @property def status(self): """Gets the status of this Order. diff --git a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml index efe61da2a715..ecfc98a40658 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml @@ -601,7 +601,6 @@ components: petId: 6 quantity: 1 shipDate: 2000-01-23T04:56:07.000+00:00 - stringWithAttemptedInjection: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" status: placed complete: false properties: @@ -621,14 +620,6 @@ components: format: date-time title: shipDate type: string - stringWithAttemptedInjection: - description: "This is an example of a string property that includes attempted\ - \ injection attack content. It should be properly escaped and handled\ - \ by the server to prevent security vulnerabilities. ${attemptedStringInter}\\\ - backslash\"\"\"attemptToBreakOutOfMultiline" - example: "${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" - title: stringWithAttemptedInjection - type: string status: description: Order Status enum: diff --git a/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py b/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py index ba421411e54c..dbf5ce956c49 100644 --- a/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py +++ b/samples/server/petstore/python-blueplanet/app/openapi_server/models/order.py @@ -15,7 +15,7 @@ class Order(Model): Do not edit the class manually. """ - def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, string_with_attempted_injection: str=None, status: str=None, complete: bool=False): # noqa: E501 + def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, status: str=None, complete: bool=False): # noqa: E501 """Order - a model defined in Swagger :param id: The id of this Order. # noqa: E501 @@ -26,8 +26,6 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date :type quantity: int :param ship_date: The ship_date of this Order. # noqa: E501 :type ship_date: datetime - :param string_with_attempted_injection: The string_with_attempted_injection of this Order. # noqa: E501 - :type string_with_attempted_injection: str :param status: The status of this Order. # noqa: E501 :type status: str :param complete: The complete of this Order. # noqa: E501 @@ -38,7 +36,6 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': int, 'quantity': int, 'ship_date': datetime, - 'string_with_attempted_injection': str, 'status': str, 'complete': bool } @@ -48,7 +45,6 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date 'pet_id': 'petId', 'quantity': 'quantity', 'ship_date': 'shipDate', - 'string_with_attempted_injection': 'stringWithAttemptedInjection', 'status': 'status', 'complete': 'complete' } @@ -57,7 +53,6 @@ def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date self._pet_id = pet_id self._quantity = quantity self._ship_date = ship_date - self._string_with_attempted_injection = string_with_attempted_injection self._status = status self._complete = complete @@ -156,29 +151,6 @@ def ship_date(self, ship_date: datetime): self._ship_date = ship_date - @property - def string_with_attempted_injection(self) -> str: - """Gets the string_with_attempted_injection of this Order. - - This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline # noqa: E501 - - :return: The string_with_attempted_injection of this Order. - :rtype: str - """ - return self._string_with_attempted_injection - - @string_with_attempted_injection.setter - def string_with_attempted_injection(self, string_with_attempted_injection: str): - """Sets the string_with_attempted_injection of this Order. - - This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline # noqa: E501 - - :param string_with_attempted_injection: The string_with_attempted_injection of this Order. - :type string_with_attempted_injection: str - """ - - self._string_with_attempted_injection = string_with_attempted_injection - @property def status(self) -> str: """Gets the status of this Order. diff --git a/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca b/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca index cb4757ae3f87..cf6768d1dea1 100644 --- a/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca +++ b/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/Order_ResourceType.tosca @@ -35,11 +35,6 @@ resourceTypes { description = "" optional = false } - string_with_attempted_injection { - type = string - description = "This is an example of a string property that includes attempted injection attack content. It should be properly escaped and handled by the server to prevent security vulnerabilities. ${attemptedStringInter}\\backslash\"\"\"attemptToBreakOutOfMultiline" - optional = false - } status { type = string description = "Order Status" From 56ea168cf28c3d5b8649441c95beab9c24ec4db7 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 8 Jun 2026 08:30:15 +0200 Subject: [PATCH 12/15] fix(kotlin-spring): escape interface property examples in schema annotations --- .../kotlin-spring/interfaceOptVar.mustache | 4 +- .../kotlin-spring/interfaceReqVar.mustache | 4 +- .../spring/KotlinSpringServerCodegenTest.java | 24 +++++++++++ .../cve-example-injection-discriminator.yaml | 41 +++++++++++++++++++ 4 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/kotlin/cve-example-injection-discriminator.yaml 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 c84d90fcae8b..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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/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 5818ad0aa9b2..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 = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{#lambdaEscapeInNormalString}}{{{description}}}{{/lambdaEscapeInNormalString}}"){{/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/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java index 6c6e0756a526..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 @@ -6729,4 +6729,28 @@ public void commentEndingInDescriptionIsSanitized() throws IOException { 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-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") From 8f103a7f716983a0a725ccb3eccbe7ce7a23e219 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 8 Jun 2026 08:42:08 +0200 Subject: [PATCH 13/15] escape triple quotes in a triple quote string --- .../codegen/languages/AbstractKotlinCodegen.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ceac1fc168f4..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 @@ -1321,8 +1321,13 @@ protected ImmutableMap.Builder addMustacheLambdas() { .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("$", "${'$'}") + .replace("\"\"\"", "${\"\\\"\\\"\\\"\"}") + )); } protected interface DataTypeAssigner { From 684e834e50e9dbe366d16cd253d1800c95cbf1f8 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 8 Jun 2026 08:54:02 +0200 Subject: [PATCH 14/15] Revert "escape triple quotes in a triple quote string" This reverts commit 8f103a7f716983a0a725ccb3eccbe7ce7a23e219. --- .../codegen/languages/AbstractKotlinCodegen.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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 b925719c3786..ceac1fc168f4 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 @@ -1321,13 +1321,8 @@ protected ImmutableMap.Builder addMustacheLambdas() { .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("\"\"\"", "${\"\\\"\\\"\\\"\"}") - )); + .replace("$", "${'$'}"))); } protected interface DataTypeAssigner { From 033a41e80813116ba3f0e0aa2ae134bd921e7e09 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Mon, 8 Jun 2026 08:54:06 +0200 Subject: [PATCH 15/15] Reapply "escape triple quotes in a triple quote string" This reverts commit 684e834e50e9dbe366d16cd253d1800c95cbf1f8. --- .../codegen/languages/AbstractKotlinCodegen.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ceac1fc168f4..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 @@ -1321,8 +1321,13 @@ protected ImmutableMap.Builder addMustacheLambdas() { .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("$", "${'$'}") + .replace("\"\"\"", "${\"\\\"\\\"\\\"\"}") + )); } protected interface DataTypeAssigner {