/* Options: Date: 2026-09-02 15:38:34 Version: 10.09 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://test.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: HelloWithGenericInheritance.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Poco implements IConvertible { String name = ""; Poco({this.name=""}); Poco.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name'] ?? ""; return this; } Map toJson() => { 'name': name }; getTypeName() => "Poco"; TypeContext? context = _ctx; } abstract class HelloBase { List items = []; List counts = []; HelloBase({this.items=const [],this.counts=const []}); HelloBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { items = JsonConverters.fromJson(json['items'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!) ?? []; counts = JsonConverters.fromJson(json['counts'],'List',context!) ?? []; return this; } Map toJson() => { 'items': JsonConverters.toJson(items,'List',context!), 'counts': JsonConverters.toJson(counts,'List',context!) }; getTypeName() => "HelloBase<$T>"; TypeContext? context = _ctx; } class HelloWithGenericInheritance extends HelloBase implements IConvertible, IPost { String result = ""; HelloWithGenericInheritance({this.result=""}); HelloWithGenericInheritance.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); result = json['result'] ?? ""; return this; } Map toJson() => super.toJson()..addAll({ 'result': result }); getTypeName() => "HelloWithGenericInheritance"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: { 'Poco': TypeInfo(TypeOf.Class, create:() => Poco()), 'HelloBase': TypeInfo(TypeOf.GenericDef,create:() => HelloBase()), 'HelloWithGenericInheritance': TypeInfo(TypeOf.Class, create:() => HelloWithGenericInheritance()), });