Browse Source

chore(dynamite_end_to_end_test): regenerate specs

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/1130/head
Nikolas Rimikis 1 year ago
parent
commit
6ce1a277b8
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 192
      packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.dart
  2. 157
      packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.g.dart
  3. 242
      packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart
  4. 196
      packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.g.dart
  5. 192
      packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.dart
  6. 157
      packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.g.dart
  7. 135
      packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.dart
  8. 103
      packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.g.dart

192
packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.dart

@ -47,7 +47,53 @@ abstract class ObjectAnyOf0 implements ObjectAnyOf0Interface, Built<ObjectAnyOf0
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<ObjectAnyOf0> get serializer => _$objectAnyOf0Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<ObjectAnyOf0> get serializer => const _$ObjectAnyOf0Serializer();
}
class _$ObjectAnyOf0Serializer implements StructuredSerializer<ObjectAnyOf0> {
const _$ObjectAnyOf0Serializer();
@override
Iterable<Type> get types => const [ObjectAnyOf0, _$ObjectAnyOf0];
@override
String get wireName => 'ObjectAnyOf0';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final ObjectAnyOf0 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute1-anyOf',
serializers.serialize(object.attribute1AnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectAnyOf0 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = ObjectAnyOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute1-anyOf':
result.attribute1AnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -65,7 +111,53 @@ abstract class ObjectAnyOf1 implements ObjectAnyOf1Interface, Built<ObjectAnyOf1
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<ObjectAnyOf1> get serializer => _$objectAnyOf1Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<ObjectAnyOf1> get serializer => const _$ObjectAnyOf1Serializer();
}
class _$ObjectAnyOf1Serializer implements StructuredSerializer<ObjectAnyOf1> {
const _$ObjectAnyOf1Serializer();
@override
Iterable<Type> get types => const [ObjectAnyOf1, _$ObjectAnyOf1];
@override
String get wireName => 'ObjectAnyOf1';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final ObjectAnyOf1 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute2-anyOf',
serializers.serialize(object.attribute2AnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectAnyOf1 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = ObjectAnyOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute2-anyOf':
result.attribute2AnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -150,7 +242,53 @@ abstract class MixedAnyOf1 implements MixedAnyOf1Interface, Built<MixedAnyOf1, M
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<MixedAnyOf1> get serializer => _$mixedAnyOf1Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<MixedAnyOf1> get serializer => const _$MixedAnyOf1Serializer();
}
class _$MixedAnyOf1Serializer implements StructuredSerializer<MixedAnyOf1> {
const _$MixedAnyOf1Serializer();
@override
Iterable<Type> get types => const [MixedAnyOf1, _$MixedAnyOf1];
@override
String get wireName => 'MixedAnyOf1';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final MixedAnyOf1 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-anyOf',
serializers.serialize(object.attributeAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
MixedAnyOf1 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = MixedAnyOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-anyOf':
result.attributeAnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -236,7 +374,53 @@ abstract class OneObjectAnyOf0 implements OneObjectAnyOf0Interface, Built<OneObj
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<OneObjectAnyOf0> get serializer => _$oneObjectAnyOf0Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<OneObjectAnyOf0> get serializer => const _$OneObjectAnyOf0Serializer();
}
class _$OneObjectAnyOf0Serializer implements StructuredSerializer<OneObjectAnyOf0> {
const _$OneObjectAnyOf0Serializer();
@override
Iterable<Type> get types => const [OneObjectAnyOf0, _$OneObjectAnyOf0];
@override
String get wireName => 'OneObjectAnyOf0';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final OneObjectAnyOf0 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-anyOf',
serializers.serialize(object.attributeAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
OneObjectAnyOf0 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = OneObjectAnyOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-anyOf':
result.attributeAnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)

157
packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.g.dart

@ -6,163 +6,6 @@ part of 'any_of.openapi.dart';
// BuiltValueGenerator
// **************************************************************************
Serializer<ObjectAnyOf0> _$objectAnyOf0Serializer = _$ObjectAnyOf0Serializer();
Serializer<ObjectAnyOf1> _$objectAnyOf1Serializer = _$ObjectAnyOf1Serializer();
Serializer<MixedAnyOf1> _$mixedAnyOf1Serializer = _$MixedAnyOf1Serializer();
Serializer<OneObjectAnyOf0> _$oneObjectAnyOf0Serializer = _$OneObjectAnyOf0Serializer();
class _$ObjectAnyOf0Serializer implements StructuredSerializer<ObjectAnyOf0> {
@override
final Iterable<Type> types = const [ObjectAnyOf0, _$ObjectAnyOf0];
@override
final String wireName = 'ObjectAnyOf0';
@override
Iterable<Object?> serialize(Serializers serializers, ObjectAnyOf0 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute1-anyOf',
serializers.serialize(object.attribute1AnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectAnyOf0 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = ObjectAnyOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute1-anyOf':
result.attribute1AnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$ObjectAnyOf1Serializer implements StructuredSerializer<ObjectAnyOf1> {
@override
final Iterable<Type> types = const [ObjectAnyOf1, _$ObjectAnyOf1];
@override
final String wireName = 'ObjectAnyOf1';
@override
Iterable<Object?> serialize(Serializers serializers, ObjectAnyOf1 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute2-anyOf',
serializers.serialize(object.attribute2AnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectAnyOf1 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = ObjectAnyOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute2-anyOf':
result.attribute2AnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$MixedAnyOf1Serializer implements StructuredSerializer<MixedAnyOf1> {
@override
final Iterable<Type> types = const [MixedAnyOf1, _$MixedAnyOf1];
@override
final String wireName = 'MixedAnyOf1';
@override
Iterable<Object?> serialize(Serializers serializers, MixedAnyOf1 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-anyOf',
serializers.serialize(object.attributeAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
MixedAnyOf1 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = MixedAnyOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-anyOf':
result.attributeAnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$OneObjectAnyOf0Serializer implements StructuredSerializer<OneObjectAnyOf0> {
@override
final Iterable<Type> types = const [OneObjectAnyOf0, _$OneObjectAnyOf0];
@override
final String wireName = 'OneObjectAnyOf0';
@override
Iterable<Object?> serialize(Serializers serializers, OneObjectAnyOf0 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-anyOf',
serializers.serialize(object.attributeAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
OneObjectAnyOf0 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = OneObjectAnyOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-anyOf':
result.attributeAnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
abstract mixin class ObjectAnyOf0InterfaceBuilder {
void replace(ObjectAnyOf0Interface other);
void update(void Function(ObjectAnyOf0InterfaceBuilder) updates);

242
packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart

@ -46,7 +46,53 @@ abstract class Base implements BaseInterface, Built<Base, BaseBuilder> {
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<Base> get serializer => _$baseSerializer;
@BuiltValueSerializer(custom: true)
static Serializer<Base> get serializer => const _$BaseSerializer();
}
class _$BaseSerializer implements StructuredSerializer<Base> {
const _$BaseSerializer();
@override
Iterable<Type> get types => const [Base, _$Base];
@override
String get wireName => 'Base';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final Base object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute',
serializers.serialize(object.attribute, specifiedType: const FullType(String)),
];
return result;
}
@override
Base deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = BaseBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute':
result.attribute = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -85,7 +131,53 @@ abstract class BaseOneOf1 implements BaseOneOf1Interface, Built<BaseOneOf1, Base
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<BaseOneOf1> get serializer => _$baseOneOf1Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<BaseOneOf1> get serializer => const _$BaseOneOf1Serializer();
}
class _$BaseOneOf1Serializer implements StructuredSerializer<BaseOneOf1> {
const _$BaseOneOf1Serializer();
@override
Iterable<Type> get types => const [BaseOneOf1, _$BaseOneOf1];
@override
String get wireName => 'BaseOneOf1';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final BaseOneOf1 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-oneOf',
serializers.serialize(object.attributeOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseOneOf1 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = BaseOneOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-oneOf':
result.attributeOneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -170,7 +262,53 @@ abstract class BaseAnyOf1 implements BaseAnyOf1Interface, Built<BaseAnyOf1, Base
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<BaseAnyOf1> get serializer => _$baseAnyOf1Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<BaseAnyOf1> get serializer => const _$BaseAnyOf1Serializer();
}
class _$BaseAnyOf1Serializer implements StructuredSerializer<BaseAnyOf1> {
const _$BaseAnyOf1Serializer();
@override
Iterable<Type> get types => const [BaseAnyOf1, _$BaseAnyOf1];
@override
String get wireName => 'BaseAnyOf1';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final BaseAnyOf1 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-anyOf',
serializers.serialize(object.attributeAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseAnyOf1 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = BaseAnyOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-anyOf':
result.attributeAnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -279,7 +417,54 @@ abstract class BaseNestedOneOf3 implements BaseNestedOneOf3Interface, Built<Base
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<BaseNestedOneOf3> get serializer => _$baseNestedOneOf3Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<BaseNestedOneOf3> get serializer => const _$BaseNestedOneOf3Serializer();
}
class _$BaseNestedOneOf3Serializer implements StructuredSerializer<BaseNestedOneOf3> {
const _$BaseNestedOneOf3Serializer();
@override
Iterable<Type> get types => const [BaseNestedOneOf3, _$BaseNestedOneOf3];
@override
String get wireName => 'BaseNestedOneOf3';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final BaseNestedOneOf3 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-nested-oneOf',
serializers.serialize(object.attributeNestedOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseNestedOneOf3 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = BaseNestedOneOf3Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-nested-oneOf':
result.attributeNestedOneOf =
serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -378,7 +563,54 @@ abstract class BaseNestedAnyOf3 implements BaseNestedAnyOf3Interface, Built<Base
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<BaseNestedAnyOf3> get serializer => _$baseNestedAnyOf3Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<BaseNestedAnyOf3> get serializer => const _$BaseNestedAnyOf3Serializer();
}
class _$BaseNestedAnyOf3Serializer implements StructuredSerializer<BaseNestedAnyOf3> {
const _$BaseNestedAnyOf3Serializer();
@override
Iterable<Type> get types => const [BaseNestedAnyOf3, _$BaseNestedAnyOf3];
@override
String get wireName => 'BaseNestedAnyOf3';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final BaseNestedAnyOf3 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-nested-anyOf',
serializers.serialize(object.attributeNestedAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseNestedAnyOf3 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = BaseNestedAnyOf3Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-nested-anyOf':
result.attributeNestedAnyOf =
serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)

196
packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.g.dart

@ -6,50 +6,8 @@ part of 'nested_ofs.openapi.dart';
// BuiltValueGenerator
// **************************************************************************
Serializer<Base> _$baseSerializer = _$BaseSerializer();
Serializer<BaseAllOf> _$baseAllOfSerializer = _$BaseAllOfSerializer();
Serializer<BaseOneOf1> _$baseOneOf1Serializer = _$BaseOneOf1Serializer();
Serializer<BaseAnyOf1> _$baseAnyOf1Serializer = _$BaseAnyOf1Serializer();
Serializer<BaseNestedAllOf> _$baseNestedAllOfSerializer = _$BaseNestedAllOfSerializer();
Serializer<BaseNestedOneOf3> _$baseNestedOneOf3Serializer = _$BaseNestedOneOf3Serializer();
Serializer<BaseNestedAnyOf3> _$baseNestedAnyOf3Serializer = _$BaseNestedAnyOf3Serializer();
class _$BaseSerializer implements StructuredSerializer<Base> {
@override
final Iterable<Type> types = const [Base, _$Base];
@override
final String wireName = 'Base';
@override
Iterable<Object?> serialize(Serializers serializers, Base object, {FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute',
serializers.serialize(object.attribute, specifiedType: const FullType(String)),
];
return result;
}
@override
Base deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = BaseBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute':
result.attribute = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$BaseAllOfSerializer implements StructuredSerializer<BaseAllOf> {
@override
@ -94,82 +52,6 @@ class _$BaseAllOfSerializer implements StructuredSerializer<BaseAllOf> {
}
}
class _$BaseOneOf1Serializer implements StructuredSerializer<BaseOneOf1> {
@override
final Iterable<Type> types = const [BaseOneOf1, _$BaseOneOf1];
@override
final String wireName = 'BaseOneOf1';
@override
Iterable<Object?> serialize(Serializers serializers, BaseOneOf1 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-oneOf',
serializers.serialize(object.attributeOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseOneOf1 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = BaseOneOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-oneOf':
result.attributeOneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$BaseAnyOf1Serializer implements StructuredSerializer<BaseAnyOf1> {
@override
final Iterable<Type> types = const [BaseAnyOf1, _$BaseAnyOf1];
@override
final String wireName = 'BaseAnyOf1';
@override
Iterable<Object?> serialize(Serializers serializers, BaseAnyOf1 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-anyOf',
serializers.serialize(object.attributeAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseAnyOf1 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = BaseAnyOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-anyOf':
result.attributeAnyOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$BaseNestedAllOfSerializer implements StructuredSerializer<BaseNestedAllOf> {
@override
final Iterable<Type> types = const [BaseNestedAllOf, _$BaseNestedAllOf];
@ -248,84 +130,6 @@ class _$BaseNestedAllOfSerializer implements StructuredSerializer<BaseNestedAllO
}
}
class _$BaseNestedOneOf3Serializer implements StructuredSerializer<BaseNestedOneOf3> {
@override
final Iterable<Type> types = const [BaseNestedOneOf3, _$BaseNestedOneOf3];
@override
final String wireName = 'BaseNestedOneOf3';
@override
Iterable<Object?> serialize(Serializers serializers, BaseNestedOneOf3 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-nested-oneOf',
serializers.serialize(object.attributeNestedOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseNestedOneOf3 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = BaseNestedOneOf3Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-nested-oneOf':
result.attributeNestedOneOf =
serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$BaseNestedAnyOf3Serializer implements StructuredSerializer<BaseNestedAnyOf3> {
@override
final Iterable<Type> types = const [BaseNestedAnyOf3, _$BaseNestedAnyOf3];
@override
final String wireName = 'BaseNestedAnyOf3';
@override
Iterable<Object?> serialize(Serializers serializers, BaseNestedAnyOf3 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-nested-anyOf',
serializers.serialize(object.attributeNestedAnyOf, specifiedType: const FullType(String)),
];
return result;
}
@override
BaseNestedAnyOf3 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = BaseNestedAnyOf3Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-nested-anyOf':
result.attributeNestedAnyOf =
serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
abstract mixin class BaseInterfaceBuilder {
void replace(BaseInterface other);
void update(void Function(BaseInterfaceBuilder) updates);

192
packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.dart

@ -47,7 +47,53 @@ abstract class ObjectOneOf0 implements ObjectOneOf0Interface, Built<ObjectOneOf0
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<ObjectOneOf0> get serializer => _$objectOneOf0Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<ObjectOneOf0> get serializer => const _$ObjectOneOf0Serializer();
}
class _$ObjectOneOf0Serializer implements StructuredSerializer<ObjectOneOf0> {
const _$ObjectOneOf0Serializer();
@override
Iterable<Type> get types => const [ObjectOneOf0, _$ObjectOneOf0];
@override
String get wireName => 'ObjectOneOf0';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final ObjectOneOf0 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute1-oneOf',
serializers.serialize(object.attribute1OneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectOneOf0 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = ObjectOneOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute1-oneOf':
result.attribute1OneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -65,7 +111,53 @@ abstract class ObjectOneOf1 implements ObjectOneOf1Interface, Built<ObjectOneOf1
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<ObjectOneOf1> get serializer => _$objectOneOf1Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<ObjectOneOf1> get serializer => const _$ObjectOneOf1Serializer();
}
class _$ObjectOneOf1Serializer implements StructuredSerializer<ObjectOneOf1> {
const _$ObjectOneOf1Serializer();
@override
Iterable<Type> get types => const [ObjectOneOf1, _$ObjectOneOf1];
@override
String get wireName => 'ObjectOneOf1';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final ObjectOneOf1 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute2-oneOf',
serializers.serialize(object.attribute2OneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectOneOf1 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = ObjectOneOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute2-oneOf':
result.attribute2OneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -150,7 +242,53 @@ abstract class MixedOneOf1 implements MixedOneOf1Interface, Built<MixedOneOf1, M
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<MixedOneOf1> get serializer => _$mixedOneOf1Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<MixedOneOf1> get serializer => const _$MixedOneOf1Serializer();
}
class _$MixedOneOf1Serializer implements StructuredSerializer<MixedOneOf1> {
const _$MixedOneOf1Serializer();
@override
Iterable<Type> get types => const [MixedOneOf1, _$MixedOneOf1];
@override
String get wireName => 'MixedOneOf1';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final MixedOneOf1 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-oneOf',
serializers.serialize(object.attributeOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
MixedOneOf1 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = MixedOneOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-oneOf':
result.attributeOneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -236,7 +374,53 @@ abstract class OneObjectOneOf0 implements OneObjectOneOf0Interface, Built<OneObj
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<OneObjectOneOf0> get serializer => _$oneObjectOneOf0Serializer;
@BuiltValueSerializer(custom: true)
static Serializer<OneObjectOneOf0> get serializer => const _$OneObjectOneOf0Serializer();
}
class _$OneObjectOneOf0Serializer implements StructuredSerializer<OneObjectOneOf0> {
const _$OneObjectOneOf0Serializer();
@override
Iterable<Type> get types => const [OneObjectOneOf0, _$OneObjectOneOf0];
@override
String get wireName => 'OneObjectOneOf0';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final OneObjectOneOf0 object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'attribute-oneOf',
serializers.serialize(object.attributeOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
OneObjectOneOf0 deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = OneObjectOneOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute-oneOf':
result.attributeOneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)

157
packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.g.dart

@ -6,163 +6,6 @@ part of 'one_of.openapi.dart';
// BuiltValueGenerator
// **************************************************************************
Serializer<ObjectOneOf0> _$objectOneOf0Serializer = _$ObjectOneOf0Serializer();
Serializer<ObjectOneOf1> _$objectOneOf1Serializer = _$ObjectOneOf1Serializer();
Serializer<MixedOneOf1> _$mixedOneOf1Serializer = _$MixedOneOf1Serializer();
Serializer<OneObjectOneOf0> _$oneObjectOneOf0Serializer = _$OneObjectOneOf0Serializer();
class _$ObjectOneOf0Serializer implements StructuredSerializer<ObjectOneOf0> {
@override
final Iterable<Type> types = const [ObjectOneOf0, _$ObjectOneOf0];
@override
final String wireName = 'ObjectOneOf0';
@override
Iterable<Object?> serialize(Serializers serializers, ObjectOneOf0 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute1-oneOf',
serializers.serialize(object.attribute1OneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectOneOf0 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = ObjectOneOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute1-oneOf':
result.attribute1OneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$ObjectOneOf1Serializer implements StructuredSerializer<ObjectOneOf1> {
@override
final Iterable<Type> types = const [ObjectOneOf1, _$ObjectOneOf1];
@override
final String wireName = 'ObjectOneOf1';
@override
Iterable<Object?> serialize(Serializers serializers, ObjectOneOf1 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute2-oneOf',
serializers.serialize(object.attribute2OneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
ObjectOneOf1 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = ObjectOneOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute2-oneOf':
result.attribute2OneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$MixedOneOf1Serializer implements StructuredSerializer<MixedOneOf1> {
@override
final Iterable<Type> types = const [MixedOneOf1, _$MixedOneOf1];
@override
final String wireName = 'MixedOneOf1';
@override
Iterable<Object?> serialize(Serializers serializers, MixedOneOf1 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-oneOf',
serializers.serialize(object.attributeOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
MixedOneOf1 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = MixedOneOf1Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-oneOf':
result.attributeOneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$OneObjectOneOf0Serializer implements StructuredSerializer<OneObjectOneOf0> {
@override
final Iterable<Type> types = const [OneObjectOneOf0, _$OneObjectOneOf0];
@override
final String wireName = 'OneObjectOneOf0';
@override
Iterable<Object?> serialize(Serializers serializers, OneObjectOneOf0 object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'attribute-oneOf',
serializers.serialize(object.attributeOneOf, specifiedType: const FullType(String)),
];
return result;
}
@override
OneObjectOneOf0 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = OneObjectOneOf0Builder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute-oneOf':
result.attributeOneOf = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
abstract mixin class ObjectOneOf0InterfaceBuilder {
void replace(ObjectOneOf0Interface other);
void update(void Function(ObjectOneOf0InterfaceBuilder) updates);

135
packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.dart

@ -56,7 +56,60 @@ abstract class Base implements BaseInterface, Built<Base, BaseBuilder> {
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<Base> get serializer => _$baseSerializer;
@BuiltValueSerializer(custom: true)
static Serializer<Base> get serializer => const _$BaseSerializer();
}
class _$BaseSerializer implements StructuredSerializer<Base> {
const _$BaseSerializer();
@override
Iterable<Type> get types => const [Base, _$Base];
@override
String get wireName => 'Base';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final Base object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[];
Object? value;
value = object.attribute;
if (value != null) {
result
..add('attribute')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
return result;
}
@override
Base deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = BaseBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'attribute':
result.attribute = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
@ -76,7 +129,85 @@ abstract class NestedRedirect implements NestedRedirectInterface, Built<NestedRe
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
static Serializer<NestedRedirect> get serializer => _$nestedRedirectSerializer;
@BuiltValueSerializer(custom: true)
static Serializer<NestedRedirect> get serializer => const _$NestedRedirectSerializer();
}
class _$NestedRedirectSerializer implements StructuredSerializer<NestedRedirect> {
const _$NestedRedirectSerializer();
@override
Iterable<Type> get types => const [NestedRedirect, _$NestedRedirect];
@override
String get wireName => 'NestedRedirect';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final NestedRedirect object, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[];
Object? value;
value = object.redirect;
if (value != null) {
result
..add('redirect')
..add(
serializers.serialize(value, specifiedType: const FullType(Base)),
);
}
value = object.redirectBaseType;
if (value != null) {
result
..add('redirectBaseType')
..add(
serializers.serialize(value, specifiedType: const FullType(int)),
);
}
value = object.redirectEmptyType;
if (value != null) {
result
..add('redirectEmptyType')
..add(
serializers.serialize(value, specifiedType: const FullType(JsonObject)),
);
}
return result;
}
@override
NestedRedirect deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = NestedRedirectBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'redirect':
result.redirect.replace(
serializers.deserialize(value, specifiedType: const FullType(Base))! as Base,
);
case 'redirectBaseType':
result.redirectBaseType = serializers.deserialize(value, specifiedType: const FullType(int))! as int;
case 'redirectEmptyType':
result.redirectEmptyType =
serializers.deserialize(value, specifiedType: const FullType(JsonObject))! as JsonObject;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)

103
packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.g.dart

@ -6,109 +6,6 @@ part of 'type_defs.openapi.dart';
// BuiltValueGenerator
// **************************************************************************
Serializer<Base> _$baseSerializer = _$BaseSerializer();
Serializer<NestedRedirect> _$nestedRedirectSerializer = _$NestedRedirectSerializer();
class _$BaseSerializer implements StructuredSerializer<Base> {
@override
final Iterable<Type> types = const [Base, _$Base];
@override
final String wireName = 'Base';
@override
Iterable<Object?> serialize(Serializers serializers, Base object, {FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[];
Object? value;
value = object.attribute;
if (value != null) {
result
..add('attribute')
..add(serializers.serialize(value, specifiedType: const FullType(String)));
}
return result;
}
@override
Base deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = BaseBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'attribute':
result.attribute = serializers.deserialize(value, specifiedType: const FullType(String)) as String?;
break;
}
}
return result.build();
}
}
class _$NestedRedirectSerializer implements StructuredSerializer<NestedRedirect> {
@override
final Iterable<Type> types = const [NestedRedirect, _$NestedRedirect];
@override
final String wireName = 'NestedRedirect';
@override
Iterable<Object?> serialize(Serializers serializers, NestedRedirect object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[];
Object? value;
value = object.redirect;
if (value != null) {
result
..add('redirect')
..add(serializers.serialize(value, specifiedType: const FullType(Base)));
}
value = object.redirectBaseType;
if (value != null) {
result
..add('redirectBaseType')
..add(serializers.serialize(value, specifiedType: const FullType(int)));
}
value = object.redirectEmptyType;
if (value != null) {
result
..add('redirectEmptyType')
..add(serializers.serialize(value, specifiedType: const FullType(JsonObject)));
}
return result;
}
@override
NestedRedirect deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = NestedRedirectBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'redirect':
result.redirect.replace(serializers.deserialize(value, specifiedType: const FullType(Base))! as Base);
break;
case 'redirectBaseType':
result.redirectBaseType = serializers.deserialize(value, specifiedType: const FullType(int)) as int?;
break;
case 'redirectEmptyType':
result.redirectEmptyType =
serializers.deserialize(value, specifiedType: const FullType(JsonObject)) as JsonObject?;
break;
}
}
return result.build();
}
}
abstract mixin class BaseInterfaceBuilder {
void replace(BaseInterface other);
void update(void Function(BaseInterfaceBuilder) updates);

Loading…
Cancel
Save