Follow-up to #412, which introduced application/x-www-form-urlencoded destructure support in 2026.2.
When using body-style: destructure for a application/x-www-form-urlencoded requestBody, the generated @PostMapping does not include consumes = {"application/x-www-form-urlencoded"}. Spring therefore does not enforce the content-type restriction and silently accepts requests with any content-type (e.g. application/json) instead of returning 415.
multipart/form-data endpoints correctly generate consumes. application/json requestBodies correctly generate consumes. Only application/x-www-form-urlencoded is missing it.
Expected:
@PostMapping(path = "/token", consumes = {"application/x-www-form-urlencoded"}, produces = {"application/json"})
Actual:
@PostMapping(path = "/token", produces = {"application/json"})
Version: openapi-processor-spring:2026.3.1
Follow-up to #412, which introduced
application/x-www-form-urlencodeddestructure support in 2026.2.When using body-style: destructure for a
application/x-www-form-urlencodedrequestBody, the generated@PostMappingdoes not includeconsumes = {"application/x-www-form-urlencoded"}. Spring therefore does not enforce the content-type restriction and silently accepts requests with any content-type (e.g.application/json) instead of returning415.multipart/form-dataendpoints correctly generate consumes.application/jsonrequestBodies correctly generate consumes. Onlyapplication/x-www-form-urlencodedis missing it.Expected:
Actual:
Version: openapi-processor-spring:2026.3.1