【发布时间】:2021-05-20 11:32:26
【问题描述】:
使用 OpenAPI 3.0.3,我正在定义一个接受两个输入查询参数的 API 规范。
- name: land_area_llimit
in: query
description: Lower limit for land area comparison
required: false
schema:
type: integer
- name: land_area_ulimit
in: query
description: Upper limit for land area comparison
required: false
schema:
type: integer
理想情况下,我想将两者结合起来,并且只有一个接受范围的参数,例如:
[a,b] where a > 0 and b > a > 0。比如说:
- name: land_area
in: query
description: lower and upper bounds for land area comparison
required: false
schema:
type: range
## With some way to specify that this parameter accepts a lower bound and an upper bound.
我知道minimum 和maximum。这将预设范围。我正在寻找作为输入提供的范围。
这可以实现吗?
【问题讨论】: