toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() => <String, dynamic>{
      'query_type': EnumToString.convertToString(type),
      'name': requestName,
      'id': id,
      'project_id': projectID,
      'authorization': authorization.toJson(),
      'request_type': EnumToString.convertToString(requestType),
      'url': baseUrl,
      'paths': paths.map((e) => e.toJson()).toList(),
      'headers': headers.map((e) => e.toJson()).toList(),
      'url_params': urlParams.map((e) => e.toJson()).toList(),
      'body': body.map((e) => e.toJson()).toList(),
      'return_entity': returnEntity.toJson(),
      'accepted_status_code_range': [
        acceptedStatusCodeRange.start.toInt(),
        acceptedStatusCodeRange.end.toInt()
      ],
      'error_message': errorMessage,
      'repository_id': repositoryID,
      'error_json_path': errorJsonPath,
    };