|
|
@ -16,7 +16,12 @@ class _$SchemaSerializer implements StructuredSerializer<Schema> { |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Iterable<Object?> serialize(Serializers serializers, Schema object, {FullType specifiedType = FullType.unspecified}) { |
|
|
|
Iterable<Object?> serialize(Serializers serializers, Schema object, {FullType specifiedType = FullType.unspecified}) { |
|
|
|
final result = <Object?>[]; |
|
|
|
final result = <Object?>[ |
|
|
|
|
|
|
|
'deprecated', |
|
|
|
|
|
|
|
serializers.serialize(object.deprecated, specifiedType: const FullType(bool)), |
|
|
|
|
|
|
|
'required', |
|
|
|
|
|
|
|
serializers.serialize(object.required, specifiedType: const FullType(BuiltList, [FullType(String)])), |
|
|
|
|
|
|
|
]; |
|
|
|
Object? value; |
|
|
|
Object? value; |
|
|
|
value = object.ref; |
|
|
|
value = object.ref; |
|
|
|
if (value != null) { |
|
|
|
if (value != null) { |
|
|
@ -48,12 +53,6 @@ class _$SchemaSerializer implements StructuredSerializer<Schema> { |
|
|
|
..add('description') |
|
|
|
..add('description') |
|
|
|
..add(serializers.serialize(value, specifiedType: const FullType(String))); |
|
|
|
..add(serializers.serialize(value, specifiedType: const FullType(String))); |
|
|
|
} |
|
|
|
} |
|
|
|
value = object.deprecated; |
|
|
|
|
|
|
|
if (value != null) { |
|
|
|
|
|
|
|
result |
|
|
|
|
|
|
|
..add('deprecated') |
|
|
|
|
|
|
|
..add(serializers.serialize(value, specifiedType: const FullType(bool))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
value = object.type; |
|
|
|
value = object.type; |
|
|
|
if (value != null) { |
|
|
|
if (value != null) { |
|
|
|
result |
|
|
|
result |
|
|
@ -85,12 +84,6 @@ class _$SchemaSerializer implements StructuredSerializer<Schema> { |
|
|
|
..add(serializers.serialize(value, |
|
|
|
..add(serializers.serialize(value, |
|
|
|
specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Schema)]))); |
|
|
|
specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Schema)]))); |
|
|
|
} |
|
|
|
} |
|
|
|
value = object.required; |
|
|
|
|
|
|
|
if (value != null) { |
|
|
|
|
|
|
|
result |
|
|
|
|
|
|
|
..add('required') |
|
|
|
|
|
|
|
..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
value = object.items; |
|
|
|
value = object.items; |
|
|
|
if (value != null) { |
|
|
|
if (value != null) { |
|
|
|
result |
|
|
|
result |
|
|
@ -178,7 +171,7 @@ class _$SchemaSerializer implements StructuredSerializer<Schema> { |
|
|
|
result.description = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; |
|
|
|
result.description = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'deprecated': |
|
|
|
case 'deprecated': |
|
|
|
result.deprecated = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool?; |
|
|
|
result.deprecated = serializers.deserialize(value, specifiedType: const FullType(bool))! as bool; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'type': |
|
|
|
case 'type': |
|
|
|
result.type = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; |
|
|
|
result.type = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; |
|
|
@ -250,7 +243,7 @@ class _$Schema extends Schema { |
|
|
|
@override |
|
|
|
@override |
|
|
|
final String? description; |
|
|
|
final String? description; |
|
|
|
@override |
|
|
|
@override |
|
|
|
final bool? deprecated; |
|
|
|
final bool deprecated; |
|
|
|
@override |
|
|
|
@override |
|
|
|
final String? type; |
|
|
|
final String? type; |
|
|
|
@override |
|
|
|
@override |
|
|
@ -262,7 +255,7 @@ class _$Schema extends Schema { |
|
|
|
@override |
|
|
|
@override |
|
|
|
final BuiltMap<String, Schema>? properties; |
|
|
|
final BuiltMap<String, Schema>? properties; |
|
|
|
@override |
|
|
|
@override |
|
|
|
final BuiltList<String>? required; |
|
|
|
final BuiltList<String> required; |
|
|
|
@override |
|
|
|
@override |
|
|
|
final Schema? items; |
|
|
|
final Schema? items; |
|
|
|
@override |
|
|
|
@override |
|
|
@ -290,13 +283,13 @@ class _$Schema extends Schema { |
|
|
|
this.anyOf, |
|
|
|
this.anyOf, |
|
|
|
this.allOf, |
|
|
|
this.allOf, |
|
|
|
this.description, |
|
|
|
this.description, |
|
|
|
this.deprecated, |
|
|
|
required this.deprecated, |
|
|
|
this.type, |
|
|
|
this.type, |
|
|
|
this.format, |
|
|
|
this.format, |
|
|
|
this.$default, |
|
|
|
this.$default, |
|
|
|
this.$enum, |
|
|
|
this.$enum, |
|
|
|
this.properties, |
|
|
|
this.properties, |
|
|
|
this.required, |
|
|
|
required this.required, |
|
|
|
this.items, |
|
|
|
this.items, |
|
|
|
this.additionalProperties, |
|
|
|
this.additionalProperties, |
|
|
|
this.contentMediaType, |
|
|
|
this.contentMediaType, |
|
|
@ -306,7 +299,10 @@ class _$Schema extends Schema { |
|
|
|
this.minLength, |
|
|
|
this.minLength, |
|
|
|
this.maxLength, |
|
|
|
this.maxLength, |
|
|
|
this.nullable}) |
|
|
|
this.nullable}) |
|
|
|
: super._(); |
|
|
|
: super._() { |
|
|
|
|
|
|
|
BuiltValueNullFieldError.checkNotNull(deprecated, r'Schema', 'deprecated'); |
|
|
|
|
|
|
|
BuiltValueNullFieldError.checkNotNull(required, r'Schema', 'required'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Schema rebuild(void Function(SchemaBuilder) updates) => (toBuilder()..update(updates)).build(); |
|
|
|
Schema rebuild(void Function(SchemaBuilder) updates) => (toBuilder()..update(updates)).build(); |
|
|
@ -498,7 +494,7 @@ class SchemaBuilder implements Builder<Schema, SchemaBuilder> { |
|
|
|
_$default = $v.$default; |
|
|
|
_$default = $v.$default; |
|
|
|
_$enum = $v.$enum?.toBuilder(); |
|
|
|
_$enum = $v.$enum?.toBuilder(); |
|
|
|
_properties = $v.properties?.toBuilder(); |
|
|
|
_properties = $v.properties?.toBuilder(); |
|
|
|
_required = $v.required?.toBuilder(); |
|
|
|
_required = $v.required.toBuilder(); |
|
|
|
_items = $v.items?.toBuilder(); |
|
|
|
_items = $v.items?.toBuilder(); |
|
|
|
_additionalProperties = $v.additionalProperties?.toBuilder(); |
|
|
|
_additionalProperties = $v.additionalProperties?.toBuilder(); |
|
|
|
_contentMediaType = $v.contentMediaType; |
|
|
|
_contentMediaType = $v.contentMediaType; |
|
|
@ -528,6 +524,7 @@ class SchemaBuilder implements Builder<Schema, SchemaBuilder> { |
|
|
|
Schema build() => _build(); |
|
|
|
Schema build() => _build(); |
|
|
|
|
|
|
|
|
|
|
|
_$Schema _build() { |
|
|
|
_$Schema _build() { |
|
|
|
|
|
|
|
Schema._defaults(this); |
|
|
|
_$Schema _$result; |
|
|
|
_$Schema _$result; |
|
|
|
try { |
|
|
|
try { |
|
|
|
_$result = _$v ?? |
|
|
|
_$result = _$v ?? |
|
|
@ -537,13 +534,13 @@ class SchemaBuilder implements Builder<Schema, SchemaBuilder> { |
|
|
|
anyOf: _anyOf?.build(), |
|
|
|
anyOf: _anyOf?.build(), |
|
|
|
allOf: _allOf?.build(), |
|
|
|
allOf: _allOf?.build(), |
|
|
|
description: description, |
|
|
|
description: description, |
|
|
|
deprecated: deprecated, |
|
|
|
deprecated: BuiltValueNullFieldError.checkNotNull(deprecated, r'Schema', 'deprecated'), |
|
|
|
type: type, |
|
|
|
type: type, |
|
|
|
format: format, |
|
|
|
format: format, |
|
|
|
$default: $default, |
|
|
|
$default: $default, |
|
|
|
$enum: _$enum?.build(), |
|
|
|
$enum: _$enum?.build(), |
|
|
|
properties: _properties?.build(), |
|
|
|
properties: _properties?.build(), |
|
|
|
required: _required?.build(), |
|
|
|
required: required.build(), |
|
|
|
items: _items?.build(), |
|
|
|
items: _items?.build(), |
|
|
|
additionalProperties: _additionalProperties?.build(), |
|
|
|
additionalProperties: _additionalProperties?.build(), |
|
|
|
contentMediaType: contentMediaType, |
|
|
|
contentMediaType: contentMediaType, |
|
|
@ -568,7 +565,7 @@ class SchemaBuilder implements Builder<Schema, SchemaBuilder> { |
|
|
|
_$failedField = 'properties'; |
|
|
|
_$failedField = 'properties'; |
|
|
|
_properties?.build(); |
|
|
|
_properties?.build(); |
|
|
|
_$failedField = 'required'; |
|
|
|
_$failedField = 'required'; |
|
|
|
_required?.build(); |
|
|
|
required.build(); |
|
|
|
_$failedField = 'items'; |
|
|
|
_$failedField = 'items'; |
|
|
|
_items?.build(); |
|
|
|
_items?.build(); |
|
|
|
_$failedField = 'additionalProperties'; |
|
|
|
_$failedField = 'additionalProperties'; |
|
|
|