0

私のアプリケーションには、次のような無限のクエリ パラメータを使用する可能性があります。

<baseURL>/path?filter={value}&filter={value1}&filter={value2}&....filter={value999}

これを YAML ファイルに記録し、swagger codegen を使用して API を作成するにはどうすればよいですか?

次の YAML テンプレートを使用しました。

in: query
name: template_id
description: some
required: false
type: array
items:
   type: int64

これは、これ<baseURL>/path?filter={1,2,3...n} を行う唯一の方法ですか?

4

1 に答える 1

1

collectionFormat: multiクエリ文字列パラメーターを次のように生成しますfilter={value}&filter={value1}&...

in: query
name: template_id
description: some
required: false
type: array
items:
   type: int64
collectionFormat: multi
于 2016-11-11T17:03:02.907 に答える