diff --git a/packages/dynamite/dynamite/lib/src/builder/imports.dart b/packages/dynamite/dynamite/lib/src/builder/imports.dart index 3ce1dff0935..c3a37d54049 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 97e8b49ea86..04674180e82 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 dd2b6fdb67f..bdbfd579c1a 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 00000000000..2099eba8670 --- /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 2a35d3d8125..00000000000 --- 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 00000000000..7513560dec5 --- /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 9f75d638731..801d19b94c4 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 00000000000..19e55ecd385 --- /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 00000000000..1d1e8db2635 --- /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 4c0f20813cc..cd45cb9fa54 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 2e87c378344..81cd4378e02 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 00000000000..9ea51855ddd --- /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 7f9fc397341..b43863e9f32 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 e1eafe4a45a..14a351032aa 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 30fed10806f..77ed17961fd 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 3a2118fa60b..f0abf0302a2 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 73657f50590..3190a3d1716 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 dc252c6423b..3c9c38014e7 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 4f2101ee24a..023c4acd455 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 d5ed50535f4..a961c90fe84 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 66adaa4699b..50be245bed6 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 a6e9e8818f4..c89a5f338cb 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 f7641ab4a2a..f9c098cd19e 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 88784fba07d..5dbd568d0d8 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 3bfe518f70a..6b927643687 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 07794b29f26..5822ef00c9f 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 c8d974a1ae4..af49f70e2df 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 eb02dca3dcf..c478b0391c4 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 3ef5f04280f..d97238b03f7 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 9d85b95fc59..323534f96a4 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 4a897e3e424..85b027859ad 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 1163357ce0c..0f770dfb90b 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 5153b5b6879..733e9c4ed0f 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 1b5787cb3e5..a5163f10578 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();