From fae7e7b1b10018da929bfe7ff567e3324c2c1533 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Thu, 19 Oct 2023 22:09:59 +0200 Subject: [PATCH] fix(dynamite,dynamite_runtime,nextcloud): don't deserialize integers into double Signed-off-by: Nikolas Rimikis --- .../dynamite/lib/src/builder/imports.dart | 3 +- .../dynamite/lib/src/builder/serializer.dart | 2 +- .../lib/nested_ofs.openapi.dart | 3 +- .../dynamite_runtime/lib/built_value.dart | 2 + .../dynamite_runtime/lib/content_string.dart | 1 - .../dynamite/dynamite_runtime/lib/models.dart | 1 + .../content_string_serializer.dart} | 17 +--- .../src/built_value/double_serializer.dart | 48 ++++++++++ .../lib/src/models/content_string.dart | 17 ++++ .../src/{ => models}/content_string.g.dart | 0 .../dynamite/dynamite_runtime/pubspec.yaml | 2 +- .../test/content_string_test.dart | 3 +- .../test/double_serializer_test.dart | 95 +++++++++++++++++++ packages/nextcloud/lib/nextcloud.dart | 2 +- .../lib/src/api/comments.openapi.dart | 3 +- .../nextcloud/lib/src/api/core.openapi.dart | 4 +- .../lib/src/api/dashboard.openapi.dart | 4 +- .../nextcloud/lib/src/api/dav.openapi.dart | 3 +- .../nextcloud/lib/src/api/files.openapi.dart | 3 +- .../lib/src/api/files_external.openapi.dart | 3 +- .../lib/src/api/files_reminders.openapi.dart | 3 +- .../lib/src/api/files_sharing.openapi.dart | 4 +- .../lib/src/api/files_trashbin.openapi.dart | 3 +- .../lib/src/api/files_versions.openapi.dart | 3 +- .../nextcloud/lib/src/api/news.openapi.dart | 3 +- .../nextcloud/lib/src/api/notes.openapi.dart | 3 +- .../lib/src/api/notifications.openapi.dart | 3 +- .../lib/src/api/provisioning_api.openapi.dart | 4 +- .../lib/src/api/settings.openapi.dart | 3 +- .../lib/src/api/sharebymail.openapi.dart | 3 +- .../lib/src/api/theming.openapi.dart | 3 +- .../src/api/updatenotification.openapi.dart | 3 +- .../nextcloud/lib/src/api/uppush.openapi.dart | 3 +- .../lib/src/api/user_status.openapi.dart | 3 +- .../lib/src/api/weather_status.openapi.dart | 3 +- 35 files changed, 219 insertions(+), 44 deletions(-) create mode 100644 packages/dynamite/dynamite_runtime/lib/built_value.dart delete mode 100644 packages/dynamite/dynamite_runtime/lib/content_string.dart create mode 100644 packages/dynamite/dynamite_runtime/lib/models.dart rename packages/dynamite/dynamite_runtime/lib/src/{content_string.dart => built_value/content_string_serializer.dart} (69%) create mode 100644 packages/dynamite/dynamite_runtime/lib/src/built_value/double_serializer.dart create mode 100644 packages/dynamite/dynamite_runtime/lib/src/models/content_string.dart rename packages/dynamite/dynamite_runtime/lib/src/{ => models}/content_string.g.dart (100%) create mode 100644 packages/dynamite/dynamite_runtime/test/double_serializer_test.dart diff --git a/packages/dynamite/dynamite/lib/src/builder/imports.dart b/packages/dynamite/dynamite/lib/src/builder/imports.dart index 3ce1dff0..c3a37d54 100644 --- a/packages/dynamite/dynamite/lib/src/builder/imports.dart +++ b/packages/dynamite/dynamite/lib/src/builder/imports.dart @@ -16,8 +16,9 @@ List generateImports(final AssetId outputId) => [ Directive.import('package:built_value/serializer.dart'), Directive.import('package:built_value/standard_json_plugin.dart'), Directive.import('package:collection/collection.dart'), - Directive.import('package:dynamite_runtime/content_string.dart'), + Directive.import('package:dynamite_runtime/built_value.dart'), Directive.import('package:dynamite_runtime/http_client.dart'), + Directive.import('package:dynamite_runtime/models.dart'), Directive.import('package:dynamite_runtime/utils.dart'), Directive.import('package:meta/meta.dart'), Directive.import('package:universal_io/io.dart'), diff --git a/packages/dynamite/dynamite/lib/src/builder/serializer.dart b/packages/dynamite/dynamite/lib/src/builder/serializer.dart index 97e8b49e..04674180 100644 --- a/packages/dynamite/dynamite/lib/src/builder/serializer.dart +++ b/packages/dynamite/dynamite/lib/src/builder/serializer.dart @@ -14,7 +14,7 @@ List buildSerializer(final State state) { const Code(').build();'), const Code(''), const Code( - 'final Serializers _jsonSerializers = (_serializers.toBuilder()..addPlugin(StandardJsonPlugin())..addPlugin(const ContentStringPlugin())).build();', + 'final Serializers _jsonSerializers = (_serializers.toBuilder()..add(DynamiteDoubleSerializer())..addPlugin(StandardJsonPlugin())..addPlugin(const ContentStringPlugin())).build();', ), const Code('// coverage:ignore-end'), ]; diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart index dd2b6fdb..bdbfd579 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart @@ -7,7 +7,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; part 'nested_ofs.openapi.g.dart'; @@ -521,6 +521,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/dynamite/dynamite_runtime/lib/built_value.dart b/packages/dynamite/dynamite_runtime/lib/built_value.dart new file mode 100644 index 00000000..2099eba8 --- /dev/null +++ b/packages/dynamite/dynamite_runtime/lib/built_value.dart @@ -0,0 +1,2 @@ +export 'src/built_value/content_string_serializer.dart'; +export 'src/built_value/double_serializer.dart'; diff --git a/packages/dynamite/dynamite_runtime/lib/content_string.dart b/packages/dynamite/dynamite_runtime/lib/content_string.dart deleted file mode 100644 index 2a35d3d8..00000000 --- a/packages/dynamite/dynamite_runtime/lib/content_string.dart +++ /dev/null @@ -1 +0,0 @@ -export 'src/content_string.dart'; diff --git a/packages/dynamite/dynamite_runtime/lib/models.dart b/packages/dynamite/dynamite_runtime/lib/models.dart new file mode 100644 index 00000000..7513560d --- /dev/null +++ b/packages/dynamite/dynamite_runtime/lib/models.dart @@ -0,0 +1 @@ +export 'src/models/content_string.dart'; diff --git a/packages/dynamite/dynamite_runtime/lib/src/content_string.dart b/packages/dynamite/dynamite_runtime/lib/src/built_value/content_string_serializer.dart similarity index 69% rename from packages/dynamite/dynamite_runtime/lib/src/content_string.dart rename to packages/dynamite/dynamite_runtime/lib/src/built_value/content_string_serializer.dart index 9f75d638..801d19b9 100644 --- a/packages/dynamite/dynamite_runtime/lib/src/content_string.dart +++ b/packages/dynamite/dynamite_runtime/lib/src/built_value/content_string_serializer.dart @@ -1,22 +1,7 @@ import 'dart:convert'; -import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; - -part 'content_string.g.dart'; - -/// Json data encoded in a `String` as defined by [json-schema](https://json-schema.org/understanding-json-schema/reference/non_json_data.html#contentschema). -abstract class ContentString implements Built, ContentStringBuilder> { - /// Creates a new content `String`. - factory ContentString([final void Function(ContentStringBuilder)? b]) = _$ContentString; - const ContentString._(); - - /// The decoded value of the content `String`. - T get content; - - /// The serializer for a content `String`. - static Serializer> get serializer => _$contentStringSerializer; -} +import 'package:dynamite_runtime/src/models/content_string.dart'; /// Serialization plugin for decoding [ContentString]s. /// diff --git a/packages/dynamite/dynamite_runtime/lib/src/built_value/double_serializer.dart b/packages/dynamite/dynamite_runtime/lib/src/built_value/double_serializer.dart new file mode 100644 index 00000000..19e55ecd --- /dev/null +++ b/packages/dynamite/dynamite_runtime/lib/src/built_value/double_serializer.dart @@ -0,0 +1,48 @@ +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +/// A built_value serializer for `double` values that does not accept integers. +class DynamiteDoubleSerializer implements PrimitiveSerializer { + // Constant names match those in [double]. + static const String _nan = 'NaN'; + static const String _infinity = 'INF'; + static const String _negativeInfinity = '-INF'; + + @override + final Iterable types = BuiltList([double]); + + @override + final String wireName = 'double'; + + @override + Object serialize( + final Serializers serializers, + final double aDouble, { + final FullType specifiedType = FullType.unspecified, + }) { + if (aDouble.isNaN) { + return _nan; + } else if (aDouble.isInfinite) { + return aDouble.isNegative ? _negativeInfinity : _infinity; + } else { + return aDouble; + } + } + + @override + double deserialize( + final Serializers serializers, + final Object serialized, { + final FullType specifiedType = FullType.unspecified, + }) { + if (serialized == _nan) { + return double.nan; + } else if (serialized == _negativeInfinity) { + return double.negativeInfinity; + } else if (serialized == _infinity) { + return double.infinity; + } else { + return serialized as double; + } + } +} diff --git a/packages/dynamite/dynamite_runtime/lib/src/models/content_string.dart b/packages/dynamite/dynamite_runtime/lib/src/models/content_string.dart new file mode 100644 index 00000000..1d1e8db2 --- /dev/null +++ b/packages/dynamite/dynamite_runtime/lib/src/models/content_string.dart @@ -0,0 +1,17 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'content_string.g.dart'; + +/// Json data encoded in a `String` as defined by [json-schema](https://json-schema.org/understanding-json-schema/reference/non_json_data.html#contentschema). +abstract class ContentString implements Built, ContentStringBuilder> { + /// Creates a new content `String`. + factory ContentString([final void Function(ContentStringBuilder)? b]) = _$ContentString; + const ContentString._(); + + /// The decoded value of the content `String`. + T get content; + + /// The serializer for a content `String`. + static Serializer> get serializer => _$contentStringSerializer; +} diff --git a/packages/dynamite/dynamite_runtime/lib/src/content_string.g.dart b/packages/dynamite/dynamite_runtime/lib/src/models/content_string.g.dart similarity index 100% rename from packages/dynamite/dynamite_runtime/lib/src/content_string.g.dart rename to packages/dynamite/dynamite_runtime/lib/src/models/content_string.g.dart diff --git a/packages/dynamite/dynamite_runtime/pubspec.yaml b/packages/dynamite/dynamite_runtime/pubspec.yaml index 4c0f2081..cd45cb9f 100644 --- a/packages/dynamite/dynamite_runtime/pubspec.yaml +++ b/packages/dynamite/dynamite_runtime/pubspec.yaml @@ -6,6 +6,7 @@ environment: sdk: '>=3.1.0 <4.0.0' dependencies: + built_collection: ^5.0.0 built_value: ^8.0.1 cookie_jar: ^4.0.0 meta: ^1.0.0 @@ -13,7 +14,6 @@ dependencies: dev_dependencies: build_runner: ^2.4.6 - built_collection: ^5.1.1 built_value_generator: ^8.6.3 neon_lints: git: diff --git a/packages/dynamite/dynamite_runtime/test/content_string_test.dart b/packages/dynamite/dynamite_runtime/test/content_string_test.dart index 2e87c378..81cd4378 100644 --- a/packages/dynamite/dynamite_runtime/test/content_string_test.dart +++ b/packages/dynamite/dynamite_runtime/test/content_string_test.dart @@ -5,7 +5,8 @@ import 'dart:convert'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; +import 'package:dynamite_runtime/models.dart'; import 'package:test/test.dart'; part 'content_string_test.g.dart'; diff --git a/packages/dynamite/dynamite_runtime/test/double_serializer_test.dart b/packages/dynamite/dynamite_runtime/test/double_serializer_test.dart new file mode 100644 index 00000000..9ea51855 --- /dev/null +++ b/packages/dynamite/dynamite_runtime/test/double_serializer_test.dart @@ -0,0 +1,95 @@ +// ignore_for_file: avoid_redundant_argument_values + +import 'dart:convert'; + +import 'package:built_value/serializer.dart'; +import 'package:dynamite_runtime/built_value.dart'; +import 'package:test/test.dart'; + +void main() { + final serializers = (Serializers().toBuilder()..add(DynamiteDoubleSerializer())).build(); + + group('double with known specifiedType', () { + const data = 3.141592653589793; + const serialized = data; + const specifiedType = FullType(double); + + test('can be serialized', () { + expect(serializers.serialize(data, specifiedType: specifiedType), serialized); + }); + + test('can be deserialized', () { + expect(serializers.deserialize(serialized, specifiedType: specifiedType), data); + }); + }); + + group('double with unknown specifiedType', () { + const data = 3.141592653589793; + final serialized = json.decode(json.encode(['double', data])) as Object; + const specifiedType = FullType.unspecified; + + test('can be serialized', () { + expect(serializers.serialize(data, specifiedType: specifiedType), serialized); + }); + + test('can be deserialized', () { + expect(serializers.deserialize(serialized, specifiedType: specifiedType), data); + }); + }); + + group('integer with known specifiedType', () { + const data = 3; + const serialized = data; + const specifiedType = FullType(double); + + test('can not be deserialized', () { + expect( + () => serializers.deserialize(serialized, specifiedType: specifiedType), + throwsA(isA()), + ); + }); + }); + + group('double with NaN value', () { + const data = double.nan; + const serialized = 'NaN'; + const specifiedType = FullType(double); + + test('can be serialized', () { + expect(serializers.serialize(data, specifiedType: specifiedType), serialized); + }); + + test('can be deserialized', () { + // Compare using toString as NaN != NaN. + expect(serializers.deserialize(serialized, specifiedType: specifiedType).toString(), data.toString()); + }); + }); + + group('double with -INF value', () { + const data = double.negativeInfinity; + const serialized = '-INF'; + const specifiedType = FullType(double); + + test('can be serialized', () { + expect(serializers.serialize(data, specifiedType: specifiedType), serialized); + }); + + test('can be deserialized', () { + expect(serializers.deserialize(serialized, specifiedType: specifiedType), data); + }); + }); + + group('double with INF value', () { + const data = double.infinity; + const serialized = 'INF'; + const specifiedType = FullType(double); + + test('can be serialized', () { + expect(serializers.serialize(data, specifiedType: specifiedType), serialized); + }); + + test('can be deserialized', () { + expect(serializers.deserialize(serialized, specifiedType: specifiedType), data); + }); + }); +} diff --git a/packages/nextcloud/lib/nextcloud.dart b/packages/nextcloud/lib/nextcloud.dart index 7f9fc397..b43863e9 100644 --- a/packages/nextcloud/lib/nextcloud.dart +++ b/packages/nextcloud/lib/nextcloud.dart @@ -1,6 +1,6 @@ -export 'package:dynamite_runtime/content_string.dart'; export 'package:dynamite_runtime/http_client.dart' show BytesStreamExtension, CookieJar, DynamiteApiException, DynamiteRawResponse, DynamiteResponse; +export 'package:dynamite_runtime/models.dart'; export 'ids.dart'; export 'src/client.dart'; diff --git a/packages/nextcloud/lib/src/api/comments.openapi.dart b/packages/nextcloud/lib/src/api/comments.openapi.dart index e1eafe4a..14a35103 100644 --- a/packages/nextcloud/lib/src/api/comments.openapi.dart +++ b/packages/nextcloud/lib/src/api/comments.openapi.dart @@ -6,7 +6,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; part 'comments.openapi.g.dart'; @@ -88,6 +88,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/core.openapi.dart b/packages/nextcloud/lib/src/api/core.openapi.dart index 30fed108..77ed1796 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.dart @@ -11,8 +11,9 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; +import 'package:dynamite_runtime/models.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -10406,6 +10407,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/dashboard.openapi.dart b/packages/nextcloud/lib/src/api/dashboard.openapi.dart index 3a2118fa..f0abf030 100644 --- a/packages/nextcloud/lib/src/api/dashboard.openapi.dart +++ b/packages/nextcloud/lib/src/api/dashboard.openapi.dart @@ -9,8 +9,9 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; +import 'package:dynamite_runtime/models.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -758,6 +759,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/dav.openapi.dart b/packages/nextcloud/lib/src/api/dav.openapi.dart index 73657f50..3190a3d1 100644 --- a/packages/nextcloud/lib/src/api/dav.openapi.dart +++ b/packages/nextcloud/lib/src/api/dav.openapi.dart @@ -8,7 +8,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -334,6 +334,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/files.openapi.dart b/packages/nextcloud/lib/src/api/files.openapi.dart index dc252c64..3c9c3801 100644 --- a/packages/nextcloud/lib/src/api/files.openapi.dart +++ b/packages/nextcloud/lib/src/api/files.openapi.dart @@ -10,7 +10,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:dynamite_runtime/utils.dart'; import 'package:meta/meta.dart'; @@ -2823,6 +2823,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/files_external.openapi.dart b/packages/nextcloud/lib/src/api/files_external.openapi.dart index 4f2101ee..023c4acd 100644 --- a/packages/nextcloud/lib/src/api/files_external.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_external.openapi.dart @@ -10,7 +10,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -360,6 +360,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/files_reminders.openapi.dart b/packages/nextcloud/lib/src/api/files_reminders.openapi.dart index d5ed5053..a961c90f 100644 --- a/packages/nextcloud/lib/src/api/files_reminders.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_reminders.openapi.dart @@ -9,7 +9,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:dynamite_runtime/utils.dart'; import 'package:meta/meta.dart'; @@ -609,6 +609,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart index 66adaa46..50be245b 100644 --- a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart @@ -10,8 +10,9 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; +import 'package:dynamite_runtime/models.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -5376,6 +5377,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/files_trashbin.openapi.dart b/packages/nextcloud/lib/src/api/files_trashbin.openapi.dart index a6e9e881..c89a5f33 100644 --- a/packages/nextcloud/lib/src/api/files_trashbin.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_trashbin.openapi.dart @@ -8,7 +8,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -213,6 +213,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/files_versions.openapi.dart b/packages/nextcloud/lib/src/api/files_versions.openapi.dart index f7641ab4..f9c098cd 100644 --- a/packages/nextcloud/lib/src/api/files_versions.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_versions.openapi.dart @@ -8,7 +8,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -217,6 +217,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/news.openapi.dart b/packages/nextcloud/lib/src/api/news.openapi.dart index 88784fba..5dbd568d 100644 --- a/packages/nextcloud/lib/src/api/news.openapi.dart +++ b/packages/nextcloud/lib/src/api/news.openapi.dart @@ -10,7 +10,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -1729,6 +1729,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/notes.openapi.dart b/packages/nextcloud/lib/src/api/notes.openapi.dart index 3bfe518f..6b927643 100644 --- a/packages/nextcloud/lib/src/api/notes.openapi.dart +++ b/packages/nextcloud/lib/src/api/notes.openapi.dart @@ -11,7 +11,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -918,6 +918,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/notifications.openapi.dart b/packages/nextcloud/lib/src/api/notifications.openapi.dart index 07794b29..5822ef00 100644 --- a/packages/nextcloud/lib/src/api/notifications.openapi.dart +++ b/packages/nextcloud/lib/src/api/notifications.openapi.dart @@ -10,7 +10,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -2268,6 +2268,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart b/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart index c8d974a1..af49f70e 100644 --- a/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart +++ b/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart @@ -10,8 +10,9 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; +import 'package:dynamite_runtime/models.dart'; import 'package:dynamite_runtime/utils.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -9231,6 +9232,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/settings.openapi.dart b/packages/nextcloud/lib/src/api/settings.openapi.dart index eb02dca3..c478b039 100644 --- a/packages/nextcloud/lib/src/api/settings.openapi.dart +++ b/packages/nextcloud/lib/src/api/settings.openapi.dart @@ -8,7 +8,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -199,6 +199,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/sharebymail.openapi.dart b/packages/nextcloud/lib/src/api/sharebymail.openapi.dart index 3ef5f042..d97238b0 100644 --- a/packages/nextcloud/lib/src/api/sharebymail.openapi.dart +++ b/packages/nextcloud/lib/src/api/sharebymail.openapi.dart @@ -6,7 +6,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; part 'sharebymail.openapi.g.dart'; @@ -241,6 +241,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/theming.openapi.dart b/packages/nextcloud/lib/src/api/theming.openapi.dart index 9d85b95f..323534f9 100644 --- a/packages/nextcloud/lib/src/api/theming.openapi.dart +++ b/packages/nextcloud/lib/src/api/theming.openapi.dart @@ -10,7 +10,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:dynamite_runtime/utils.dart'; import 'package:meta/meta.dart'; @@ -1411,6 +1411,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/updatenotification.openapi.dart b/packages/nextcloud/lib/src/api/updatenotification.openapi.dart index 4a897e3e..85b02785 100644 --- a/packages/nextcloud/lib/src/api/updatenotification.openapi.dart +++ b/packages/nextcloud/lib/src/api/updatenotification.openapi.dart @@ -9,7 +9,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -327,6 +327,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/uppush.openapi.dart b/packages/nextcloud/lib/src/api/uppush.openapi.dart index 1163357c..0f770dfb 100644 --- a/packages/nextcloud/lib/src/api/uppush.openapi.dart +++ b/packages/nextcloud/lib/src/api/uppush.openapi.dart @@ -9,7 +9,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -1303,6 +1303,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/user_status.openapi.dart b/packages/nextcloud/lib/src/api/user_status.openapi.dart index 5153b5b6..733e9c4e 100644 --- a/packages/nextcloud/lib/src/api/user_status.openapi.dart +++ b/packages/nextcloud/lib/src/api/user_status.openapi.dart @@ -10,7 +10,7 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -2094,6 +2094,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); diff --git a/packages/nextcloud/lib/src/api/weather_status.openapi.dart b/packages/nextcloud/lib/src/api/weather_status.openapi.dart index 1b5787cb..a5163f10 100644 --- a/packages/nextcloud/lib/src/api/weather_status.openapi.dart +++ b/packages/nextcloud/lib/src/api/weather_status.openapi.dart @@ -9,7 +9,7 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:collection/collection.dart'; -import 'package:dynamite_runtime/content_string.dart'; +import 'package:dynamite_runtime/built_value.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:meta/meta.dart'; import 'package:universal_io/io.dart'; @@ -1881,6 +1881,7 @@ final Serializers _serializers = (Serializers().toBuilder() .build(); final Serializers _jsonSerializers = (_serializers.toBuilder() + ..add(DynamiteDoubleSerializer()) ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build();