Repository navigation
Web: Does not generate all sub classes that Json Contains #7
Copy link
Copy link
Open
Description
Activity
Have the same issue, the generation goes only 2 level depth. If the second one has also an object it will not generate. I try to solve it by moving the second level to level 0 and generate again the whole code. By hand I added the missing classes, but it tells me that
[SEVERE] built_value_generator:built_value on lib/core/models/event/extended_properties.dart (cached): Error in BuiltValueGenerator for abstract class ExtendedProperties implements Built<ExtendedProperties, dynamic>. Please make the following changes to use BuiltValue: 1. Make field private have non-dynamic type. If you are already specifying a type, please make sure the type is correctly imported. 2. Make field shared have non-dynamic type. If you are already specifying a type, please make sure the type is correctly imported.Here is the extended_properties class
library extended_properties; import 'dart:convert'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; part 'extended_properties.g.dart'; abstract class ExtendedProperties implements Built<ExtendedProperties, ExtendedPropertiesBuilder> { ExtendedProperties._(); factory ExtendedProperties([updates(ExtendedPropertiesBuilder b)]) = _$ExtendedProperties; @BuiltValueField(wireName: 'private') Private get private; @BuiltValueField(wireName: 'shared') Shared get shared; String toJson() { return json .encode(serializers.serializeWith(ExtendedProperties.serializer, this)); } static ExtendedProperties fromJson(String jsonString) { return serializers.deserializeWith( ExtendedProperties.serializer, json.decode(jsonString)); } static Serializer<ExtendedProperties> get serializer => _$extendedPropertiesSerializer; }
Privateclasslibrary private; import 'dart:convert'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; part 'private.g.dart'; abstract class Private implements Built<Private, PrivateBuilder> { Private._(); factory Private([updates(PrivateBuilder b)]) = _$Private; @BuiltValueField(wireName: 'eventAttendeeList') String get eventAttendeeList; String toJson() { return json.encode(serializers.serializeWith(Private.serializer, this)); } static Private fromJson(String jsonString) { return serializers.deserializeWith( Private.serializer, json.decode(jsonString)); } static Serializer<Private> get serializer => _$privateSerializer; }
Sharedclasslibrary shared; import 'dart:convert'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; part 'shared.g.dart'; abstract class Shared implements Built<Shared, SharedBuilder> { Shared._(); factory Shared([updates(SharedBuilder b)]) = _$Shared; @BuiltValueField(wireName: 'eventAttendeeList') String get eventAttendeeList; String toJson() { return json.encode(serializers.serializeWith(Shared.serializer, this)); } static Shared fromJson(String jsonString) { return serializers.deserializeWith( Shared.serializer, json.decode(jsonString)); } static Serializer<Shared> get serializer => _$sharedSerializer; }
{ "kind": "calendar#event", "etag": "3108271087171000", "id": "clj64dr2c5h66b9nclij8b9kcksmab9p70pj0bb26so34e36c4pjcp1m6g", "status": "confirmed", "htmlLink": "https://www.google.com/calendar/event?eid=Y2xqNjRkcjJjNWg2NmI5bmNsaWo4YjlrY2tzbWFiOXA3MHBqMGJiMjZzbzM0ZTM2YzRwamNwMW02ZyBmcGlxMmF1bGR0bm8zM2k1M2phYWMwazIzOEBn", "created": "2019-04-01T16:19:03.000Z", "updated": "2019-04-01T16:19:03.660Z", "summary": "Performance Ar", "location": "Vattenfall IT Services Poland Sp z o.o., Tadeusza Gruszczyńskiego 2, 44-100 Gliwice, Polska", "creator": { "email": "webskydavid@gmail.com", "displayName": "david ftaton" }, "organizer": { "email": "fpiq2auldtno33i53jaac0k238@group.calendar.google.com", "displayName": "Me & She", "self": true }, "start": { "dateTime": "2019-04-04T14:30:00+02:00", "timeZone": "Europe/Berlin" }, "end": { "dateTime": "2019-04-04T15:00:00+02:00", "timeZone": "Europe/Berlin" }, "iCalUID": "clj64dr2c5h66b9nclij8b9kcksmab9p70pj0bb26so34e36c4pjcp1m6g@google.com", "sequence": 0, "extendedProperties": { "private": { "eventAttendeeList": "string" }, "shared": { "eventAttendeeList": "string" } }, "reminders": { "useDefault": false, "overrides": [ { "method": "popup", "minutes": 10 } ] } }
Metadata
Metadata
Assignees
Labels
No labels
output:
the whole content, sort and paggeable class missing