Skip to content

Commit

Permalink
[dart-dio] Fix failing integration tests (#8335)
Browse files Browse the repository at this point in the history
This happened due to the merge of #6384 where implicit-dynamics were still allowed.
  • Loading branch information
kuhnroyal authored Jan 5, 2021
1 parent 4cdf610 commit fc22de0
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class {{classname}} {
var serializedBody = {{paramName}};
{{/isPrimitiveType}}
{{^isPrimitiveType}}
final bodySerializer = _serializers.serializerForType({{baseType}});
final bodySerializer = _serializers.serializerForType({{{baseType}}}) as Serializer<{{{baseType}}}>;
final serializedBody = _serializers.serializeWith(bodySerializer, {{paramName}});
{{/isPrimitiveType}}
{{/isArray}}
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1352,10 +1352,9 @@
<module>samples/client/petstore/dart2/petstore</module>
<module>samples/openapi3/client/petstore/dart2/petstore_client_lib</module>
<module>samples/openapi3/client/petstore/dart2/petstore</module>
<!-- comment out due to CircleCI failure
<module>samples/client/petstore/dart-dio/petstore_client_lib</module>
<module>samples/openapi3/client/petstore/dart-dio/petstore_client_lib</module>
<module>samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake</module> -->
<module>samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake</module>
<module>samples/client/petstore/dart-jaguar/openapi</module>
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
</modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PetApi {
'application/xml',
];

final bodySerializer = _serializers.serializerForType(Pet);
final bodySerializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
final serializedBody = _serializers.serializeWith(bodySerializer, body);
final jsonbody = json.encode(serializedBody);
bodyData = jsonbody;
Expand Down Expand Up @@ -368,7 +368,7 @@ class PetApi {
'application/xml',
];

final bodySerializer = _serializers.serializerForType(Pet);
final bodySerializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
final serializedBody = _serializers.serializeWith(bodySerializer, body);
final jsonbody = json.encode(serializedBody);
bodyData = jsonbody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class StoreApi {

final contentTypes = <String>[];

final bodySerializer = _serializers.serializerForType(Order);
final bodySerializer = _serializers.serializerForType(Order) as Serializer<Order>;
final serializedBody = _serializers.serializeWith(bodySerializer, body);
final jsonbody = json.encode(serializedBody);
bodyData = jsonbody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class UserApi {

final contentTypes = <String>[];

final bodySerializer = _serializers.serializerForType(User);
final bodySerializer = _serializers.serializerForType(User) as Serializer<User>;
final serializedBody = _serializers.serializeWith(bodySerializer, body);
final jsonbody = json.encode(serializedBody);
bodyData = jsonbody;
Expand Down Expand Up @@ -405,7 +405,7 @@ class UserApi {

final contentTypes = <String>[];

final bodySerializer = _serializers.serializerForType(User);
final bodySerializer = _serializers.serializerForType(User) as Serializer<User>;
final serializedBody = _serializers.serializeWith(bodySerializer, body);
final jsonbody = json.encode(serializedBody);
bodyData = jsonbody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PetApi {
'application/xml',
];

final bodySerializer = _serializers.serializerForType(Pet);
final bodySerializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
final serializedBody = _serializers.serializeWith(bodySerializer, pet);
final jsonpet = json.encode(serializedBody);
bodyData = jsonpet;
Expand Down Expand Up @@ -384,7 +384,7 @@ class PetApi {
'application/xml',
];

final bodySerializer = _serializers.serializerForType(Pet);
final bodySerializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
final serializedBody = _serializers.serializeWith(bodySerializer, pet);
final jsonpet = json.encode(serializedBody);
bodyData = jsonpet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class StoreApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(Order);
final bodySerializer = _serializers.serializerForType(Order) as Serializer<Order>;
final serializedBody = _serializers.serializeWith(bodySerializer, order);
final jsonorder = json.encode(serializedBody);
bodyData = jsonorder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class UserApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(User);
final bodySerializer = _serializers.serializerForType(User) as Serializer<User>;
final serializedBody = _serializers.serializeWith(bodySerializer, user);
final jsonuser = json.encode(serializedBody);
bodyData = jsonuser;
Expand Down Expand Up @@ -448,7 +448,7 @@ class UserApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(User);
final bodySerializer = _serializers.serializerForType(User) as Serializer<User>;
final serializedBody = _serializers.serializeWith(bodySerializer, user);
final jsonuser = json.encode(serializedBody);
bodyData = jsonuser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AnotherFakeApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(ModelClient);
final bodySerializer = _serializers.serializerForType(ModelClient) as Serializer<ModelClient>;
final serializedBody = _serializers.serializeWith(bodySerializer, modelClient);
final jsonmodelClient = json.encode(serializedBody);
bodyData = jsonmodelClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class FakeApi {
'application/xml',
];

final bodySerializer = _serializers.serializerForType(Pet);
final bodySerializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
final serializedBody = _serializers.serializeWith(bodySerializer, pet);
final jsonpet = json.encode(serializedBody);
bodyData = jsonpet;
Expand Down Expand Up @@ -238,7 +238,7 @@ class FakeApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(OuterComposite);
final bodySerializer = _serializers.serializerForType(OuterComposite) as Serializer<OuterComposite>;
final serializedBody = _serializers.serializeWith(bodySerializer, outerComposite);
final jsonouterComposite = json.encode(serializedBody);
bodyData = jsonouterComposite;
Expand Down Expand Up @@ -432,7 +432,7 @@ class FakeApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(FileSchemaTestClass);
final bodySerializer = _serializers.serializerForType(FileSchemaTestClass) as Serializer<FileSchemaTestClass>;
final serializedBody = _serializers.serializeWith(bodySerializer, fileSchemaTestClass);
final jsonfileSchemaTestClass = json.encode(serializedBody);
bodyData = jsonfileSchemaTestClass;
Expand Down Expand Up @@ -486,7 +486,7 @@ class FakeApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(User);
final bodySerializer = _serializers.serializerForType(User) as Serializer<User>;
final serializedBody = _serializers.serializeWith(bodySerializer, user);
final jsonuser = json.encode(serializedBody);
bodyData = jsonuser;
Expand Down Expand Up @@ -538,7 +538,7 @@ class FakeApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(ModelClient);
final bodySerializer = _serializers.serializerForType(ModelClient) as Serializer<ModelClient>;
final serializedBody = _serializers.serializeWith(bodySerializer, modelClient);
final jsonmodelClient = json.encode(serializedBody);
bodyData = jsonmodelClient;
Expand Down Expand Up @@ -814,7 +814,7 @@ class FakeApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(String);
final bodySerializer = _serializers.serializerForType(String) as Serializer<String>;
final serializedBody = _serializers.serializeWith(bodySerializer, requestBody);
final jsonrequestBody = json.encode(serializedBody);
bodyData = jsonrequestBody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FakeClassnameTags123Api {
'application/json',
];

final bodySerializer = _serializers.serializerForType(ModelClient);
final bodySerializer = _serializers.serializerForType(ModelClient) as Serializer<ModelClient>;
final serializedBody = _serializers.serializeWith(bodySerializer, modelClient);
final jsonmodelClient = json.encode(serializedBody);
bodyData = jsonmodelClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PetApi {
'application/xml',
];

final bodySerializer = _serializers.serializerForType(Pet);
final bodySerializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
final serializedBody = _serializers.serializeWith(bodySerializer, pet);
final jsonpet = json.encode(serializedBody);
bodyData = jsonpet;
Expand Down Expand Up @@ -368,7 +368,7 @@ class PetApi {
'application/xml',
];

final bodySerializer = _serializers.serializerForType(Pet);
final bodySerializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
final serializedBody = _serializers.serializeWith(bodySerializer, pet);
final jsonpet = json.encode(serializedBody);
bodyData = jsonpet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class StoreApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(Order);
final bodySerializer = _serializers.serializerForType(Order) as Serializer<Order>;
final serializedBody = _serializers.serializeWith(bodySerializer, order);
final jsonorder = json.encode(serializedBody);
bodyData = jsonorder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class UserApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(User);
final bodySerializer = _serializers.serializerForType(User) as Serializer<User>;
final serializedBody = _serializers.serializeWith(bodySerializer, user);
final jsonuser = json.encode(serializedBody);
bodyData = jsonuser;
Expand Down Expand Up @@ -413,7 +413,7 @@ class UserApi {
'application/json',
];

final bodySerializer = _serializers.serializerForType(User);
final bodySerializer = _serializers.serializerForType(User) as Serializer<User>;
final serializedBody = _serializers.serializeWith(bodySerializer, user);
final jsonuser = json.encode(serializedBody);
bodyData = jsonuser;
Expand Down

0 comments on commit fc22de0

Please sign in to comment.