From 3e9c1e1fc3d19a4dfb2005e21492337ef8082f16 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Thu, 25 Feb 2021 13:29:34 +0100 Subject: [PATCH] [dart] Remove old leftover format parameter from path (#8834) --- .../src/main/resources/dart2/api.mustache | 2 +- .../petstore_client_lib/lib/api/pet_api.dart | 16 +++++----- .../lib/api/store_api.dart | 8 ++--- .../petstore_client_lib/lib/api/user_api.dart | 16 +++++----- .../petstore_client_lib/lib/api/pet_api.dart | 16 +++++----- .../lib/api/store_api.dart | 8 ++--- .../petstore_client_lib/lib/api/user_api.dart | 16 +++++----- .../lib/api/another_fake_api.dart | 2 +- .../lib/api/default_api.dart | 2 +- .../lib/api/fake_api.dart | 30 +++++++++---------- .../lib/api/fake_classname_tags123_api.dart | 2 +- .../lib/api/pet_api.dart | 18 +++++------ .../lib/api/store_api.dart | 8 ++--- .../lib/api/user_api.dart | 16 +++++----- .../lib/api/another_fake_api.dart | 2 +- .../lib/api/default_api.dart | 2 +- .../lib/api/fake_api.dart | 30 +++++++++---------- .../lib/api/fake_classname_tags123_api.dart | 2 +- .../lib/api/pet_api.dart | 18 +++++------ .../lib/api/store_api.dart | 8 ++--- .../lib/api/user_api.dart | 16 +++++----- 21 files changed, 119 insertions(+), 119 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart2/api.mustache b/modules/openapi-generator/src/main/resources/dart2/api.mustache index cc0bba98b46..ad30ec2cdf0 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api.mustache @@ -61,7 +61,7 @@ class {{{classname}}} { {{/allParams}} {{/hasParams}} - final path = '{{{path}}}'.replaceAll('{format}', 'json'){{#pathParams}} + final path = '{{{path}}}'{{#pathParams}} .replaceAll('{' + '{{{baseName}}}' + '}', {{{paramName}}}.toString()){{/pathParams}}; Object postBody{{#bodyParam}} = {{{paramName}}}{{/bodyParam}}; diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index 0bf9bd5595d..df7ee07412e 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -29,7 +29,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = body; @@ -94,7 +94,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -166,7 +166,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: status'); } - final path = '/pet/findByStatus'.replaceAll('{format}', 'json'); + final path = '/pet/findByStatus'; Object postBody; @@ -244,7 +244,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: tags'); } - final path = '/pet/findByTags'.replaceAll('{format}', 'json'); + final path = '/pet/findByTags'; Object postBody; @@ -322,7 +322,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -395,7 +395,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = body; @@ -464,7 +464,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -554,7 +554,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}/uploadImage'.replaceAll('{format}', 'json') + final path = '/pet/{petId}/uploadImage' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index fa0ac683e78..1f20bf42f74 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -31,7 +31,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{orderId}'.replaceAll('{format}', 'json') + final path = '/store/order/{orderId}' .replaceAll('{' + 'orderId' + '}', orderId.toString()); Object postBody; @@ -89,7 +89,7 @@ class StoreApi { /// /// Note: This method returns the HTTP [Response]. Future getInventoryWithHttpInfo() async { - final path = '/store/inventory'.replaceAll('{format}', 'json'); + final path = '/store/inventory'; Object postBody; @@ -158,7 +158,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{orderId}'.replaceAll('{format}', 'json') + final path = '/store/order/{orderId}' .replaceAll('{' + 'orderId' + '}', orderId.toString()); Object postBody; @@ -231,7 +231,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); } - final path = '/store/order'.replaceAll('{format}', 'json'); + final path = '/store/order'; Object postBody = body; diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart index de7e2ace8ce..a8a566239ca 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart @@ -31,7 +31,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); } - final path = '/user'.replaceAll('{format}', 'json'); + final path = '/user'; Object postBody = body; @@ -96,7 +96,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); } - final path = '/user/createWithArray'.replaceAll('{format}', 'json'); + final path = '/user/createWithArray'; Object postBody = body; @@ -159,7 +159,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); } - final path = '/user/createWithList'.replaceAll('{format}', 'json'); + final path = '/user/createWithList'; Object postBody = body; @@ -224,7 +224,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -290,7 +290,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -367,7 +367,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: password'); } - final path = '/user/login'.replaceAll('{format}', 'json'); + final path = '/user/login'; Object postBody; @@ -433,7 +433,7 @@ class UserApi { /// /// Note: This method returns the HTTP [Response]. Future logoutUserWithHttpInfo() async { - final path = '/user/logout'.replaceAll('{format}', 'json'); + final path = '/user/logout'; Object postBody; @@ -499,7 +499,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody = body; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index 630b93df846..f0d8178af25 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -29,7 +29,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = pet; @@ -101,7 +101,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -173,7 +173,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: status'); } - final path = '/pet/findByStatus'.replaceAll('{format}', 'json'); + final path = '/pet/findByStatus'; Object postBody; @@ -251,7 +251,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: tags'); } - final path = '/pet/findByTags'.replaceAll('{format}', 'json'); + final path = '/pet/findByTags'; Object postBody; @@ -329,7 +329,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -402,7 +402,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = pet; @@ -478,7 +478,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -568,7 +568,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}/uploadImage'.replaceAll('{format}', 'json') + final path = '/pet/{petId}/uploadImage' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index 66b0d59079d..121395c60f0 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -31,7 +31,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{orderId}'.replaceAll('{format}', 'json') + final path = '/store/order/{orderId}' .replaceAll('{' + 'orderId' + '}', orderId.toString()); Object postBody; @@ -89,7 +89,7 @@ class StoreApi { /// /// Note: This method returns the HTTP [Response]. Future getInventoryWithHttpInfo() async { - final path = '/store/inventory'.replaceAll('{format}', 'json'); + final path = '/store/inventory'; Object postBody; @@ -158,7 +158,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{orderId}'.replaceAll('{format}', 'json') + final path = '/store/order/{orderId}' .replaceAll('{' + 'orderId' + '}', orderId.toString()); Object postBody; @@ -231,7 +231,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: order'); } - final path = '/store/order'.replaceAll('{format}', 'json'); + final path = '/store/order'; Object postBody = order; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart index ed6dc5f0900..156dcc272a5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart @@ -31,7 +31,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user'.replaceAll('{format}', 'json'); + final path = '/user'; Object postBody = user; @@ -96,7 +96,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/createWithArray'.replaceAll('{format}', 'json'); + final path = '/user/createWithArray'; Object postBody = user; @@ -159,7 +159,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/createWithList'.replaceAll('{format}', 'json'); + final path = '/user/createWithList'; Object postBody = user; @@ -224,7 +224,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -290,7 +290,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -367,7 +367,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: password'); } - final path = '/user/login'.replaceAll('{format}', 'json'); + final path = '/user/login'; Object postBody; @@ -433,7 +433,7 @@ class UserApi { /// /// Note: This method returns the HTTP [Response]. Future logoutUserWithHttpInfo() async { - final path = '/user/logout'.replaceAll('{format}', 'json'); + final path = '/user/logout'; Object postBody; @@ -499,7 +499,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody = user; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart index 4427dbe17da..cdf8eb623c9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -31,7 +31,7 @@ class AnotherFakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); } - final path = '/another-fake/dummy'.replaceAll('{format}', 'json'); + final path = '/another-fake/dummy'; Object postBody = modelClient; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart index 73861456c98..24fba9d8349 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart @@ -17,7 +17,7 @@ class DefaultApi { /// Performs an HTTP 'GET /foo' operation and returns the [Response]. Future fooGetWithHttpInfo() async { - final path = '/foo'.replaceAll('{format}', 'json'); + final path = '/foo'; Object postBody; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart index af1425e338b..e81da089940 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart @@ -19,7 +19,7 @@ class FakeApi { /// /// Note: This method returns the HTTP [Response]. Future fakeHealthGetWithHttpInfo() async { - final path = '/fake/health'.replaceAll('{format}', 'json'); + final path = '/fake/health'; Object postBody; @@ -90,7 +90,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/fake/http-signature-test'.replaceAll('{format}', 'json'); + final path = '/fake/http-signature-test'; Object postBody = pet; @@ -164,7 +164,7 @@ class FakeApi { Future fakeOuterBooleanSerializeWithHttpInfo({ bool body }) async { // Verify required params are set. - final path = '/fake/outer/boolean'.replaceAll('{format}', 'json'); + final path = '/fake/outer/boolean'; Object postBody = body; @@ -231,7 +231,7 @@ class FakeApi { Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite outerComposite }) async { // Verify required params are set. - final path = '/fake/outer/composite'.replaceAll('{format}', 'json'); + final path = '/fake/outer/composite'; Object postBody = outerComposite; @@ -298,7 +298,7 @@ class FakeApi { Future fakeOuterNumberSerializeWithHttpInfo({ num body }) async { // Verify required params are set. - final path = '/fake/outer/number'.replaceAll('{format}', 'json'); + final path = '/fake/outer/number'; Object postBody = body; @@ -365,7 +365,7 @@ class FakeApi { Future fakeOuterStringSerializeWithHttpInfo({ String body }) async { // Verify required params are set. - final path = '/fake/outer/string'.replaceAll('{format}', 'json'); + final path = '/fake/outer/string'; Object postBody = body; @@ -434,7 +434,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: fileSchemaTestClass'); } - final path = '/fake/body-with-file-schema'.replaceAll('{format}', 'json'); + final path = '/fake/body-with-file-schema'; Object postBody = fileSchemaTestClass; @@ -497,7 +497,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/fake/body-with-query-params'.replaceAll('{format}', 'json'); + final path = '/fake/body-with-query-params'; Object postBody = user; @@ -563,7 +563,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); } - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody = modelClient; @@ -685,7 +685,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: byte'); } - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody; @@ -905,7 +905,7 @@ class FakeApi { Future testEnumParametersWithHttpInfo({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString }) async { // Verify required params are set. - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody; @@ -1048,7 +1048,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredInt64Group'); } - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody; @@ -1142,7 +1142,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: requestBody'); } - final path = '/fake/inline-additionalProperties'.replaceAll('{format}', 'json'); + final path = '/fake/inline-additionalProperties'; Object postBody = requestBody; @@ -1211,7 +1211,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: param2'); } - final path = '/fake/jsonFormData'.replaceAll('{format}', 'json'); + final path = '/fake/jsonFormData'; Object postBody; @@ -1310,7 +1310,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: context'); } - final path = '/fake/test-query-paramters'.replaceAll('{format}', 'json'); + final path = '/fake/test-query-paramters'; Object postBody; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 3743aa85c28..66a5c292f0c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -31,7 +31,7 @@ class FakeClassnameTags123Api { throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); } - final path = '/fake_classname_test'.replaceAll('{format}', 'json'); + final path = '/fake_classname_test'; Object postBody = modelClient; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart index 256bfd22f1d..71abeecfdd9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart @@ -29,7 +29,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = pet; @@ -94,7 +94,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -166,7 +166,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: status'); } - final path = '/pet/findByStatus'.replaceAll('{format}', 'json'); + final path = '/pet/findByStatus'; Object postBody; @@ -244,7 +244,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: tags'); } - final path = '/pet/findByTags'.replaceAll('{format}', 'json'); + final path = '/pet/findByTags'; Object postBody; @@ -322,7 +322,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -395,7 +395,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = pet; @@ -464,7 +464,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -554,7 +554,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}/uploadImage'.replaceAll('{format}', 'json') + final path = '/pet/{petId}/uploadImage' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -652,7 +652,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredFile'); } - final path = '/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{format}', 'json') + final path = '/fake/{petId}/uploadImageWithRequiredFile' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart index bc0c54eba86..bf83f6a2523 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart @@ -31,7 +31,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{order_id}'.replaceAll('{format}', 'json') + final path = '/store/order/{order_id}' .replaceAll('{' + 'order_id' + '}', orderId.toString()); Object postBody; @@ -89,7 +89,7 @@ class StoreApi { /// /// Note: This method returns the HTTP [Response]. Future getInventoryWithHttpInfo() async { - final path = '/store/inventory'.replaceAll('{format}', 'json'); + final path = '/store/inventory'; Object postBody; @@ -158,7 +158,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{order_id}'.replaceAll('{format}', 'json') + final path = '/store/order/{order_id}' .replaceAll('{' + 'order_id' + '}', orderId.toString()); Object postBody; @@ -231,7 +231,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: order'); } - final path = '/store/order'.replaceAll('{format}', 'json'); + final path = '/store/order'; Object postBody = order; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart index d8346bcb3b7..76d477efeb3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart @@ -31,7 +31,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user'.replaceAll('{format}', 'json'); + final path = '/user'; Object postBody = user; @@ -96,7 +96,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/createWithArray'.replaceAll('{format}', 'json'); + final path = '/user/createWithArray'; Object postBody = user; @@ -159,7 +159,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/createWithList'.replaceAll('{format}', 'json'); + final path = '/user/createWithList'; Object postBody = user; @@ -224,7 +224,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -290,7 +290,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -367,7 +367,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: password'); } - final path = '/user/login'.replaceAll('{format}', 'json'); + final path = '/user/login'; Object postBody; @@ -433,7 +433,7 @@ class UserApi { /// /// Note: This method returns the HTTP [Response]. Future logoutUserWithHttpInfo() async { - final path = '/user/logout'.replaceAll('{format}', 'json'); + final path = '/user/logout'; Object postBody; @@ -499,7 +499,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody = user; diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/another_fake_api.dart index 4427dbe17da..cdf8eb623c9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/another_fake_api.dart @@ -31,7 +31,7 @@ class AnotherFakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); } - final path = '/another-fake/dummy'.replaceAll('{format}', 'json'); + final path = '/another-fake/dummy'; Object postBody = modelClient; diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/default_api.dart index 73861456c98..24fba9d8349 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/default_api.dart @@ -17,7 +17,7 @@ class DefaultApi { /// Performs an HTTP 'GET /foo' operation and returns the [Response]. Future fooGetWithHttpInfo() async { - final path = '/foo'.replaceAll('{format}', 'json'); + final path = '/foo'; Object postBody; diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_api.dart index af1425e338b..e81da089940 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_api.dart @@ -19,7 +19,7 @@ class FakeApi { /// /// Note: This method returns the HTTP [Response]. Future fakeHealthGetWithHttpInfo() async { - final path = '/fake/health'.replaceAll('{format}', 'json'); + final path = '/fake/health'; Object postBody; @@ -90,7 +90,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/fake/http-signature-test'.replaceAll('{format}', 'json'); + final path = '/fake/http-signature-test'; Object postBody = pet; @@ -164,7 +164,7 @@ class FakeApi { Future fakeOuterBooleanSerializeWithHttpInfo({ bool body }) async { // Verify required params are set. - final path = '/fake/outer/boolean'.replaceAll('{format}', 'json'); + final path = '/fake/outer/boolean'; Object postBody = body; @@ -231,7 +231,7 @@ class FakeApi { Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite outerComposite }) async { // Verify required params are set. - final path = '/fake/outer/composite'.replaceAll('{format}', 'json'); + final path = '/fake/outer/composite'; Object postBody = outerComposite; @@ -298,7 +298,7 @@ class FakeApi { Future fakeOuterNumberSerializeWithHttpInfo({ num body }) async { // Verify required params are set. - final path = '/fake/outer/number'.replaceAll('{format}', 'json'); + final path = '/fake/outer/number'; Object postBody = body; @@ -365,7 +365,7 @@ class FakeApi { Future fakeOuterStringSerializeWithHttpInfo({ String body }) async { // Verify required params are set. - final path = '/fake/outer/string'.replaceAll('{format}', 'json'); + final path = '/fake/outer/string'; Object postBody = body; @@ -434,7 +434,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: fileSchemaTestClass'); } - final path = '/fake/body-with-file-schema'.replaceAll('{format}', 'json'); + final path = '/fake/body-with-file-schema'; Object postBody = fileSchemaTestClass; @@ -497,7 +497,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/fake/body-with-query-params'.replaceAll('{format}', 'json'); + final path = '/fake/body-with-query-params'; Object postBody = user; @@ -563,7 +563,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); } - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody = modelClient; @@ -685,7 +685,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: byte'); } - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody; @@ -905,7 +905,7 @@ class FakeApi { Future testEnumParametersWithHttpInfo({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString }) async { // Verify required params are set. - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody; @@ -1048,7 +1048,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredInt64Group'); } - final path = '/fake'.replaceAll('{format}', 'json'); + final path = '/fake'; Object postBody; @@ -1142,7 +1142,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: requestBody'); } - final path = '/fake/inline-additionalProperties'.replaceAll('{format}', 'json'); + final path = '/fake/inline-additionalProperties'; Object postBody = requestBody; @@ -1211,7 +1211,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: param2'); } - final path = '/fake/jsonFormData'.replaceAll('{format}', 'json'); + final path = '/fake/jsonFormData'; Object postBody; @@ -1310,7 +1310,7 @@ class FakeApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: context'); } - final path = '/fake/test-query-paramters'.replaceAll('{format}', 'json'); + final path = '/fake/test-query-paramters'; Object postBody; diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 3743aa85c28..66a5c292f0c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -31,7 +31,7 @@ class FakeClassnameTags123Api { throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); } - final path = '/fake_classname_test'.replaceAll('{format}', 'json'); + final path = '/fake_classname_test'; Object postBody = modelClient; diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/pet_api.dart index 256bfd22f1d..71abeecfdd9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/pet_api.dart @@ -29,7 +29,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = pet; @@ -94,7 +94,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -166,7 +166,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: status'); } - final path = '/pet/findByStatus'.replaceAll('{format}', 'json'); + final path = '/pet/findByStatus'; Object postBody; @@ -244,7 +244,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: tags'); } - final path = '/pet/findByTags'.replaceAll('{format}', 'json'); + final path = '/pet/findByTags'; Object postBody; @@ -322,7 +322,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -395,7 +395,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); } - final path = '/pet'.replaceAll('{format}', 'json'); + final path = '/pet'; Object postBody = pet; @@ -464,7 +464,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}'.replaceAll('{format}', 'json') + final path = '/pet/{petId}' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -554,7 +554,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); } - final path = '/pet/{petId}/uploadImage'.replaceAll('{format}', 'json') + final path = '/pet/{petId}/uploadImage' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; @@ -652,7 +652,7 @@ class PetApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredFile'); } - final path = '/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{format}', 'json') + final path = '/fake/{petId}/uploadImageWithRequiredFile' .replaceAll('{' + 'petId' + '}', petId.toString()); Object postBody; diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/store_api.dart index bc0c54eba86..bf83f6a2523 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/store_api.dart @@ -31,7 +31,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{order_id}'.replaceAll('{format}', 'json') + final path = '/store/order/{order_id}' .replaceAll('{' + 'order_id' + '}', orderId.toString()); Object postBody; @@ -89,7 +89,7 @@ class StoreApi { /// /// Note: This method returns the HTTP [Response]. Future getInventoryWithHttpInfo() async { - final path = '/store/inventory'.replaceAll('{format}', 'json'); + final path = '/store/inventory'; Object postBody; @@ -158,7 +158,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); } - final path = '/store/order/{order_id}'.replaceAll('{format}', 'json') + final path = '/store/order/{order_id}' .replaceAll('{' + 'order_id' + '}', orderId.toString()); Object postBody; @@ -231,7 +231,7 @@ class StoreApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: order'); } - final path = '/store/order'.replaceAll('{format}', 'json'); + final path = '/store/order'; Object postBody = order; diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/user_api.dart index d8346bcb3b7..76d477efeb3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/api/user_api.dart @@ -31,7 +31,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user'.replaceAll('{format}', 'json'); + final path = '/user'; Object postBody = user; @@ -96,7 +96,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/createWithArray'.replaceAll('{format}', 'json'); + final path = '/user/createWithArray'; Object postBody = user; @@ -159,7 +159,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/createWithList'.replaceAll('{format}', 'json'); + final path = '/user/createWithList'; Object postBody = user; @@ -224,7 +224,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -290,7 +290,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody; @@ -367,7 +367,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: password'); } - final path = '/user/login'.replaceAll('{format}', 'json'); + final path = '/user/login'; Object postBody; @@ -433,7 +433,7 @@ class UserApi { /// /// Note: This method returns the HTTP [Response]. Future logoutUserWithHttpInfo() async { - final path = '/user/logout'.replaceAll('{format}', 'json'); + final path = '/user/logout'; Object postBody; @@ -499,7 +499,7 @@ class UserApi { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); } - final path = '/user/{username}'.replaceAll('{format}', 'json') + final path = '/user/{username}' .replaceAll('{' + 'username' + '}', username.toString()); Object postBody = user;