Phase A: generierter Dart-Client + DI-Foundation für Rust-Backend
OpenAPI-Generator-Setup: - tool/generate_api_client.sh: Direkter Aufruf der openapi-generator-cli.jar (Java-CLI statt Dart-build_runner-Integration — vermeidet die analyzer-/source_gen-Version-Hölle mit json_serializable) - tool/fetch_openapi_generator.sh: lädt die JAR (29 MB) nach (gitignored) - openapi/holzleitner.json: Snapshot der Backend-Spec für reproduzierbare Generation - packages/holzleitner_api/: generiertes Dart-Sub-Package (built_value + dio), per path-dep im Haupt-pubspec eingehängt Netzwerk-Layer (lib/data/network/): - BackendConfig: API- und Keycloak-Endpoints für Local-Dev (localhost wegen Keycloak-iss-Claim). - AuthTokenProvider-Schnittstelle. - DevPasswordGrantTokenProvider: Phase-A-Provider via Keycloak password-grant, Token-Caching mit Expiry-Check (Phase B ersetzt das durch flutter_appauth PKCE). - HolzleitnerAuthInterceptor: dynamischer Bearer-Inject pro Request. - HolzleitnerApiFactory: baut die generierte HolzleitnerApi-Klasse mit unserem Interceptor statt der vier Default-Auth-Interceptors. - network_locator.registerNetworking(): get_it-Setup, in main() vor runApp() aufgerufen. Clean-Arch-Scaffolding (lib/data/, lib/domain/): - Verzeichnisstruktur für Phase C+D angelegt (mapper/, repository/, entity/, repository/) — befüllt sich in den Folge-Phasen. Smoke-Test: - tool/smoke_test_api.dart ruft /health (ungeschützt) und /me/cars (mit Bearer) via generiertem Client — grün gegen lokales Backend.
This commit is contained in:
130
packages/holzleitner_api/lib/src/model/car.g.dart
Normal file
130
packages/holzleitner_api/lib/src/model/car.g.dart
Normal file
@ -0,0 +1,130 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'car.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$Car extends Car {
|
||||
@override
|
||||
final int accountId;
|
||||
@override
|
||||
final bool active;
|
||||
@override
|
||||
final String id;
|
||||
@override
|
||||
final String plate;
|
||||
|
||||
factory _$Car([void Function(CarBuilder)? updates]) =>
|
||||
(CarBuilder()..update(updates))._build();
|
||||
|
||||
_$Car._(
|
||||
{required this.accountId,
|
||||
required this.active,
|
||||
required this.id,
|
||||
required this.plate})
|
||||
: super._();
|
||||
@override
|
||||
Car rebuild(void Function(CarBuilder) updates) =>
|
||||
(toBuilder()..update(updates)).build();
|
||||
|
||||
@override
|
||||
CarBuilder toBuilder() => CarBuilder()..replace(this);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(other, this)) return true;
|
||||
return other is Car &&
|
||||
accountId == other.accountId &&
|
||||
active == other.active &&
|
||||
id == other.id &&
|
||||
plate == other.plate;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var _$hash = 0;
|
||||
_$hash = $jc(_$hash, accountId.hashCode);
|
||||
_$hash = $jc(_$hash, active.hashCode);
|
||||
_$hash = $jc(_$hash, id.hashCode);
|
||||
_$hash = $jc(_$hash, plate.hashCode);
|
||||
_$hash = $jf(_$hash);
|
||||
return _$hash;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (newBuiltValueToStringHelper(r'Car')
|
||||
..add('accountId', accountId)
|
||||
..add('active', active)
|
||||
..add('id', id)
|
||||
..add('plate', plate))
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class CarBuilder implements Builder<Car, CarBuilder> {
|
||||
_$Car? _$v;
|
||||
|
||||
int? _accountId;
|
||||
int? get accountId => _$this._accountId;
|
||||
set accountId(int? accountId) => _$this._accountId = accountId;
|
||||
|
||||
bool? _active;
|
||||
bool? get active => _$this._active;
|
||||
set active(bool? active) => _$this._active = active;
|
||||
|
||||
String? _id;
|
||||
String? get id => _$this._id;
|
||||
set id(String? id) => _$this._id = id;
|
||||
|
||||
String? _plate;
|
||||
String? get plate => _$this._plate;
|
||||
set plate(String? plate) => _$this._plate = plate;
|
||||
|
||||
CarBuilder() {
|
||||
Car._defaults(this);
|
||||
}
|
||||
|
||||
CarBuilder get _$this {
|
||||
final $v = _$v;
|
||||
if ($v != null) {
|
||||
_accountId = $v.accountId;
|
||||
_active = $v.active;
|
||||
_id = $v.id;
|
||||
_plate = $v.plate;
|
||||
_$v = null;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@override
|
||||
void replace(Car other) {
|
||||
_$v = other as _$Car;
|
||||
}
|
||||
|
||||
@override
|
||||
void update(void Function(CarBuilder)? updates) {
|
||||
if (updates != null) updates(this);
|
||||
}
|
||||
|
||||
@override
|
||||
Car build() => _build();
|
||||
|
||||
_$Car _build() {
|
||||
final _$result = _$v ??
|
||||
_$Car._(
|
||||
accountId: BuiltValueNullFieldError.checkNotNull(
|
||||
accountId, r'Car', 'accountId'),
|
||||
active:
|
||||
BuiltValueNullFieldError.checkNotNull(active, r'Car', 'active'),
|
||||
id: BuiltValueNullFieldError.checkNotNull(id, r'Car', 'id'),
|
||||
plate: BuiltValueNullFieldError.checkNotNull(plate, r'Car', 'plate'),
|
||||
);
|
||||
replace(_$result);
|
||||
return _$result;
|
||||
}
|
||||
}
|
||||
|
||||
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||
Reference in New Issue
Block a user