|
|
@ -24,7 +24,8 @@ Schema _$SchemaFromJson(Map<String, dynamic> json) { |
|
|
|
'required', |
|
|
|
'required', |
|
|
|
'items', |
|
|
|
'items', |
|
|
|
'additionalProperties', |
|
|
|
'additionalProperties', |
|
|
|
'content' |
|
|
|
'contentMediaType', |
|
|
|
|
|
|
|
'contentSchema' |
|
|
|
], |
|
|
|
], |
|
|
|
); |
|
|
|
); |
|
|
|
return Schema( |
|
|
|
return Schema( |
|
|
@ -44,9 +45,9 @@ Schema _$SchemaFromJson(Map<String, dynamic> json) { |
|
|
|
required: (json['required'] as List<dynamic>?)?.map((e) => e as String).toList(), |
|
|
|
required: (json['required'] as List<dynamic>?)?.map((e) => e as String).toList(), |
|
|
|
items: json['items'] == null ? null : Schema.fromJson(json['items'] as Map<String, dynamic>), |
|
|
|
items: json['items'] == null ? null : Schema.fromJson(json['items'] as Map<String, dynamic>), |
|
|
|
additionalProperties: json['additionalProperties'] as bool?, |
|
|
|
additionalProperties: json['additionalProperties'] as bool?, |
|
|
|
content: (json['content'] as Map<String, dynamic>?)?.map( |
|
|
|
contentMediaType: json['contentMediaType'] as String?, |
|
|
|
(k, e) => MapEntry(k, MediaType.fromJson(e as Map<String, dynamic>)), |
|
|
|
contentSchema: |
|
|
|
), |
|
|
|
json['contentSchema'] == null ? null : Schema.fromJson(json['contentSchema'] as Map<String, dynamic>), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -73,6 +74,7 @@ Map<String, dynamic> _$SchemaToJson(Schema instance) { |
|
|
|
writeNotNull('required', instance.required); |
|
|
|
writeNotNull('required', instance.required); |
|
|
|
writeNotNull('items', instance.items?.toJson()); |
|
|
|
writeNotNull('items', instance.items?.toJson()); |
|
|
|
writeNotNull('additionalProperties', instance.additionalProperties); |
|
|
|
writeNotNull('additionalProperties', instance.additionalProperties); |
|
|
|
writeNotNull('content', instance.content?.map((k, e) => MapEntry(k, e.toJson()))); |
|
|
|
writeNotNull('contentMediaType', instance.contentMediaType); |
|
|
|
|
|
|
|
writeNotNull('contentSchema', instance.contentSchema?.toJson()); |
|
|
|
return val; |
|
|
|
return val; |
|
|
|
} |
|
|
|
} |
|
|
|