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_create.g.dart';
|
||||
|
||||
|
||||
@CopyWith()
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: false,
|
||||
explicitToJson: true,
|
||||
)
|
||||
class RuleCreate {
|
||||
/// Returns a new [RuleCreate] instance.
|
||||
RuleCreate({
|
||||
|
||||
this.enabled = true,
|
||||
|
||||
required this.kind,
|
||||
|
||||
required this.matchType,
|
||||
|
||||
this.note,
|
||||
|
||||
required this.pattern,
|
||||
|
||||
this.priority = 100,
|
||||
|
||||
this.value,
|
||||
});
|
||||
|
||||
@JsonKey(
|
||||
defaultValue: true,
|
||||
name: r'enabled',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final bool? enabled;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'kind',
|
||||
required: true,
|
||||
includeIfNull: false,
|
||||
unknownEnumValue: RuleKind.unknownDefaultOpenApi,
|
||||
)
|
||||
|
||||
|
||||
final RuleKind kind;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'match_type',
|
||||
required: true,
|
||||
includeIfNull: false,
|
||||
unknownEnumValue: RuleMatchType.unknownDefaultOpenApi,
|
||||
)
|
||||
|
||||
|
||||
final RuleMatchType matchType;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'note',
|
||||
required: false,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final String? note;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'pattern',
|
||||
required: true,
|
||||
includeIfNull: false,
|
||||
)
|
||||
|
||||
|
||||
final String pattern;
|
||||
|
||||
|
||||
|
||||
@JsonKey(
|
||||
defaultValue: 100,
|
||||
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 RuleCreate &&
|
||||
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.hashCode +
|
||||
kind.hashCode +
|
||||
matchType.hashCode +
|
||||
(note == null ? 0 : note.hashCode) +
|
||||
pattern.hashCode +
|
||||
priority.hashCode +
|
||||
(value == null ? 0 : value.hashCode);
|
||||
|
||||
factory RuleCreate.fromJson(Map<String, dynamic> json) => _$RuleCreateFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$RuleCreateToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user