chore(app): сгенерированный Dart-клиент из OpenAPI
openapi-generator-cli -g dart-dio. Генерируется, но коммитится: CI ловит дрейф openapi/openapi.json, а приложение собирается без запуска генератора. Пересобирается через just gen-client после любого изменения роутов.
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:fintracker_api/src/model/rule_match_type.dart';
|
||||
import 'package:fintracker_api/src/model/rule_kind.dart';
|
||||
import 'package:copy_with_extension/copy_with_extension.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'rule_patch.g.dart';
|
||||
|
||||
|
||||
@CopyWith()
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: false,
|
||||
explicitToJson: true,
|
||||
)
|
||||
class RulePatch {
|
||||
/// Returns a new [RulePatch] instance.
|
||||
RulePatch({
|
||||
|
||||
this.enabled,
|
||||
|
||||
this.kind,
|
||||
|
||||
this.matchType,
|
||||
|
||||
this.note,
|
||||
|
||||
this.pattern,
|
||||
|
||||
this.priority,
|
||||
|
||||
this.value,
|
||||
});
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'enabled',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final bool? enabled;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'kind',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
unknownEnumValue: RuleKind.unknownDefaultOpenApi,
|
||||
)
|
||||
|
||||
|
||||
final RuleKind? kind;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'match_type',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
unknownEnumValue: RuleMatchType.unknownDefaultOpenApi,
|
||||
)
|
||||
|
||||
|
||||
final RuleMatchType? matchType;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'note',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final String? note;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'pattern',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final String? pattern;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'priority',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final int? priority;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'value',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final String? value;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RulePatch &&
|
||||
other.enabled == enabled &&
|
||||
other.kind == kind &&
|
||||
other.matchType == matchType &&
|
||||
other.note == note &&
|
||||
other.pattern == pattern &&
|
||||
other.priority == priority &&
|
||||
other.value == value;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(enabled == null ? 0 : enabled.hashCode) +
|
||||
(kind == null ? 0 : kind.hashCode) +
|
||||
(matchType == null ? 0 : matchType.hashCode) +
|
||||
(note == null ? 0 : note.hashCode) +
|
||||
(pattern == null ? 0 : pattern.hashCode) +
|
||||
(priority == null ? 0 : priority.hashCode) +
|
||||
(value == null ? 0 : value.hashCode);
|
||||
|
||||
factory RulePatch.fromJson(Map<String, dynamic> json) => _$RulePatchFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$RulePatchToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user