Browse Source

chore(dynamite_petstore_example): regenerate specs

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/1130/head
Nikolas Rimikis 1 year ago
parent
commit
82ae490171
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 112
      packages/dynamite/dynamite_petstore_example/lib/petstore.openapi.dart
  2. 90
      packages/dynamite/dynamite_petstore_example/lib/petstore.openapi.g.dart

112
packages/dynamite/dynamite_petstore_example/lib/petstore.openapi.dart

@ -327,7 +327,65 @@ abstract class NewPet implements NewPetInterface, Built<NewPet, NewPetBuilder> {
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>; Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
// coverage:ignore-end // coverage:ignore-end
static Serializer<NewPet> get serializer => _$newPetSerializer; @BuiltValueSerializer(custom: true)
static Serializer<NewPet> get serializer => _$NewPetSerializer();
}
class _$NewPetSerializer implements StructuredSerializer<NewPet> {
const _$NewPetSerializer();
@override
Iterable<Type> get types => const [NewPet, _$NewPet];
@override
String get wireName => r'NewPet';
@override
Iterable<Object?> serialize(
Serializers serializers,
NewPet object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
];
Object? value;
value = object.tag;
if (value != null) {
result
..add('tag')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
return result;
}
@override
NewPet deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = NewPetBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'name':
result.name = (serializers.deserialize(value, specifiedType: const FullType(String))! as String);
case 'tag':
result.tag = (serializers.deserialize(value, specifiedType: const FullType(String)) as String);
}
}
return result.build();
}
} }
@BuiltValue(instantiable: false) @BuiltValue(instantiable: false)
@ -377,7 +435,57 @@ abstract class Error implements ErrorInterface, Built<Error, ErrorBuilder> {
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>; Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
// coverage:ignore-end // coverage:ignore-end
static Serializer<Error> get serializer => _$errorSerializer; @BuiltValueSerializer(custom: true)
static Serializer<Error> get serializer => _$ErrorSerializer();
}
class _$ErrorSerializer implements StructuredSerializer<Error> {
const _$ErrorSerializer();
@override
Iterable<Type> get types => const [Error, _$Error];
@override
String get wireName => r'Error';
@override
Iterable<Object?> serialize(
Serializers serializers,
Error object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'code',
serializers.serialize(object.code, specifiedType: const FullType(int)),
'message',
serializers.serialize(object.message, specifiedType: const FullType(String)),
];
return result;
}
@override
Error deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = ErrorBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current;
switch (key) {
case 'code':
result.code = (serializers.deserialize(value, specifiedType: const FullType(int))! as int);
case 'message':
result.message = (serializers.deserialize(value, specifiedType: const FullType(String))! as String);
}
}
return result.build();
}
} }
// coverage:ignore-start // coverage:ignore-start

90
packages/dynamite/dynamite_petstore_example/lib/petstore.openapi.g.dart

@ -6,55 +6,7 @@ part of 'petstore.openapi.dart';
// BuiltValueGenerator // BuiltValueGenerator
// ************************************************************************** // **************************************************************************
Serializer<NewPet> _$newPetSerializer = _$NewPetSerializer();
Serializer<Pet> _$petSerializer = _$PetSerializer(); Serializer<Pet> _$petSerializer = _$PetSerializer();
Serializer<Error> _$errorSerializer = _$ErrorSerializer();
class _$NewPetSerializer implements StructuredSerializer<NewPet> {
@override
final Iterable<Type> types = const [NewPet, _$NewPet];
@override
final String wireName = 'NewPet';
@override
Iterable<Object?> serialize(Serializers serializers, NewPet object, {FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
];
Object? value;
value = object.tag;
if (value != null) {
result
..add('tag')
..add(serializers.serialize(value, specifiedType: const FullType(String)));
}
return result;
}
@override
NewPet deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = NewPetBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'name':
result.name = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
case 'tag':
result.tag = serializers.deserialize(value, specifiedType: const FullType(String)) as String?;
break;
}
}
return result.build();
}
}
class _$PetSerializer implements StructuredSerializer<Pet> { class _$PetSerializer implements StructuredSerializer<Pet> {
@override @override
@ -107,48 +59,6 @@ class _$PetSerializer implements StructuredSerializer<Pet> {
} }
} }
class _$ErrorSerializer implements StructuredSerializer<Error> {
@override
final Iterable<Type> types = const [Error, _$Error];
@override
final String wireName = 'Error';
@override
Iterable<Object?> serialize(Serializers serializers, Error object, {FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'code',
serializers.serialize(object.code, specifiedType: const FullType(int)),
'message',
serializers.serialize(object.message, specifiedType: const FullType(String)),
];
return result;
}
@override
Error deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = ErrorBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'code':
result.code = serializers.deserialize(value, specifiedType: const FullType(int))! as int;
break;
case 'message':
result.message = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
abstract mixin class NewPetInterfaceBuilder { abstract mixin class NewPetInterfaceBuilder {
void replace(NewPetInterface other); void replace(NewPetInterface other);
void update(void Function(NewPetInterfaceBuilder) updates); void update(void Function(NewPetInterfaceBuilder) updates);

Loading…
Cancel
Save