You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using flask-restful-swagger in my restful app,
because my requirements have many parameters for different resources, so i want to put all of the params into request body of "Get" method (most of my app case is "Get" data).
i use curl to test my design, it works fine, just like:
curl -i -H "Content-Type: application/json" -d "{"param1":"value1", "param2":"value2"}" -X GET localhost:5000/api/v1/resource
but when i use swagger UI to test, it looks fine, with body type parameters in UI, but it can't send the request body to my restful service (Receive None from request.json).
I know maybe the "query" paramType is suit for me, but i don't want to use query, because it will make a very long and complex URL.
The another option is "header" paramType, that could be a good choice, but current code (swagger 1.2 implementation) can't support header, right ?
Is there any possible method can meet my requirements or i need modify the swagger code ?
The text was updated successfully, but these errors were encountered:
I am using flask-restful-swagger in my restful app,
because my requirements have many parameters for different resources, so i want to put all of the params into request body of "Get" method (most of my app case is "Get" data).
i use curl to test my design, it works fine, just like:
curl -i -H "Content-Type: application/json" -d "{"param1":"value1", "param2":"value2"}" -X GET localhost:5000/api/v1/resource
but when i use swagger UI to test, it looks fine, with body type parameters in UI, but it can't send the request body to my restful service (Receive None from request.json).
I know maybe the "query" paramType is suit for me, but i don't want to use query, because it will make a very long and complex URL.
The another option is "header" paramType, that could be a good choice, but current code (swagger 1.2 implementation) can't support header, right ?
Is there any possible method can meet my requirements or i need modify the swagger code ?
The text was updated successfully, but these errors were encountered: