From d531d2865fb32202bb284e6cd06d20ab659b1ca1 Mon Sep 17 00:00:00 2001 From: "Stephen (Alex) Wallen" Date: Fri, 31 May 2024 14:37:09 -1000 Subject: [PATCH 1/6] chore: add triggers --- .../main/resources/zapier/actions.mustache | 11 +++---- .../src/main/resources/zapier/index.mustache | 3 +- .../src/main/resources/zapier/utils.mustache | 11 +++++++ samples/client/petstore/zapier/README.md | 30 +++++++++++++++++-- 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/zapier/actions.mustache b/modules/openapi-generator/src/main/resources/zapier/actions.mustache index d398927b6d82..327518ec6728 100644 --- a/modules/openapi-generator/src/main/resources/zapier/actions.mustache +++ b/modules/openapi-generator/src/main/resources/zapier/actions.mustache @@ -3,9 +3,9 @@ const {{classname}} = require('../{{apiPackage}}/{{classname}}'); {{/apis}} {{/apiInfo}} -const { searchMiddleware, hasSearchRequisites, isSearchAction } = require('../utils/utils'); +const { triggerMiddleware, isTrigger, searchMiddleware, hasSearchRequisites, isSearchAction } = require('../utils/utils'); -const actions = { +const operations = { {{#apiInfo}} {{#apis}} {{#operations}} @@ -18,6 +18,7 @@ const actions = { } module.exports = { - searchActions: () => Object.entries(actions).reduce((actions, [key, value]) => isSearchAction(key) && hasSearchRequisites(value) ? {...actions, [key]: searchMiddleware(value)} : actions, {}), - createActions: () => Object.entries(actions).reduce((actions, [key, value]) => !isSearchAction(key) ? {...actions, [key]: value} : actions, {}), -} \ No newline at end of file + searchActions: () => Object.entries(operations).reduce((operations, [key, value]) => isSearchAction(key) && hasSearchRequisites(value) ? {...operations, [key]: searchMiddleware(value)} : operations, {}), + createActions: () => Object.entries(operations).reduce((operations, [key, value]) => !isSearchAction(key) ? {...operations, [key]: value} : operations, {}), + triggers: () => Object.entries(operations).reduce((operations, [key, value]) => isTrigger(key) ? {...operations, [key]: triggerMiddleware(value)} : operations, {}), +} diff --git a/modules/openapi-generator/src/main/resources/zapier/index.mustache b/modules/openapi-generator/src/main/resources/zapier/index.mustache index 8f60b0c7b1e6..2e98dba0e32c 100644 --- a/modules/openapi-generator/src/main/resources/zapier/index.mustache +++ b/modules/openapi-generator/src/main/resources/zapier/index.mustache @@ -1,5 +1,5 @@ const authentication = require('./authentication'); -const { searchActions, createActions } = require('./operations/actions'); +const { searchActions, createActions, triggers } = require('./operations/actions'); module.exports = { version: require('./package.json').version, @@ -7,4 +7,5 @@ module.exports = { authentication: authentication, searches: searchActions(), creates: createActions(), + triggers: triggers(), }; diff --git a/modules/openapi-generator/src/main/resources/zapier/utils.mustache b/modules/openapi-generator/src/main/resources/zapier/utils.mustache index b00174f3f7b0..07c4915aaae3 100644 --- a/modules/openapi-generator/src/main/resources/zapier/utils.mustache +++ b/modules/openapi-generator/src/main/resources/zapier/utils.mustache @@ -30,6 +30,15 @@ const requestOptionsMiddleware = (z, bundle, requestOptions) => { return requestOptions } +const isTrigger = (key) => { + // TODO: custom logic + return false +} + +const triggerMiddleware = (action) => { + return action +} + module.exports = { replacePathParameters: replacePathParameters, childMapping: childMapping, @@ -39,4 +48,6 @@ module.exports = { isSearchAction: isSearchAction, searchMiddleware: searchMiddleware, requestOptionsMiddleware: requestOptionsMiddleware, + isTrigger: isTrigger, + triggerMiddleware: triggerMiddleware, } diff --git a/samples/client/petstore/zapier/README.md b/samples/client/petstore/zapier/README.md index d12e0e96be25..01e3559bf81a 100644 --- a/samples/client/petstore/zapier/README.md +++ b/samples/client/petstore/zapier/README.md @@ -6,10 +6,12 @@ This generator generates a partial implementation of a zapier integration from a It's a partial integration because you have to put in some code for it to be 100% complete, code that depends only on how your api is structured. -Here there are all the parts you need to complete by yourself: +Here there are all the parts you need to complete by yourself: ### 1) **utils/utils.js** isSearchAction method + This method has to return either true or false if a method is a [zapier search action](https://platform.zapier.com/docs/search-create). + ``` const isSearchAction = (key) => { // TODO: custom logic @@ -18,6 +20,7 @@ const isSearchAction = (key) => { ``` ### 2) **utils/utils.js** searchMiddleware method + This method has to return an array of resources (searches must return an array), if you have pagination or you api returns an array inside nested fields, here you have to extract the array. ``` @@ -27,13 +30,34 @@ const searchMiddleware = (action) => { } ``` +### 3) **utils/utils.js** isTrigger method + +This method has to return either true or false if a method is a [zapier search action](https://platform.zapier.com/docs/search-create). + +``` +const isTrigger = (key) => { + // TODO: custom logic + return false +} +``` + +### 4) **utils/utils.js** searchMiddleware method + +``` +const triggerMiddleware = (action) => { + return action +} +``` + ### 3) **authentication.js** + This file must be written completely according to your api authentication, you can get it generated automatically by creating the integration on the zapier website and filling the requested data, or you can build it yourself following [this guide](https://platform.zapier.com/cli_tutorials/getting-started#adding-authentication). ## Samples -To get your app made public on zapier you must provide a sample (json example response) for each of your actions, these samples get automatically generated by this generator but you have to have actual response examples in you openapi file. -For example: +To get your app made public on zapier you must provide a sample (json example response) for each of your actions, these samples get automatically generated by this generator but you have to have actual response examples in you openapi file. + +For example: ``` CreateUserResponse: From 14a90d907e65bb9e13bcf374d2792185edf20162 Mon Sep 17 00:00:00 2001 From: "Stephen (Alex) Wallen" Date: Fri, 31 May 2024 14:47:53 -1000 Subject: [PATCH 2/6] chore: update samples --- .../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 +- .../.openapi-generator/FILES | 2 +- .../OpenAPIClient-php/phpunit.xml.dist | 4 +-- .../.openapi-generator/FILES | 2 +- .../php/psr-18/.openapi-generator/FILES | 2 +- samples/client/petstore/zapier/README.md | 30 ++----------------- samples/client/petstore/zapier/index.js | 3 +- .../petstore/zapier/operations/actions.js | 11 +++---- samples/client/petstore/zapier/utils/utils.js | 11 +++++++ .../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 +- 41 files changed, 113 insertions(+), 124 deletions(-) diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES index c51141c743e7..53ad43f78dc2 100644 --- a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES @@ -24,13 +24,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 cf3034e39d0c..79f7452245e1 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 @@ -25,7 +26,6 @@ R/tag.R R/test_form_object_multipart_request_marker.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 379998b2a2b8..03da4aaacabb 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 @@ -39,7 +40,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 07243c898d78..af8bc6f011d8 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 @@ -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/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index 43681d7ddb2c..d5c00e7a92f3 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 @@ -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/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/client/petstore/zapier/README.md b/samples/client/petstore/zapier/README.md index 01e3559bf81a..d12e0e96be25 100644 --- a/samples/client/petstore/zapier/README.md +++ b/samples/client/petstore/zapier/README.md @@ -6,12 +6,10 @@ This generator generates a partial implementation of a zapier integration from a It's a partial integration because you have to put in some code for it to be 100% complete, code that depends only on how your api is structured. -Here there are all the parts you need to complete by yourself: +Here there are all the parts you need to complete by yourself: ### 1) **utils/utils.js** isSearchAction method - This method has to return either true or false if a method is a [zapier search action](https://platform.zapier.com/docs/search-create). - ``` const isSearchAction = (key) => { // TODO: custom logic @@ -20,7 +18,6 @@ const isSearchAction = (key) => { ``` ### 2) **utils/utils.js** searchMiddleware method - This method has to return an array of resources (searches must return an array), if you have pagination or you api returns an array inside nested fields, here you have to extract the array. ``` @@ -30,34 +27,13 @@ const searchMiddleware = (action) => { } ``` -### 3) **utils/utils.js** isTrigger method - -This method has to return either true or false if a method is a [zapier search action](https://platform.zapier.com/docs/search-create). - -``` -const isTrigger = (key) => { - // TODO: custom logic - return false -} -``` - -### 4) **utils/utils.js** searchMiddleware method - -``` -const triggerMiddleware = (action) => { - return action -} -``` - ### 3) **authentication.js** - This file must be written completely according to your api authentication, you can get it generated automatically by creating the integration on the zapier website and filling the requested data, or you can build it yourself following [this guide](https://platform.zapier.com/cli_tutorials/getting-started#adding-authentication). ## Samples +To get your app made public on zapier you must provide a sample (json example response) for each of your actions, these samples get automatically generated by this generator but you have to have actual response examples in you openapi file. -To get your app made public on zapier you must provide a sample (json example response) for each of your actions, these samples get automatically generated by this generator but you have to have actual response examples in you openapi file. - -For example: +For example: ``` CreateUserResponse: diff --git a/samples/client/petstore/zapier/index.js b/samples/client/petstore/zapier/index.js index 8f60b0c7b1e6..2e98dba0e32c 100644 --- a/samples/client/petstore/zapier/index.js +++ b/samples/client/petstore/zapier/index.js @@ -1,5 +1,5 @@ const authentication = require('./authentication'); -const { searchActions, createActions } = require('./operations/actions'); +const { searchActions, createActions, triggers } = require('./operations/actions'); module.exports = { version: require('./package.json').version, @@ -7,4 +7,5 @@ module.exports = { authentication: authentication, searches: searchActions(), creates: createActions(), + triggers: triggers(), }; diff --git a/samples/client/petstore/zapier/operations/actions.js b/samples/client/petstore/zapier/operations/actions.js index d9a6a9afbbab..b939e528ac28 100644 --- a/samples/client/petstore/zapier/operations/actions.js +++ b/samples/client/petstore/zapier/operations/actions.js @@ -1,9 +1,9 @@ const PetApi = require('../apis/PetApi'); const StoreApi = require('../apis/StoreApi'); const UserApi = require('../apis/UserApi'); -const { searchMiddleware, hasSearchRequisites, isSearchAction } = require('../utils/utils'); +const { triggerMiddleware, isTrigger, searchMiddleware, hasSearchRequisites, isSearchAction } = require('../utils/utils'); -const actions = { +const operations = { [PetApi.addPet.key]: PetApi.addPet, [PetApi.deletePet.key]: PetApi.deletePet, [PetApi.findPetsByStatus.key]: PetApi.findPetsByStatus, @@ -27,6 +27,7 @@ const actions = { } module.exports = { - searchActions: () => Object.entries(actions).reduce((actions, [key, value]) => isSearchAction(key) && hasSearchRequisites(value) ? {...actions, [key]: searchMiddleware(value)} : actions, {}), - createActions: () => Object.entries(actions).reduce((actions, [key, value]) => !isSearchAction(key) ? {...actions, [key]: value} : actions, {}), -} \ No newline at end of file + searchActions: () => Object.entries(operations).reduce((operations, [key, value]) => isSearchAction(key) && hasSearchRequisites(value) ? {...operations, [key]: searchMiddleware(value)} : operations, {}), + createActions: () => Object.entries(operations).reduce((operations, [key, value]) => !isSearchAction(key) ? {...operations, [key]: value} : operations, {}), + triggers: () => Object.entries(operations).reduce((operations, [key, value]) => isTrigger(key) ? {...operations, [key]: triggerMiddleware(value)} : operations, {}), +} diff --git a/samples/client/petstore/zapier/utils/utils.js b/samples/client/petstore/zapier/utils/utils.js index b00174f3f7b0..07c4915aaae3 100644 --- a/samples/client/petstore/zapier/utils/utils.js +++ b/samples/client/petstore/zapier/utils/utils.js @@ -30,6 +30,15 @@ const requestOptionsMiddleware = (z, bundle, requestOptions) => { return requestOptions } +const isTrigger = (key) => { + // TODO: custom logic + return false +} + +const triggerMiddleware = (action) => { + return action +} + module.exports = { replacePathParameters: replacePathParameters, childMapping: childMapping, @@ -39,4 +48,6 @@ module.exports = { isSearchAction: isSearchAction, searchMiddleware: searchMiddleware, requestOptionsMiddleware: requestOptionsMiddleware, + isTrigger: isTrigger, + triggerMiddleware: triggerMiddleware, } 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 18ebc93584237ee5c6ec9f66fdf15fc6638aba10 Mon Sep 17 00:00:00 2001 From: "Stephen (Alex) Wallen" Date: Fri, 31 May 2024 14:48:04 -1000 Subject: [PATCH 3/6] chore: update docs --- 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 ++-- 5 files changed, 6 insertions(+), 6 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 8b8b35ea29dc..19f35d579274 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -65,7 +65,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 04ae1cfee4e1..e7ec0fadd8cc 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -65,7 +65,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 From bc89eba8d613cd6c98617d8269717d5302b85a98 Mon Sep 17 00:00:00 2001 From: "Stephen (Alex) Wallen" Date: Mon, 3 Jun 2024 11:36:40 -1000 Subject: [PATCH 4/6] feat: exclude api parameters (EM Only) --- .../openapi-generator/src/main/resources/zapier/api.mustache | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/zapier/api.mustache b/modules/openapi-generator/src/main/resources/zapier/api.mustache index 1c512e665c98..69e462b8c1c1 100644 --- a/modules/openapi-generator/src/main/resources/zapier/api.mustache +++ b/modules/openapi-generator/src/main/resources/zapier/api.mustache @@ -25,6 +25,9 @@ module.exports = { inputFields: [ {{#allParams}} {{#isPrimitiveType}} + {{#isHeaderParam}} + {{/isHeaderParam}} + {{^isHeaderParam}} { key: '{{baseName}}', label: '{{description}}', @@ -40,6 +43,7 @@ module.exports = { ], {{/isEnum}} }, + {{/isHeaderParam}} {{/isPrimitiveType}} {{^isPrimitiveType}} {{#isArray}} From f9d6b68dc7551aa0d4e5d47f8d5529ef3898745b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 22 Sep 2024 14:12:25 +0800 Subject: [PATCH 5/6] update samples --- .../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/client/petstore/zapier/apis/PetApi.js | 5 ----- .../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 +- 38 files changed, 91 insertions(+), 96 deletions(-) diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES index 53ad43f78dc2..c51141c743e7 100644 --- a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES @@ -24,13 +24,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 79f7452245e1..cf3034e39d0c 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 @@ -26,6 +25,7 @@ R/tag.R R/test_form_object_multipart_request_marker.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 03da4aaacabb..379998b2a2b8 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 @@ -40,6 +39,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 af8bc6f011d8..07243c898d78 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 @@ -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/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index d5c00e7a92f3..43681d7ddb2c 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 @@ -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/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES index 79fb5fa1e0b8..ebd39c9d9de9 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES @@ -64,7 +64,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 @@ -72,6 +71,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 292a6f738cdb..163723370d10 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -61,7 +61,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 @@ -69,6 +68,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 847ffe3304e0..26dfe36c4c49 100644 --- a/samples/client/petstore/php/psr-18/.openapi-generator/FILES +++ b/samples/client/petstore/php/psr-18/.openapi-generator/FILES @@ -61,7 +61,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 @@ -69,6 +68,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/client/petstore/zapier/apis/PetApi.js b/samples/client/petstore/zapier/apis/PetApi.js index 98b42df84caa..06e35bbad391 100644 --- a/samples/client/petstore/zapier/apis/PetApi.js +++ b/samples/client/petstore/zapier/apis/PetApi.js @@ -61,11 +61,6 @@ module.exports = { type: 'number', required: true, }, - { - key: 'api_key', - label: '', - type: 'string', - }, ], outputFields: [ ], 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 From 6d64a6755a980b15affee141cb610cb82875a08e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 22 Sep 2024 14:23:56 +0800 Subject: [PATCH 6/6] update doc --- 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 ++-- 5 files changed, 6 insertions(+), 6 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 19f35d579274..8b8b35ea29dc 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -65,7 +65,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 e7ec0fadd8cc..04ae1cfee4e1 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -65,7 +65,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