请问怎么修改 application/json 为 Content-type: application/x-www-form-urlencoded
没看懂 form-urlencoded 不就是一般的 HTTP 表单提交么,用 postman 之类很容易模拟吧,你要是调网络库不也是看 API 写的事么?
form-urlencoded
这是一个 swagger 文档的问题,还是通信的问题?
swagger 的问题,就是非 get 得请求 content-type 是 application/json, 想改成 application/x-www-form-urlencoded
?那把 yml 里中的媒体类型改掉不就是了
嗯!用 postman 是好使的!但是 swagger 都生成文档了,想问问怎么修改,老版本的没有这个问题,改了新版本就有这个问题了,上面的图是 swagger 的官方文档里的,但是不知道怎么在修改
给个例子?
这个不知道了,没用过 Swagger
是 swagger2 吧?按 文档,就是改“consumes”呀 ...
You can use the consumes and produces keywords to specify the MIME types understood by your API.
或者说你还有别的意思?
嗯嗯!谢谢