以宽广的方式定义回答非常简单:
responses:
# Response code
200:
description: Successful response
schema:
title: OK
type: array
items:
title: Person
type: object
properties:
name:
type: string
single:
type: boolean
让我们跳过在API中重定向是非专业的事实!
更新:使用字符串进行回复也很简单:
description: A simple string response
schema:
type: string