[PR #1853] [MERGED] feat(server): improve API specification #9245

Closed
opened 2026-02-05 14:01:12 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/1853
Author: @michelheusschen
Created: 2/24/2023
Status: Merged
Merged: 2/24/2023
Merged by: @alextran1502

Base: mainHead: feat/server-api-spec


📝 Commits (1)

  • 6c34084 feat(server): improve API specification

📊 Changes

41 files changed (+1691 additions, -397 deletions)

View changed files

📝 mobile/openapi/README.md (+16 -0)
📝 mobile/openapi/doc/APIKeyApi.md (+55 -5)
📝 mobile/openapi/doc/AlbumApi.md (+74 -20)
📝 mobile/openapi/doc/AssetApi.md (+165 -53)
📝 mobile/openapi/doc/AuthenticationApi.md (+21 -3)
📝 mobile/openapi/doc/DeviceInfoApi.md (+5 -1)
📝 mobile/openapi/doc/JobApi.md (+10 -2)
📝 mobile/openapi/doc/OAuthApi.md (+22 -2)
📝 mobile/openapi/doc/ServerInfoApi.md (+11 -1)
📝 mobile/openapi/doc/ShareApi.md (+62 -8)
📝 mobile/openapi/doc/SystemConfigApi.md (+20 -4)
📝 mobile/openapi/doc/TagApi.md (+55 -5)
📝 mobile/openapi/doc/UserApi.md (+35 -7)
📝 mobile/openapi/lib/api/album_api.dart (+33 -10)
📝 mobile/openapi/lib/api/asset_api.dart (+112 -35)
📝 mobile/openapi/lib/api/share_api.dart (+15 -3)
📝 mobile/openapi/test/album_api_test.dart (+3 -3)
📝 mobile/openapi/test/asset_api_test.dart (+10 -10)
📝 mobile/openapi/test/share_api_test.dart (+1 -1)
📝 server/apps/immich/src/api-v1/album/album.controller.ts (+3 -3)

...and 21 more files

📄 Description

Changed the Authenticated decorator to include the key URL query string. Also added cookie as an authentication method and included both Bearer and cookie auth in the decorator, so @Authenticated doesn't need additional decorators.

Also modified endpoints that return files to have the correct return type. The { type: 'string', format: 'binary' } format used comes from the OpenAPI 3 spec for file uploads.

As a result of these changes had to make minor adjustments to API calls from the web.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/1853 **Author:** [@michelheusschen](https://github.com/michelheusschen) **Created:** 2/24/2023 **Status:** ✅ Merged **Merged:** 2/24/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `feat/server-api-spec` --- ### 📝 Commits (1) - [`6c34084`](https://github.com/immich-app/immich/commit/6c34084c08c947401cd9b3f2df7d797d8a8ea4e3) feat(server): improve API specification ### 📊 Changes **41 files changed** (+1691 additions, -397 deletions) <details> <summary>View changed files</summary> 📝 `mobile/openapi/README.md` (+16 -0) 📝 `mobile/openapi/doc/APIKeyApi.md` (+55 -5) 📝 `mobile/openapi/doc/AlbumApi.md` (+74 -20) 📝 `mobile/openapi/doc/AssetApi.md` (+165 -53) 📝 `mobile/openapi/doc/AuthenticationApi.md` (+21 -3) 📝 `mobile/openapi/doc/DeviceInfoApi.md` (+5 -1) 📝 `mobile/openapi/doc/JobApi.md` (+10 -2) 📝 `mobile/openapi/doc/OAuthApi.md` (+22 -2) 📝 `mobile/openapi/doc/ServerInfoApi.md` (+11 -1) 📝 `mobile/openapi/doc/ShareApi.md` (+62 -8) 📝 `mobile/openapi/doc/SystemConfigApi.md` (+20 -4) 📝 `mobile/openapi/doc/TagApi.md` (+55 -5) 📝 `mobile/openapi/doc/UserApi.md` (+35 -7) 📝 `mobile/openapi/lib/api/album_api.dart` (+33 -10) 📝 `mobile/openapi/lib/api/asset_api.dart` (+112 -35) 📝 `mobile/openapi/lib/api/share_api.dart` (+15 -3) 📝 `mobile/openapi/test/album_api_test.dart` (+3 -3) 📝 `mobile/openapi/test/asset_api_test.dart` (+10 -10) 📝 `mobile/openapi/test/share_api_test.dart` (+1 -1) 📝 `server/apps/immich/src/api-v1/album/album.controller.ts` (+3 -3) _...and 21 more files_ </details> ### 📄 Description Changed the `Authenticated` decorator to include the `key` URL query string. Also added `cookie` as an authentication method and included both Bearer and cookie auth in the decorator, so `@Authenticated` doesn't need additional decorators. Also modified endpoints that return files to have the correct return type. The `{ type: 'string', format: 'binary' }` format used comes from the OpenAPI 3 [spec for file uploads](https://spec.openapis.org/oas/v3.0.3#considerations-for-file-uploads). As a result of these changes had to make minor adjustments to API calls from the web. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:01:12 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#9245