From d77baefb43dc35543c7934c1254ec5ceeab583d5 Mon Sep 17 00:00:00 2001 From: mHejlesen Date: Thu, 18 Jan 2024 08:37:15 +0100 Subject: [PATCH 1/2] Added option to mustache template that allows passing of non JSON request bodies --- docs/generators/fsharp-functions.md | 2 +- docs/generators/fsharp-giraffe-server.md | 2 +- docs/generators/java-inflector.md | 2 +- docs/generators/jaxrs-cxf-client.md | 2 +- docs/generators/swift5.md | 4 +- .../src/main/resources/bash/client.mustache | 40 +++++++++++++------ .../php-nextgen/.openapi-generator/FILES | 2 +- .../echo_api/php-nextgen/phpunit.xml.dist | 4 +- .../echo_api/r/.openapi-generator/FILES | 2 +- .../R-httr2-wrapper/.openapi-generator/FILES | 2 +- .../petstore/R-httr2/.openapi-generator/FILES | 2 +- .../petstore/R/.openapi-generator/FILES | 2 +- samples/client/petstore/bash/petstore-cli | 40 +++++++++++++------ .../.openapi-generator/FILES | 2 +- .../OpenAPIClient-php/phpunit.xml.dist | 4 +- .../.openapi-generator/FILES | 2 +- .../php/psr-18/.openapi-generator/FILES | 2 +- .../schema/postman-collection/postman.json | 4 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +++--- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 8 ++-- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- 45 files changed, 153 insertions(+), 125 deletions(-) diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index a20382152aab..33bd1f1c2922 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -34,7 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |OpenAPI/src| +|sourceFolder|source folder for generated code| |OpenAPI\src| ## IMPORT MAPPING diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index abe079e504fa..fb3e25b3d776 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageVersion|F# package version.| |1.0.0| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |OpenAPI/src| +|sourceFolder|source folder for generated code| |OpenAPI\src| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 467d92cf5cfb..c6685b322b4d 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -63,7 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/gen/java| +|sourceFolder|source folder for generated code| |src\gen\java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 2d18f1b22017..ecdb1dc3e22e 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -63,7 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/gen/java| +|sourceFolder|source folder for generated code| |src\gen\java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false| |useBeanValidation|Use BeanValidation API annotations| |false| diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 519ad121b837..4bfb9b4d3778 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -48,13 +48,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine, AsyncAwait are available.| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|swiftPackagePath|Set a custom source path instead of OpenAPIClient/Classes/OpenAPIs.| |null| +|swiftPackagePath|Set a custom source path instead of OpenAPIClient\Classes\OpenAPIs.| |null| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| |useBacktickEscapes|Escape reserved words using backticks (default: false)| |false| |useClasses|Use final classes for models instead of structs (default: false)| |false| |useCustomDateWithoutTime|Uses a custom type to decode and encode dates without time information to support OpenAPIs date format (default: false)| |false| |useJsonEncodable|Make models conform to JSONEncodable protocol (default: true)| |true| -|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null| +|useSPMFileStructure|Use SPM file structure and set the source path to Sources\{{projectName}} (default: false).| |null| |validatable|Make validation rules and validator for model properies (default: true)| |true| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/resources/bash/client.mustache b/modules/openapi-generator/src/main/resources/bash/client.mustache index 35d77892c098..bdb127643f8e 100644 --- a/modules/openapi-generator/src/main/resources/bash/client.mustache +++ b/modules/openapi-generator/src/main/resources/bash/client.mustache @@ -330,20 +330,24 @@ header_arguments_to_curl() { # ############################################################################## body_parameters_to_json() { - local body_json="-d '{" - local count=0 - for key in "${!body_parameters[@]}"; do - if [[ $((count++)) -gt 0 ]]; then - body_json+=", " - fi - body_json+="\"${key}\": ${body_parameters[${key}]}" - done - body_json+="}'" - - if [[ "${#body_parameters[@]}" -eq 0 ]]; then - echo "" + if [[ $RAW_BODY == "1" ]]; then + echo "-d '${body_parameters["RAW_BODY"]}'" else - echo "${body_json}" + local body_json="-d '{" + local count=0 + for key in "${!body_parameters[@]}"; do + if [[ $((count++)) -gt 0 ]]; then + body_json+=", " + fi + body_json+="\"${key}\": ${body_parameters[${key}]}" + done + body_json+="}'" + + if [[ "${#body_parameters[@]}" -eq 0 ]]; then + echo "" + else + echo "${body_json}" + fi fi } @@ -1002,6 +1006,16 @@ case $key in body_parameters[${body_key}]="\"${body_value}\"" fi ;; + --body=*) + # Parse value of body as argument and convert it into only + # the raw body content + if [[ "$operation" ]]; then + IFS='--body=' read -r body_value <<< "$key" + body_value=${body_value##--body=} + body_parameters["RAW_BODY"]="${body_value}" + RAW_BODY=1 + fi + ;; *:=*) # Parse body arguments and convert them into top level # JSON properties passed in the body content without quotes diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES index 82705c8ca1df..cc653436182a 100644 --- a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES @@ -23,13 +23,13 @@ docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md git_push.sh phpunit.xml.dist +src/ApiException.php src/Api/AuthApi.php src/Api/BodyApi.php src/Api/FormApi.php src/Api/HeaderApi.php src/Api/PathApi.php src/Api/QueryApi.php -src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/Bird.php diff --git a/samples/client/echo_api/php-nextgen/phpunit.xml.dist b/samples/client/echo_api/php-nextgen/phpunit.xml.dist index 1135449a8d9b..cba878f52707 100644 --- a/samples/client/echo_api/php-nextgen/phpunit.xml.dist +++ b/samples/client/echo_api/php-nextgen/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src/Api - ./src/Model + ./src\/Api + ./src\/Model diff --git a/samples/client/echo_api/r/.openapi-generator/FILES b/samples/client/echo_api/r/.openapi-generator/FILES index 00661ff72f60..cd2b6523cb23 100644 --- a/samples/client/echo_api/r/.openapi-generator/FILES +++ b/samples/client/echo_api/r/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/api_client.R R/api_response.R R/auth_api.R @@ -24,7 +25,6 @@ R/string_enum_ref.R R/tag.R R/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.R R/test_query_style_form_explode_true_array_string_query_object_parameter.R -README.md docs/AuthApi.md docs/Bird.md docs/BodyApi.md diff --git a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES index 5023966da14b..b9658e3d5de3 100644 --- a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -38,7 +39,6 @@ R/user.R R/user_api.R R/whale.R R/zebra.R -README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R-httr2/.openapi-generator/FILES b/samples/client/petstore/R-httr2/.openapi-generator/FILES index e3ca4f60cbc2..c467fccedec9 100644 --- a/samples/client/petstore/R-httr2/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -37,7 +38,6 @@ R/user.R R/user_api.R R/whale.R R/zebra.R -README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index 9a7a9f21724e..ac7e2eda9209 100644 --- a/samples/client/petstore/R/.openapi-generator/FILES +++ b/samples/client/petstore/R/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -37,7 +38,6 @@ R/user.R R/user_api.R R/whale.R R/zebra.R -README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 18097dc76ccd..3ce7a2752022 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -492,20 +492,24 @@ header_arguments_to_curl() { # ############################################################################## body_parameters_to_json() { - local body_json="-d '{" - local count=0 - for key in "${!body_parameters[@]}"; do - if [[ $((count++)) -gt 0 ]]; then - body_json+=", " - fi - body_json+="\"${key}\": ${body_parameters[${key}]}" - done - body_json+="}'" - - if [[ "${#body_parameters[@]}" -eq 0 ]]; then - echo "" + if [[ $RAW_BODY == "1" ]]; then + echo "-d '${body_parameters["RAW_BODY"]}'" else - echo "${body_json}" + local body_json="-d '{" + local count=0 + for key in "${!body_parameters[@]}"; do + if [[ $((count++)) -gt 0 ]]; then + body_json+=", " + fi + body_json+="\"${key}\": ${body_parameters[${key}]}" + done + body_json+="}'" + + if [[ "${#body_parameters[@]}" -eq 0 ]]; then + echo "" + else + echo "${body_json}" + fi fi } @@ -3843,6 +3847,16 @@ case $key in body_parameters[${body_key}]="\"${body_value}\"" fi ;; + --body=*) + # Parse value of body as argument and convert it into only + # the raw body content + if [[ "$operation" ]]; then + IFS='--body=' read -r body_value <<< "$key" + body_value=${body_value##--body=} + body_parameters["RAW_BODY"]="${body_value}" + RAW_BODY=1 + fi + ;; *:=*) # Parse body arguments and convert them into top level # JSON properties passed in the body content without quotes diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES index ec822fdd8838..8d58dbc93e12 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES @@ -63,6 +63,7 @@ docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh phpunit.xml.dist +src/ApiException.php src/Api/AnotherFakeApi.php src/Api/DefaultApi.php src/Api/FakeApi.php @@ -70,7 +71,6 @@ src/Api/FakeClassnameTags123Api.php src/Api/PetApi.php src/Api/StoreApi.php src/Api/UserApi.php -src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist index 1135449a8d9b..cba878f52707 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src/Api - ./src/Model + ./src\/Api + ./src\/Model diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index 80ecc7a7237f..64737d51568c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -60,6 +60,7 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh +lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -67,7 +68,6 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php -lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php lib/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php/psr-18/.openapi-generator/FILES b/samples/client/petstore/php/psr-18/.openapi-generator/FILES index 34aee01b39f6..c3884202a79d 100644 --- a/samples/client/petstore/php/psr-18/.openapi-generator/FILES +++ b/samples/client/petstore/php/psr-18/.openapi-generator/FILES @@ -60,6 +60,7 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh +lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -67,7 +68,6 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php -lib/ApiException.php lib/Configuration.php lib/DebugPlugin.php lib/HeaderSelector.php diff --git a/samples/schema/postman-collection/postman.json b/samples/schema/postman-collection/postman.json index 95542f3ff146..7319d7c58249 100644 --- a/samples/schema/postman-collection/postman.json +++ b/samples/schema/postman-collection/postman.json @@ -48,7 +48,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"firstName\" : \"Rebecca\"\n}", + "raw": "{ \n \"firstName\" : \"Rebecca\" \n}", "options": { "raw": { "language": "json" @@ -223,7 +223,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\" : 777,\n \"firstName\" : \"Alotta\",\n \"lastName\" : \"Rotta\",\n \"email\" : \"alotta.rotta@gmail.com\",\n \"dateOfBirth\" : \"1997-10-31\",\n \"emailVerified\" : true,\n \"createDate\" : \"2019-08-24\"\n}", + "raw": "{ \n \"id\" : 777, \n \"firstName\" : \"Alotta\", \n \"lastName\" : \"Rotta\", \n \"email\" : \"alotta.rotta@gmail.com\", \n \"dateOfBirth\" : \"1997-10-31\", \n \"emailVerified\" : true, \n \"createDate\" : \"2019-08-24\" \n}", "options": { "raw": { "language": "json" diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs index d4230ca5a4c5..9aa7c62b8e82 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonSerializer.Deserialize(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs index 2c52f026791d..edb6042856df 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs index 5a0951513f3d..98e67314721d 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs index fae01d29a624..64c652ea1875 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index 419bab14d099..562ee1b0ff43 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -86,7 +86,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -117,7 +117,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -151,7 +151,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -226,7 +226,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) 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 8e493e399264..8dc20ddadfc4 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ 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 \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs index 6669f0418cee..d1d13530b839 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -127,7 +127,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null From 787111e990e5756c3340c811492520de7b9e9390 Mon Sep 17 00:00:00 2001 From: mHejlesen Date: Fri, 19 Jan 2024 09:57:57 +0100 Subject: [PATCH 2/2] Used linux terminal to run the generator scripts --- docs/generators/fsharp-functions.md | 2 +- docs/generators/fsharp-giraffe-server.md | 2 +- docs/generators/java-inflector.md | 2 +- docs/generators/jaxrs-cxf-client.md | 2 +- docs/generators/swift5.md | 4 ++-- .../echo_api/php-nextgen/.openapi-generator/FILES | 2 +- samples/client/echo_api/php-nextgen/phpunit.xml.dist | 4 ++-- samples/client/echo_api/r/.openapi-generator/FILES | 2 +- .../R-httr2-wrapper/.openapi-generator/FILES | 2 +- .../client/petstore/R-httr2/.openapi-generator/FILES | 2 +- samples/client/petstore/R/.openapi-generator/FILES | 2 +- .../OpenAPIClient-php/.openapi-generator/FILES | 2 +- .../php-nextgen/OpenAPIClient-php/phpunit.xml.dist | 4 ++-- .../php/OpenAPIClient-php/.openapi-generator/FILES | 2 +- .../petstore/php/psr-18/.openapi-generator/FILES | 2 +- samples/schema/postman-collection/postman.json | 4 ++-- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 12 ++++++------ .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../src/Org.OpenAPITools/Controllers/PetApi.cs | 8 ++++---- .../src/Org.OpenAPITools/Controllers/StoreApi.cs | 4 ++-- .../src/Org.OpenAPITools/Controllers/UserApi.cs | 2 +- 43 files changed, 99 insertions(+), 99 deletions(-) diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 33bd1f1c2922..a20382152aab 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -34,7 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |OpenAPI\src| +|sourceFolder|source folder for generated code| |OpenAPI/src| ## IMPORT MAPPING diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index fb3e25b3d776..abe079e504fa 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageVersion|F# package version.| |1.0.0| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |OpenAPI\src| +|sourceFolder|source folder for generated code| |OpenAPI/src| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index c6685b322b4d..467d92cf5cfb 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -63,7 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src\gen\java| +|sourceFolder|source folder for generated code| |src/gen/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index ecdb1dc3e22e..2d18f1b22017 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -63,7 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src\gen\java| +|sourceFolder|source folder for generated code| |src/gen/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false| |useBeanValidation|Use BeanValidation API annotations| |false| diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 4bfb9b4d3778..519ad121b837 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -48,13 +48,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine, AsyncAwait are available.| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|swiftPackagePath|Set a custom source path instead of OpenAPIClient\Classes\OpenAPIs.| |null| +|swiftPackagePath|Set a custom source path instead of OpenAPIClient/Classes/OpenAPIs.| |null| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| |useBacktickEscapes|Escape reserved words using backticks (default: false)| |false| |useClasses|Use final classes for models instead of structs (default: false)| |false| |useCustomDateWithoutTime|Uses a custom type to decode and encode dates without time information to support OpenAPIs date format (default: false)| |false| |useJsonEncodable|Make models conform to JSONEncodable protocol (default: true)| |true| -|useSPMFileStructure|Use SPM file structure and set the source path to Sources\{{projectName}} (default: false).| |null| +|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null| |validatable|Make validation rules and validator for model properies (default: true)| |true| ## IMPORT MAPPING diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES index cc653436182a..82705c8ca1df 100644 --- a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES @@ -23,13 +23,13 @@ docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md git_push.sh phpunit.xml.dist -src/ApiException.php src/Api/AuthApi.php src/Api/BodyApi.php src/Api/FormApi.php src/Api/HeaderApi.php src/Api/PathApi.php src/Api/QueryApi.php +src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/Bird.php diff --git a/samples/client/echo_api/php-nextgen/phpunit.xml.dist b/samples/client/echo_api/php-nextgen/phpunit.xml.dist index cba878f52707..1135449a8d9b 100644 --- a/samples/client/echo_api/php-nextgen/phpunit.xml.dist +++ b/samples/client/echo_api/php-nextgen/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src\/Api - ./src\/Model + ./src/Api + ./src/Model diff --git a/samples/client/echo_api/r/.openapi-generator/FILES b/samples/client/echo_api/r/.openapi-generator/FILES index cd2b6523cb23..00661ff72f60 100644 --- a/samples/client/echo_api/r/.openapi-generator/FILES +++ b/samples/client/echo_api/r/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/api_client.R R/api_response.R R/auth_api.R @@ -25,6 +24,7 @@ R/string_enum_ref.R R/tag.R R/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.R R/test_query_style_form_explode_true_array_string_query_object_parameter.R +README.md docs/AuthApi.md docs/Bird.md docs/BodyApi.md diff --git a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES index b9658e3d5de3..5023966da14b 100644 --- a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -39,6 +38,7 @@ R/user.R R/user_api.R R/whale.R R/zebra.R +README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R-httr2/.openapi-generator/FILES b/samples/client/petstore/R-httr2/.openapi-generator/FILES index c467fccedec9..e3ca4f60cbc2 100644 --- a/samples/client/petstore/R-httr2/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -38,6 +37,7 @@ R/user.R R/user_api.R R/whale.R R/zebra.R +README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index ac7e2eda9209..9a7a9f21724e 100644 --- a/samples/client/petstore/R/.openapi-generator/FILES +++ b/samples/client/petstore/R/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -38,6 +37,7 @@ R/user.R R/user_api.R R/whale.R R/zebra.R +README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES index 8d58dbc93e12..ec822fdd8838 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES @@ -63,7 +63,6 @@ docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh phpunit.xml.dist -src/ApiException.php src/Api/AnotherFakeApi.php src/Api/DefaultApi.php src/Api/FakeApi.php @@ -71,6 +70,7 @@ src/Api/FakeClassnameTags123Api.php src/Api/PetApi.php src/Api/StoreApi.php src/Api/UserApi.php +src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist index cba878f52707..1135449a8d9b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src\/Api - ./src\/Model + ./src/Api + ./src/Model diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index 64737d51568c..80ecc7a7237f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -60,7 +60,6 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh -lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -68,6 +67,7 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php +lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php lib/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php/psr-18/.openapi-generator/FILES b/samples/client/petstore/php/psr-18/.openapi-generator/FILES index c3884202a79d..34aee01b39f6 100644 --- a/samples/client/petstore/php/psr-18/.openapi-generator/FILES +++ b/samples/client/petstore/php/psr-18/.openapi-generator/FILES @@ -60,7 +60,6 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh -lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -68,6 +67,7 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php +lib/ApiException.php lib/Configuration.php lib/DebugPlugin.php lib/HeaderSelector.php diff --git a/samples/schema/postman-collection/postman.json b/samples/schema/postman-collection/postman.json index 7319d7c58249..95542f3ff146 100644 --- a/samples/schema/postman-collection/postman.json +++ b/samples/schema/postman-collection/postman.json @@ -48,7 +48,7 @@ ], "body": { "mode": "raw", - "raw": "{ \n \"firstName\" : \"Rebecca\" \n}", + "raw": "{\n \"firstName\" : \"Rebecca\"\n}", "options": { "raw": { "language": "json" @@ -223,7 +223,7 @@ ], "body": { "mode": "raw", - "raw": "{ \n \"id\" : 777, \n \"firstName\" : \"Alotta\", \n \"lastName\" : \"Rotta\", \n \"email\" : \"alotta.rotta@gmail.com\", \n \"dateOfBirth\" : \"1997-10-31\", \n \"emailVerified\" : true, \n \"createDate\" : \"2019-08-24\" \n}", + "raw": "{\n \"id\" : 777,\n \"firstName\" : \"Alotta\",\n \"lastName\" : \"Rotta\",\n \"email\" : \"alotta.rotta@gmail.com\",\n \"dateOfBirth\" : \"1997-10-31\",\n \"emailVerified\" : true,\n \"createDate\" : \"2019-08-24\"\n}", "options": { "raw": { "language": "json" diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs index 9aa7c62b8e82..d4230ca5a4c5 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonSerializer.Deserialize(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs index edb6042856df..2c52f026791d 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs index 98e67314721d..5a0951513f3d 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs index 64c652ea1875..fae01d29a624 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index 562ee1b0ff43..419bab14d099 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -86,7 +86,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -117,7 +117,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //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 = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -151,7 +151,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //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 = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -226,7 +226,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) 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 8dc20ddadfc4..8e493e399264 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ 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 = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs index d1d13530b839..6669f0418cee 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -127,7 +127,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //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 = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null