Swagger 2: use enum reference in query parameter of array type

前端 未结 2 562
天涯浪人
天涯浪人 2021-01-23 13:11

Can not get how to use reference of string type with enum values in array parameter. I can make reference in items key and it is working, but Swagger produce error: Not a valid

2条回答
  •  [愿得一人]
    2021-01-23 13:52

    One option is to define a parameter and make a reference to that: (I had an issue with using reference ($ref:) within a query definition)

    paths:
      /path:
        get:
          operationId: controllers.controller
          parameters:
            **- $ref: '#/parameters/SPEC'**
    
    
    parameters:
      SPEC:
    

提交回复
热议问题