1
0
mirror of https://github.com/immich-app/immich.git synced 2025-04-27 13:42:33 +02:00

chore(server): openapi generation (#9554)

This commit is contained in:
Alex 2024-05-17 09:58:55 -05:00 committed by GitHub
parent c8aa6a62c2
commit df42352f84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 0 additions and 120 deletions

View File

@ -98,7 +98,6 @@ Class | Method | HTTP request | Description
*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset | *AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset |
*AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset | *AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset |
*AssetApi* | [**getAllUserAssetsByDeviceId**](doc//AssetApi.md#getalluserassetsbydeviceid) | **GET** /asset/device/{deviceId} | *AssetApi* | [**getAllUserAssetsByDeviceId**](doc//AssetApi.md#getalluserassetsbydeviceid) | **GET** /asset/device/{deviceId} |
*AssetApi* | [**getAssetDuplicates**](doc//AssetApi.md#getassetduplicates) | **GET** /asset/duplicates |
*AssetApi* | [**getAssetInfo**](doc//AssetApi.md#getassetinfo) | **GET** /asset/{id} | *AssetApi* | [**getAssetInfo**](doc//AssetApi.md#getassetinfo) | **GET** /asset/{id} |
*AssetApi* | [**getAssetStatistics**](doc//AssetApi.md#getassetstatistics) | **GET** /asset/statistics | *AssetApi* | [**getAssetStatistics**](doc//AssetApi.md#getassetstatistics) | **GET** /asset/statistics |
*AssetApi* | [**getAssetThumbnail**](doc//AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} | *AssetApi* | [**getAssetThumbnail**](doc//AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |

View File

@ -14,7 +14,6 @@ Method | HTTP request | Description
[**deleteAssets**](AssetApi.md#deleteassets) | **DELETE** /asset | [**deleteAssets**](AssetApi.md#deleteassets) | **DELETE** /asset |
[**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset | [**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset |
[**getAllUserAssetsByDeviceId**](AssetApi.md#getalluserassetsbydeviceid) | **GET** /asset/device/{deviceId} | [**getAllUserAssetsByDeviceId**](AssetApi.md#getalluserassetsbydeviceid) | **GET** /asset/device/{deviceId} |
[**getAssetDuplicates**](AssetApi.md#getassetduplicates) | **GET** /asset/duplicates |
[**getAssetInfo**](AssetApi.md#getassetinfo) | **GET** /asset/{id} | [**getAssetInfo**](AssetApi.md#getassetinfo) | **GET** /asset/{id} |
[**getAssetStatistics**](AssetApi.md#getassetstatistics) | **GET** /asset/statistics | [**getAssetStatistics**](AssetApi.md#getassetstatistics) | **GET** /asset/statistics |
[**getAssetThumbnail**](AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} | [**getAssetThumbnail**](AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
@ -325,43 +324,6 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAssetDuplicates**
> List<AssetResponseDto> getAssetDuplicates()
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = AssetApi();
try {
final result = api_instance.getAssetDuplicates();
print(result);
} catch (e) {
print('Exception when calling AssetApi->getAssetDuplicates: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<AssetResponseDto>**](AssetResponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAssetInfo** # **getAssetInfo**
> AssetResponseDto getAssetInfo(id, key) > AssetResponseDto getAssetInfo(id, key)

View File

@ -326,50 +326,6 @@ class AssetApi {
return null; return null;
} }
/// Performs an HTTP 'GET /asset/duplicates' operation and returns the [Response].
Future<Response> getAssetDuplicatesWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/asset/duplicates';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<List<AssetResponseDto>?> getAssetDuplicates() async {
final response = await getAssetDuplicatesWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<AssetResponseDto>') as List)
.cast<AssetResponseDto>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'GET /asset/{id}' operation and returns the [Response]. /// Performs an HTTP 'GET /asset/{id}' operation and returns the [Response].
/// Parameters: /// Parameters:
/// ///

View File

@ -50,11 +50,6 @@ void main() {
// TODO // TODO
}); });
//Future<List<AssetResponseDto>> getAssetDuplicates() async
test('test getAssetDuplicates', () async {
// TODO
});
//Future<AssetResponseDto> getAssetInfo(String id, { String key }) async //Future<AssetResponseDto> getAssetInfo(String id, { String key }) async
test('test getAssetInfo', () async { test('test getAssetInfo', () async {
// TODO // TODO

View File

@ -1194,30 +1194,6 @@
] ]
} }
}, },
"/asset/duplicates": {
"get": {
"operationId": "getAssetDuplicates",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/AssetResponseDto"
},
"type": "array"
}
}
},
"description": ""
}
},
"tags": [
"Asset"
]
}
},
"/asset/exist": { "/asset/exist": {
"post": { "post": {
"description": "Checks if multiple assets exist on the server and returns all existing - used by background backup", "description": "Checks if multiple assets exist on the server and returns all existing - used by background backup",

View File

@ -1407,14 +1407,6 @@ export function getAllUserAssetsByDeviceId({ deviceId }: {
...opts ...opts
})); }));
} }
export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetResponseDto[];
}>("/asset/duplicates", {
...opts
}));
}
/** /**
* Checks if multiple assets exist on the server and returns all existing - used by background backup * Checks if multiple assets exist on the server and returns all existing - used by background backup
*/ */