Swagger API which is having query string

后端 未结 2 816
感情败类
感情败类 2020-11-29 13:20

I want to deploy an API which is having query string.This is the API

v1/products?q=circuit breaker&locale=en-GB&pageSize=8&pageNo=1&project=G         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 13:47

    Your IN parameter needs to be "query" not "path"

    This should work:

    "parameters": [
      {  
        "name":"country",
        "in":"query",
        "description":"The Country that needs to be fetched. Example=France, India etc.",
        "required":false,
        "type":"string"
      }
    ]
    

提交回复
热议问题