You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/api/controllers/console
QuantumGhost 2c1ab4879f
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)

This PR addresses serialization issues in the VariablePool model by separating the `value_type` tags for `IntegerSegment`/`FloatSegment` and `IntegerVariable`/`FloatVariable`. Previously, both Integer and Float types shared the same `SegmentType.NUMBER` tag, causing conflicts during serialization.

Key changes:
- Introduce distinct `value_type` tags for Integer and Float segments/variables
- Add `VariableUnion` and `SegmentUnion` types for proper type discrimination
- Leverage Pydantic's discriminated union feature for seamless serialization/deserialization
- Enable accurate serialization of data structures containing these types

Closes #22024.
7 months ago
..
app refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
auth fix: handle configure button for notion internal integration (#21412) 7 months ago
billing chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
datasets add dataset info in response (#21413) 8 months ago
explore fix: Before publish the app, preview the voice of tts, it raise an er… (#21821) 7 months ago
tag chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
workspace feat: add MCP support (#20716) 7 months ago
__init__.py feat: add MCP support (#20716) 7 months ago
admin.py critical! insert_explore_app_list_api (#21277) 8 months ago
apikey.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
error.py E-300 (#19726) 9 months ago
extension.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
feature.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
files.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
init_validate.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
ping.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
remote_files.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
setup.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
version.py refactor: define the Dify project version in pyproject.toml (#20910) 7 months ago
wraps.py Feat/webapp verified sso main (#20494) 8 months ago