diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index 3ecff3ef146..dcfedc065ed 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -33,7 +33,8 @@ class {{classname}} { final String _path = '{{{path}}}'{{#pathParams}}.replaceAll('{' r'{{baseName}}' '}', {{{paramName}}}.toString()){{/pathParams}}; final queryParams = {}; - final headerParams = { + final headerParams = { {{#httpUserAgent}} + 'User-Agent': '{{{.}}}',{{/httpUserAgent}} if (headers != null) ...headers, }; dynamic bodyData; diff --git a/modules/openapi-generator/src/main/resources/dart/api_client.mustache b/modules/openapi-generator/src/main/resources/dart/api_client.mustache index 0e240523542..9bb3d59bc52 100644 --- a/modules/openapi-generator/src/main/resources/dart/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart/api_client.mustache @@ -23,6 +23,7 @@ class ApiClient { _authentications['{{name}}'] = new HttpBasicAuth();{{/isBasic}}{{#isApiKey}} _authentications['{{name}}'] = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}");{{/isApiKey}}{{#isOAuth}} _authentications['{{name}}'] = new OAuth();{{/isOAuth}}{{/authMethods}} + {{#httpUserAgent}}addDefaultHeader('User-Agent', '{{{.}}}');{{/httpUserAgent}} } void addDefaultHeader(String key, String value) { diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index 795b627fb40..fe5c9299841 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -37,7 +37,7 @@ class PetApi { final String _path = '/pet'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -96,7 +96,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -147,7 +147,7 @@ class PetApi { final String _path = '/pet/findByStatus'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -217,7 +217,7 @@ class PetApi { final String _path = '/pet/findByTags'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -287,7 +287,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -355,7 +355,7 @@ class PetApi { final String _path = '/pet'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -415,7 +415,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -475,7 +475,7 @@ class PetApi { final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index ed20fd6fce5..f9a8754907a 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -34,7 +34,7 @@ class StoreApi { final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -78,7 +78,7 @@ class StoreApi { final String _path = '/store/inventory'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -149,7 +149,7 @@ class StoreApi { final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -210,7 +210,7 @@ class StoreApi { final String _path = '/store/order'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index fc504efe821..17b551bc911 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -34,7 +34,7 @@ class UserApi { final String _path = '/user'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -84,7 +84,7 @@ class UserApi { final String _path = '/user/createWithArray'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -134,7 +134,7 @@ class UserApi { final String _path = '/user/createWithList'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -184,7 +184,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -229,7 +229,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -291,7 +291,7 @@ class UserApi { final String _path = '/user/login'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -349,7 +349,7 @@ class UserApi { final String _path = '/user/logout'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -395,7 +395,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index f91d7d0125a..95db7626674 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -37,7 +37,7 @@ class PetApi { final String _path = '/pet'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -112,7 +112,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -163,7 +163,7 @@ class PetApi { final String _path = '/pet/findByStatus'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -233,7 +233,7 @@ class PetApi { final String _path = '/pet/findByTags'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -303,7 +303,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -371,7 +371,7 @@ class PetApi { final String _path = '/pet'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -447,7 +447,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -507,7 +507,7 @@ class PetApi { final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index ba3f241333e..5f58e788091 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -34,7 +34,7 @@ class StoreApi { final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -78,7 +78,7 @@ class StoreApi { final String _path = '/store/inventory'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -149,7 +149,7 @@ class StoreApi { final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -210,7 +210,7 @@ class StoreApi { final String _path = '/store/order'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index cb890e1846c..a4d59b2978c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -34,7 +34,7 @@ class UserApi { final String _path = '/user'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -93,7 +93,7 @@ class UserApi { final String _path = '/user/createWithArray'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -152,7 +152,7 @@ class UserApi { final String _path = '/user/createWithList'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -211,7 +211,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -263,7 +263,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -325,7 +325,7 @@ class UserApi { final String _path = '/user/login'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -383,7 +383,7 @@ class UserApi { final String _path = '/user/logout'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -436,7 +436,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart index 16e34300387..72310ff3533 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -33,7 +33,7 @@ class AnotherFakeApi { final String _path = '/another-fake/dummy'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart index 1e93ce8718a..a47b383960b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart @@ -32,7 +32,7 @@ class DefaultApi { final String _path = '/foo'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart index 95dd5da583d..96d776d36f9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart @@ -40,7 +40,7 @@ class FakeApi { final String _path = '/fake/health'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -103,7 +103,7 @@ class FakeApi { final String _path = '/fake/http-signature-test'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -163,7 +163,7 @@ class FakeApi { final String _path = '/fake/outer/boolean'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -226,7 +226,7 @@ class FakeApi { final String _path = '/fake/outer/composite'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -294,7 +294,7 @@ class FakeApi { final String _path = '/fake/outer/number'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -357,7 +357,7 @@ class FakeApi { final String _path = '/fake/outer/string'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -420,7 +420,7 @@ class FakeApi { final String _path = '/fake/body-with-file-schema'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -473,7 +473,7 @@ class FakeApi { final String _path = '/fake/body-with-query-params'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -526,7 +526,7 @@ class FakeApi { final String _path = '/fake'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -607,7 +607,7 @@ class FakeApi { final String _path = '/fake'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -684,7 +684,7 @@ class FakeApi { final String _path = '/fake'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -748,7 +748,7 @@ class FakeApi { final String _path = '/fake'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -804,7 +804,7 @@ class FakeApi { final String _path = '/fake/inline-additionalProperties'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -857,7 +857,7 @@ class FakeApi { final String _path = '/fake/jsonFormData'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -914,7 +914,7 @@ class FakeApi { final String _path = '/fake/test-query-paramters'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 222097970a1..81d1c554818 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -33,7 +33,7 @@ class FakeClassnameTags123Api { final String _path = '/fake_classname_test'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart index 4572f3c2a0d..6bb8363f2ae 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart @@ -37,7 +37,7 @@ class PetApi { final String _path = '/pet'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -96,7 +96,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -147,7 +147,7 @@ class PetApi { final String _path = '/pet/findByStatus'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -217,7 +217,7 @@ class PetApi { final String _path = '/pet/findByTags'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -287,7 +287,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -355,7 +355,7 @@ class PetApi { final String _path = '/pet'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -415,7 +415,7 @@ class PetApi { final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -475,7 +475,7 @@ class PetApi { final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -551,7 +551,7 @@ class PetApi { final String _path = '/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart index a1bea34d14f..b9be3d2f72d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart @@ -34,7 +34,7 @@ class StoreApi { final String _path = '/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -78,7 +78,7 @@ class StoreApi { final String _path = '/store/inventory'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -149,7 +149,7 @@ class StoreApi { final String _path = '/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -210,7 +210,7 @@ class StoreApi { final String _path = '/store/order'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart index 87dbb0b8d14..e73986ac493 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart @@ -34,7 +34,7 @@ class UserApi { final String _path = '/user'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -86,7 +86,7 @@ class UserApi { final String _path = '/user/createWithArray'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -138,7 +138,7 @@ class UserApi { final String _path = '/user/createWithList'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -190,7 +190,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -235,7 +235,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -297,7 +297,7 @@ class UserApi { final String _path = '/user/login'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -355,7 +355,7 @@ class UserApi { final String _path = '/user/logout'; final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData; @@ -401,7 +401,7 @@ class UserApi { final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final queryParams = {}; - final headerParams = { + final headerParams = { if (headers != null) ...headers, }; dynamic bodyData;