0
我正在定义一个资源,您使用非JSON主体进行POST。它只是一个像表单参数那样的字符串。类似于OAuth发生的情况: grant_type = & code = & redirect_uri =Swagger POST与非json主体
如何在Swagger上记录该文件?我必须使用formParam格式而不是正文吗?我将它放入正文中的所有内容都转换为JSON示例。
TokenRequest:
properties:
grant_type:
type: string
description: OAuth Grant Type
enum:
- authorization_code
- refresh
code:
type: string
description: Authorization Code obtained from /authorize required if grant_type = au
redirect_uri:
type: string
description: Defined Redirect URI Example - https://example.com/callback
refresh_token:
type: string
description: Required if grant_type = refresh
是的,我也试过这种方式,它的工作原理。只是表现不同(我不太喜欢它)。但我会处理它。谢谢! – SuperGeek133