diff --git a/modules/openapi-generator/src/main/resources/dart2/api_client.mustache b/modules/openapi-generator/src/main/resources/dart2/api_client.mustache index e6e6b07771..09edf0a827 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_client.mustache @@ -49,6 +49,12 @@ class ApiClient { _defaultHeaderMap[key] = value; } + Map get defaultHeaderMap => _defaultHeaderMap; + /// returns an unmodifiable view of the authentications, since none should be added + /// nor deleted + Map get authentications => + Map.unmodififiable(_authentications); + dynamic deserialize(String json, String targetType, {bool growable}) { // Remove all spaces. Necessary for reg expressions as well. targetType = targetType.replaceAll(' ', ''); diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart index 79394cc833..e9fe382f91 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart @@ -42,6 +42,12 @@ class ApiClient { _defaultHeaderMap[key] = value; } + Map get defaultHeaderMap => _defaultHeaderMap; + /// returns an unmodifiable view of the authentications, since none should be added + /// nor deleted + Map get authentications => + Map.unmodififiable(_authentications); + dynamic deserialize(String json, String targetType, {bool growable}) { // Remove all spaces. Necessary for reg expressions as well. targetType = targetType.replaceAll(' ', ''); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart index 79394cc833..e9fe382f91 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart @@ -42,6 +42,12 @@ class ApiClient { _defaultHeaderMap[key] = value; } + Map get defaultHeaderMap => _defaultHeaderMap; + /// returns an unmodifiable view of the authentications, since none should be added + /// nor deleted + Map get authentications => + Map.unmodififiable(_authentications); + dynamic deserialize(String json, String targetType, {bool growable}) { // Remove all spaces. Necessary for reg expressions as well. targetType = targetType.replaceAll(' ', ''); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart index 22d45db938..ef90645965 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart @@ -45,6 +45,12 @@ class ApiClient { _defaultHeaderMap[key] = value; } + Map get defaultHeaderMap => _defaultHeaderMap; + /// returns an unmodifiable view of the authentications, since none should be added + /// nor deleted + Map get authentications => + Map.unmodififiable(_authentications); + dynamic deserialize(String json, String targetType, {bool growable}) { // Remove all spaces. Necessary for reg expressions as well. targetType = targetType.replaceAll(' ', '');