How to define mutually exclusive query parameters in Swagger (OpenAPI)?

前端 未结 4 1144
借酒劲吻你
借酒劲吻你 2020-11-30 08:43

I have a series of parameters in Swagger like this

                    \"parameters\": [
                    {
                


        
4条回答
  •  隐瞒了意图╮
    2020-11-30 09:04

    An alternative is to pass in a filter type parameter with an enum, and a filter value with the value to use.

    Example at: https://app.swaggerhub.com/api/craig_bayley/PublicAPIDemo/v1

    It can be required or not, as you choose. However if one is required, they should both be.

提交回复
热议问题