我有以下与openapi 3.0兼容的yaml文件,我正在尝试通过招摇来渲染。 yaml文件中未报告任何错误,但是requestBody
不会在摇摇欲坠的GUI上呈现。我只是得到一个parameters
字段,该字段为空,但未为请求正文呈现任何内容,也没有收到任何错误。下面的屏幕截图。
paths:
/my-api:
post:
summary: My API Summary
description: My API Description
tags:
- Cost Center
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ReqBodyStruct'
如何通过招摇的gui显示RequestBody?我想念什么吗?
[根据Swagger UI github页面上的这两个问题OAS 3.0: Support for media type examples (aka request/response body examples) #3437和Examples are not showing #2651,这应该在版本3.23.0
(2019年6月29日)中修复。