Skip to content

chore: revert #30453 FastOpenAPI#36957

Open
cqjjjzr wants to merge 3 commits into
langgenius:mainfrom
cqjjjzr:codex/remove-fastopenapi
Open

chore: revert #30453 FastOpenAPI#36957
cqjjjzr wants to merge 3 commits into
langgenius:mainfrom
cqjjjzr:codex/remove-fastopenapi

Conversation

@cqjjjzr
Copy link
Copy Markdown
Contributor

@cqjjjzr cqjjjzr commented Jun 2, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Part of #30269 . FastOpenAPI is no longer on the upgrade path. For now, we are reverting them back to Flask-RESTX. Later we may upgrade them to v2 FastAPI with Frontend change.

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 && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@cqjjjzr cqjjjzr requested a review from a team June 2, 2026 14:47
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. refactor labels Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-06-03 05:12:17.662141877 +0000
+++ /tmp/pyrefly_pr.txt	2026-06-03 05:12:03.564051984 +0000
@@ -2,18 +2,6 @@
   --> controllers/console/app/app.py:69:113
 ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
   --> controllers/console/auth/email_register.py:86:108
-ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
-  --> controllers/console/init_validate.py:31:2
-ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
-  --> controllers/console/init_validate.py:44:2
-ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
-  --> controllers/console/ping.py:10:2
-ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
-  --> controllers/console/setup.py:40:2
-ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
-  --> controllers/console/setup.py:65:2
-ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
-  --> controllers/console/version.py:30:2
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override-mutable-attribute]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
@@ -2068,14 +2056,6 @@
    --> tests/unit_tests/controllers/console/explore/test_wraps.py:181:18
 ERROR Argument `Literal['app-id']` is not assignable to parameter `view` with type `(App) -> Unknown` in function `controllers.console.explore.wraps.decorator` [bad-argument-type]
    --> tests/unit_tests/controllers/console/explore/test_wraps.py:204:23
-ERROR Argument `Flask` is not assignable to parameter `app` with type `DifyApp` in function `extensions.ext_fastopenapi.init_app` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/test_fastopenapi_ping.py:21:30
-ERROR Argument `Flask` is not assignable to parameter `app` with type `DifyApp` in function `extensions.ext_fastopenapi.init_app` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/test_fastopenapi_setup.py:22:30
-ERROR Argument `Flask` is not assignable to parameter `app` with type `DifyApp` in function `extensions.ext_fastopenapi.init_app` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/test_fastopenapi_setup.py:36:30
-ERROR Argument `Flask` is not assignable to parameter `app` with type `DifyApp` in function `extensions.ext_fastopenapi.init_app` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/test_fastopenapi_version.py:23:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form._jsonify_form_definition` [bad-argument-type]
   --> tests/unit_tests/controllers/console/test_human_input_form.py:37:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form.ConsoleHumanInputFormApi._ensure_console_access` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 46.05% 46.04% -0.01%
Strict coverage 45.55% 45.54% -0.01%
Typed symbols 25,023 25,013 -10
Untyped symbols 29,635 29,638 +3
Modules 2790 2787 -3

@autofix-ci autofix-ci Bot requested a review from crazywoola as a code owner June 2, 2026 14:50
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jun 2, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label Jun 2, 2026
@cqjjjzr cqjjjzr force-pushed the codex/remove-fastopenapi branch from 61e55df to 23b3c31 Compare June 2, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor size:XXL This PR changes 1000+ lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants