|
|
|
@ -9,10 +9,12 @@ part of 'operation.dart';
|
|
|
|
|
Operation _$OperationFromJson(Map<String, dynamic> json) { |
|
|
|
|
$checkKeys( |
|
|
|
|
json, |
|
|
|
|
allowedKeys: const ['operationId', 'tags', 'parameters', 'requestBody', 'responses'], |
|
|
|
|
allowedKeys: const ['operationId', 'summary', 'description', 'tags', 'parameters', 'requestBody', 'responses'], |
|
|
|
|
); |
|
|
|
|
return Operation( |
|
|
|
|
operationId: json['operationId'] as String?, |
|
|
|
|
summary: json['summary'] as String?, |
|
|
|
|
description: json['description'] as String?, |
|
|
|
|
tags: (json['tags'] as List<dynamic>?)?.map((e) => e as String).toList(), |
|
|
|
|
parameters: |
|
|
|
|
(json['parameters'] as List<dynamic>?)?.map((e) => Parameter.fromJson(e as Map<String, dynamic>)).toList(), |
|
|
|
@ -33,6 +35,8 @@ Map<String, dynamic> _$OperationToJson(Operation instance) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
writeNotNull('operationId', instance.operationId); |
|
|
|
|
writeNotNull('summary', instance.summary); |
|
|
|
|
writeNotNull('description', instance.description); |
|
|
|
|
writeNotNull('tags', instance.tags); |
|
|
|
|
writeNotNull('parameters', instance.parameters?.map((e) => e.toJson()).toList()); |
|
|
|
|
writeNotNull('requestBody', instance.requestBody?.toJson()); |
|
|
|
|