Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): move a few API doc comments to descriptions #15381

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mobile/openapi/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions mobile/openapi/lib/api/assets_api.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions open-api/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,7 @@
},
"/assets/bulk-upload-check": {
"post": {
"description": "Checks if assets exist by checksums",
"operationId": "checkBulkUpload",
"parameters": [],
"requestBody": {
Expand Down Expand Up @@ -1459,14 +1460,15 @@
"api_key": []
}
],
"summary": "Checks if assets exist by checksums",
"summary": "checkBulkUpload",
"tags": [
"Assets"
]
}
},
"/assets/device/{deviceId}": {
"get": {
"description": "Get all asset of a device that are in the database, ID only.",
"operationId": "getAllUserAssetsByDeviceId",
"parameters": [
{
Expand Down Expand Up @@ -1504,14 +1506,15 @@
"api_key": []
}
],
"summary": "Get all asset of a device that are in the database, ID only.",
"summary": "getAllUserAssetsByDeviceId",
"tags": [
"Assets"
]
}
},
"/assets/exist": {
"post": {
"description": "Checks if multiple assets exist on the server and returns all existing - used by background backup",
"operationId": "checkExistingAssets",
"parameters": [],
"requestBody": {
Expand Down Expand Up @@ -1547,7 +1550,7 @@
"api_key": []
}
],
"summary": "Checks if multiple assets exist on the server and returns all existing - used by background backup",
"summary": "checkExistingAssets",
"tags": [
"Assets"
]
Expand Down Expand Up @@ -1903,6 +1906,7 @@
]
},
"put": {
"description": "Replace the asset with new file, without changing its id",
"operationId": "replaceAsset",
"parameters": [
{
Expand Down Expand Up @@ -1956,7 +1960,7 @@
"api_key": []
}
],
"summary": "Replace the asset with new file, without changing its id",
"summary": "replaceAsset",
"tags": [
"Assets"
],
Expand Down
8 changes: 4 additions & 4 deletions open-api/typescript-sdk/src/fetch-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ export function updateAssets({ assetBulkUpdateDto }: {
})));
}
/**
* Checks if assets exist by checksums
* checkBulkUpload
*/
export function checkBulkUpload({ assetBulkUploadCheckDto }: {
assetBulkUploadCheckDto: AssetBulkUploadCheckDto;
Expand All @@ -1718,7 +1718,7 @@ export function checkBulkUpload({ assetBulkUploadCheckDto }: {
})));
}
/**
* Get all asset of a device that are in the database, ID only.
* getAllUserAssetsByDeviceId
*/
export function getAllUserAssetsByDeviceId({ deviceId }: {
deviceId: string;
Expand All @@ -1731,7 +1731,7 @@ export function getAllUserAssetsByDeviceId({ deviceId }: {
}));
}
/**
* Checks if multiple assets exist on the server and returns all existing - used by background backup
* checkExistingAssets
*/
export function checkExistingAssets({ checkExistingAssetsDto }: {
checkExistingAssetsDto: CheckExistingAssetsDto;
Expand Down Expand Up @@ -1839,7 +1839,7 @@ export function downloadAsset({ id, key }: {
}));
}
/**
* Replace the asset with new file, without changing its id
* replaceAsset
*/
export function replaceAsset({ id, key, assetMediaReplaceDto }: {
id: string;
Expand Down
14 changes: 13 additions & 1 deletion server/src/controllers/asset-media.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
UploadedFiles,
UseInterceptors,
} from '@nestjs/common';
import { ApiBody, ApiConsumes, ApiHeader, ApiTags } from '@nestjs/swagger';
import { ApiBody, ApiConsumes, ApiHeader, ApiOperation, ApiTags } from '@nestjs/swagger';
import { NextFunction, Response } from 'express';
import { EndpointLifecycle } from 'src/decorators';
import {
Expand Down Expand Up @@ -95,6 +95,10 @@ export class AssetMediaController {
@UseInterceptors(FileUploadInterceptor)
@ApiConsumes('multipart/form-data')
@EndpointLifecycle({ addedAt: 'v1.106.0' })
@ApiOperation({
summary: 'replaceAsset',
description: 'Replace the asset with new file, without changing its id',
})
@Authenticated({ sharedLink: true })
async replaceAsset(
@Auth() auth: AuthDto,
Expand Down Expand Up @@ -142,6 +146,10 @@ export class AssetMediaController {
*/
@Post('exist')
@HttpCode(HttpStatus.OK)
@ApiOperation({
summary: 'checkExistingAssets',
description: 'Checks if multiple assets exist on the server and returns all existing - used by background backup',
})
@Authenticated()
checkExistingAssets(
@Auth() auth: AuthDto,
Expand All @@ -155,6 +163,10 @@ export class AssetMediaController {
*/
@Post('bulk-upload-check')
@HttpCode(HttpStatus.OK)
@ApiOperation({
summary: 'checkBulkUpload',
description: 'Checks if assets exist by checksums',
})
@Authenticated()
checkBulkUpload(
@Auth() auth: AuthDto,
Expand Down
6 changes: 5 additions & 1 deletion server/src/controllers/asset.controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { EndpointLifecycle } from 'src/decorators';
import { AssetResponseDto, MemoryLaneResponseDto } from 'src/dtos/asset-response.dto';
import {
Expand Down Expand Up @@ -41,6 +41,10 @@ export class AssetController {
* Get all asset of a device that are in the database, ID only.
*/
@Get('/device/:deviceId')
@ApiOperation({
summary: 'getAllUserAssetsByDeviceId',
description: 'Get all asset of a device that are in the database, ID only.',
})
@Authenticated()
getAllUserAssetsByDeviceId(@Auth() auth: AuthDto, @Param() { deviceId }: DeviceIdDto) {
return this.service.getUserAssetsByDeviceId(auth, deviceId);
Expand Down
Loading