我正在使用在线Swagger Editor为我的API创建一个Swagger规范 .
我的API有一个GET请求 endpoints ,我使用以下YAML代码来描述输入参数:
paths:
/fooBar:
get:
tags:
- foobar
summary: ''
description: ''
operationId: foobar
consumes:
- application/x-www-form-urlencoded
produces:
- application/json
parameters:
- name: address
in: query
description: Address to be foobared
required: true
type: string
example: 123, FakeStreet
- name: city
in: query
description: City of the Address
required: true
type: string
example: New York
如果我输入 example 标签,我会收到一条错误消息:
不是,中的一个
如何在Swagger中编写GET参数时设置示例?