今天,我尝试在Swagger中创建API文档。我直接尝试过openapi 3.0。我不知何故无法获得我的请求正文的描述。
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
name:
description: The username of the user to be registered.
type: string
email:
description: The E-Mail address of the user to be registered.
type: string
password:
description: The password of the user to be registered.
type: string
required:
- name
- email
- password
但是描述不会显示:
我想获得Swagger 2正在生成的内容。下面是将相同代码转换为Swagger 2的方式