Skip to content

refactor(api): migrate console installed-app list response to BaseModel#35202

Merged
asukaminato0721 merged 2 commits intolanggenius:mainfrom
ai-hpc:refactor/migrate-console-installed-app-response-28015
Apr 14, 2026
Merged

refactor(api): migrate console installed-app list response to BaseModel#35202
asukaminato0721 merged 2 commits intolanggenius:mainfrom
ai-hpc:refactor/migrate-console-installed-app-response-28015

Conversation

@ai-hpc
Copy link
Copy Markdown
Contributor

@ai-hpc ai-hpc commented Apr 14, 2026

Part of #28015

Summary

Migrate console installed-app list response from Flask-RESTX @marshal_with to Pydantic BaseModel response schemas. Add explicit installed-app/app DTOs (including computed icon_url and timestamp normalization) and keep filtering/sorting behavior unchanged.

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@ai-hpc ai-hpc requested a review from QuantumGhost as a code owner April 14, 2026 17:46
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the console “installed apps list” endpoint response from Flask-RESTX @marshal_with field-based schemas to Pydantic BaseModel-based response schemas, keeping existing filtering/sorting logic while adding explicit DTOs (including icon_url computation and timestamp normalization).

Changes:

  • Introduces Pydantic response models for installed-app listing (InstalledAppInfoResponse, InstalledAppResponse, InstalledAppListResponse).
  • Replaces @marshal_with(...) with a Pydantic-validated + model_dump(mode="json") response and registers schemas for Swagger.
  • Adds icon_url as a computed field and normalizes last_used_at to an integer timestamp.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/controllers/console/explore/installed_app.py Outdated
auto-merge was automatically disabled April 14, 2026 18:20

Head branch was pushed to by a user without write access

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

@asukaminato0721 asukaminato0721 added this pull request to the merge queue Apr 14, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 14, 2026
Merged via the queue into langgenius:main with commit e527b7c Apr 14, 2026
28 checks passed
HanqingZ pushed a commit to HanqingZ/dify that referenced this pull request Apr 23, 2026
…el (langgenius#35202)

Co-authored-by: ai-hpc <ai-hpc@users.noreply.github.com>
asukaminato0721 pushed a commit to asukaminato0721/dify that referenced this pull request Apr 24, 2026
…el (langgenius#35202)

Co-authored-by: ai-hpc <ai-hpc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants