You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@overrideObjectserialize(
Serializers serializers,
Person object, {
FullType specifiedType =FullType.unspecified,
}) {
if (object isAuthor) {
return serializers.serialize(object,
specifiedType:FullType(Author))!;
}
// this block should be removed entirely, leads to recursionif (object isPerson) {
return serializers.serialize(object,
specifiedType:FullType(Person))!;
}
//====================================return_serializeProperties(serializers, object,
specifiedType: specifiedType)
.toList();
}
and
switch (discValue) {
caser'author':return serializers.deserialize(serialized,
specifiedType:FullType(Author))
asAuthor;
// this block should be removed entirely, leads to recursioncaser'person':return serializers.deserialize(serialized,
specifiedType:FullType(Person))
asPerson;
//====================================default:return serializers.deserialize(serialized,
specifiedType:FullType($Person))
as$Person;
}
and
extensionPersonDiscriminatorExtonPerson {
String?get discriminatorValue {
if (thisisAuthor) {
returnr'author';
}
/// This check should be removed, and instead of returning null at the end, should return r'person'if (thisisPerson) {
returnr'person';
}
returnnull;
}
}
extensionPersonBuilderDiscriminatorExtonPersonBuilder {
String?get discriminatorValue {
if (thisisAuthorBuilder) {
returnr'author';
}
/// This check should be removed, and instead of returning null at the end, should return r'person'if (thisisPersonBuilder) {
returnr'person';
}
returnnull;
}
}
openapi-generator version
6.6.0
I plan on fixing this in an upcoming PR, will introduce a new vendor extension called fallback case, which will be the concrete class in this case ($Person) and remove self references from mappings in java
Description
leads to this code:
and
and
openapi-generator version
6.6.0
I plan on fixing this in an upcoming PR, will introduce a new vendor extension called fallback case, which will be the concrete class in this case (
$Person
) and remove self references from mappings in java@jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08)
The text was updated successfully, but these errors were encountered: