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