【问题标题】:Swagger/OpenAPI 3.0 RequestBody Description not shownSwagger/OpenAPI 3.0 RequestBody 描述未显示
【发布时间】:2018-12-05 17:24:34
【问题描述】:

我正在 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

【问题讨论】:

    标签: api swagger documentation openapi


    【解决方案1】:

    issue 已在 Swagger UI 3.18.2 中修复。

    【讨论】:

      猜你喜欢
      • 2020-09-15
      • 1970-01-01
      • 1970-01-01
      • 2022-10-25
      • 2020-02-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多