mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(server): update openapi (#2205)
This commit is contained in:
parent
91e27affeb
commit
983abf5e14
65 changed files with 756 additions and 1458 deletions
21
mobile/openapi/lib/api_client.dart
generated
21
mobile/openapi/lib/api_client.dart
generated
|
|
@ -11,11 +11,13 @@
|
|||
part of openapi.api;
|
||||
|
||||
class ApiClient {
|
||||
ApiClient({this.basePath = '/api', this.authentication});
|
||||
ApiClient({this.basePath = '/api', this.authentication,});
|
||||
|
||||
final String basePath;
|
||||
final Authentication? authentication;
|
||||
|
||||
var _client = Client();
|
||||
final _defaultHeaderMap = <String, String>{};
|
||||
|
||||
/// Returns the current HTTP [Client] instance to use in this class.
|
||||
///
|
||||
|
|
@ -27,15 +29,12 @@ class ApiClient {
|
|||
_client = newClient;
|
||||
}
|
||||
|
||||
final _defaultHeaderMap = <String, String>{};
|
||||
final Authentication? authentication;
|
||||
Map<String, String> get defaultHeaderMap => _defaultHeaderMap;
|
||||
|
||||
void addDefaultHeader(String key, String value) {
|
||||
_defaultHeaderMap[key] = value;
|
||||
}
|
||||
|
||||
Map<String,String> get defaultHeaderMap => _defaultHeaderMap;
|
||||
|
||||
// We don't use a Map<String, String> for queryParams.
|
||||
// If collectionFormat is 'multi', a key might appear multiple times.
|
||||
Future<Response> invokeAPI(
|
||||
|
|
@ -47,7 +46,7 @@ class ApiClient {
|
|||
Map<String, String> formParams,
|
||||
String? contentType,
|
||||
) async {
|
||||
_updateParamsForAuth(queryParams, headerParams);
|
||||
await authentication?.applyToParams(queryParams, headerParams);
|
||||
|
||||
headerParams.addAll(_defaultHeaderMap);
|
||||
if (contentType != null) {
|
||||
|
|
@ -165,16 +164,6 @@ class ApiClient {
|
|||
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.')
|
||||
String serialize(Object? value) => value == null ? '' : json.encode(value);
|
||||
|
||||
/// Update query and header parameters based on authentication settings.
|
||||
void _updateParamsForAuth(
|
||||
List<QueryParam> queryParams,
|
||||
Map<String, String> headerParams,
|
||||
) {
|
||||
if (authentication != null) {
|
||||
authentication!.applyToParams(queryParams, headerParams);
|
||||
}
|
||||
}
|
||||
|
||||
static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) {
|
||||
try {
|
||||
switch (targetType) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue