这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@kemingy
Copy link
Member

@kemingy kemingy commented Aug 30, 2025

Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
@kemingy kemingy requested a review from Copilot August 30, 2025 07:26
Copy link

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

This PR reverts changes to use errors() instead of json() method calls for validation error handling across multiple framework plugins, addressing issue #441. The change standardizes error response formatting by switching from JSON serialization to direct error object access.

  • Replaces err.json() calls with err.errors() across all framework plugins
  • Removes unnecessary mypy assertions in Flask and Quart plugins
  • Updates build environment to specify Python 3.9

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
spectree/plugins/starlette_plugin.py Changes validation error response from json() to errors() method
spectree/plugins/quart_plugin.py Updates error handling to use errors() and removes mypy assertion
spectree/plugins/flask_plugin.py Switches to errors() method and removes mypy assertion
spectree/plugins/falcon_plugin.py Updates both sync and async validation methods to use errors()
build.envd Specifies Python 3.9 version for uv installation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
@kemingy kemingy merged commit 266779a into 0b01001001:main Aug 30, 2025
9 checks passed
@kemingy kemingy deleted the throw_errors branch August 30, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: validation error should be serialized by the framework json handler

1 participant