apache / apache/servicecomb-java-chassis
能否支持扩展consumes的报文类型,自定义请求体的序列化方式?
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
目前框架仅提供了ProduceProcessor的SPI扩展,自定义响应体的序列化方法,能否针对请求体也提供对应SPI扩展点?
有的时候业务接口的请求体是自定义的类型,并不是主流的application/json或application/xml格式,比如Content-Type: application/vnd.gsma.eap-relay.v1.0+json 这种,能否提供 ConsumeProcessor的扩展机制,能支持自定义格式的请求体序列化?

目前只能采用比较折中的方法,把controller 接口的入参定义为string来接收请求体,内部再做转换,很不优雅。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the existing ProduceProcessor SPI and the controller request-body path, including the proposed ConsumeProcessor extension point. Check how custom Content-Type values such as application/vnd.gsma.eap-relay.v1.0+json are currently handled. Done means a controller can receive a custom request type through an extension rather than accepting a String and converting it internally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100