apache / apache/servicecomb-java-chassis

@RequestBody 请求体为null,不能拦截,会将空对象传导到controller

Open
#3,399 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
814
Avg merge
8d 23h
Merged PRs (30d)
1

Description

接口已经定义body体不能为空,但body请求体 什么也不传,参数校验拦截不了。
parameters:
- in: "body"
name: "xxx "
required: true
servicecomb版本 2.7.4
期待报4XX错误 。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported behavior on ServiceComb Java Chassis 2.7.4 with an endpoint whose @RequestBody is required but receives no body. Trace why validation does not intercept the null request and verify that the completed behavior returns a 4XX response instead of passing an empty object to the controller.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.