apache / apache/servicecomb-java-chassis

[QUESTION] - CSE 3.X不支持multipart/form-data类型的RequestMapping了吗

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

Description

###

非RestController的类,仅配置了RequestMapping,参数类型为@RequestPart @Parameter Part part,会走到PojoSwaggerGenerator

###

Caused by: java.lang.IllegalArgumentException: Consumes not provided for BODY parameter, or is empty by annotations rule.
at org.apache.servicecomb.swagger.generator.ParameterGenerator.generate(ParameterGenerator.java:133)
at org.apache.servicecomb.swagger.generator.core.AbstractOperationGenerator.scanMethodParameters(AbstractOperationGenerator.java:193)
at org.apache.servicecomb.swagger.generator.core.AbstractOperationGenerator.generate(AbstractOperationGenerator.java:147)
at org.apache.servicecomb.swagger.generator.core.AbstractSwaggerGenerator.scanMethods(AbstractSwaggerGenerator.java:236)

###

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at org.apache.servicecomb.swagger.generator.ParameterGenerator.java:133 and trace how AbstractOperationGenerator.scanMethodParameters handles a non-RestController RequestMapping with @RequestPart Part. Reproduce the multipart/form-data case and determine whether the missing consumes value is expected; done means confirming the supported behavior or identifying the precise generator change needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
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.