// GENERATED CODE - DO NOT MODIFY BY HAND part of 'operation.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** Operation _$OperationFromJson(Map json) { $checkKeys( json, allowedKeys: const ['operationId', 'tags', 'parameters', 'requestBody', 'responses'], ); return Operation( operationId: json['operationId'] as String?, tags: (json['tags'] as List?)?.map((e) => e as String).toList(), parameters: (json['parameters'] as List?)?.map((e) => Parameter.fromJson(e as Map)).toList(), requestBody: json['requestBody'] == null ? null : RequestBody.fromJson(json['requestBody'] as Map), responses: (json['responses'] as Map?)?.map( (k, e) => MapEntry(k, Response.fromJson(e as Map)), ), ); } Map _$OperationToJson(Operation instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('operationId', instance.operationId); writeNotNull('tags', instance.tags); writeNotNull('parameters', instance.parameters?.map((e) => e.toJson()).toList()); writeNotNull('requestBody', instance.requestBody?.toJson()); writeNotNull('responses', instance.responses?.map((k, e) => MapEntry(k, e.toJson()))); return val; }