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
Pasting this into the Swagger editor results in the following error message:
Semantic error at paths./foo.post
Operations with Parameters of "in: formData" must include "application/x-www-form-urlencoded" or "multipart/form-data" in their "consumes" property
... and the suggested App call:
curl -X POST "http://localhost:5000/foo" -H "accept: application/json" -H "Content-Type: application/json" -d "foo=bar"
which is of course not valid as we'd expect something JSON we could pick up from POST, such as curl -X POST "http://localhost:5000/foo" -H "accept: application/json" -H "Content-Type: application/json" -d '{"foo":"bar"}'
The code generated with codegen doen't work either as the server expects formData. The documentation suggests parameter settings as I put in my sample.
Using the full code listing from the Github synposis (user management sample) doesn't result in usable code either.
What's wrong here? An issue with the software or with the documentation?
The text was updated successfully, but these errors were encountered:
Yes I did so. I also installed the swagger-codegen batch program which produces exact the same result. (it seems to be the same software in both the edior and in the standalone version)
Using the samples at Github I set up a rather simple server:
Which results in the following Swagger-File:
Pasting this into the Swagger editor results in the following error message:
... and the suggested App call:
curl -X POST "http://localhost:5000/foo" -H "accept: application/json" -H "Content-Type: application/json" -d "foo=bar"
which is of course not valid as we'd expect something JSON we could pick up from POST, such as
curl -X POST "http://localhost:5000/foo" -H "accept: application/json" -H "Content-Type: application/json" -d '{"foo":"bar"}'
The code generated with codegen doen't work either as the server expects formData. The documentation suggests parameter settings as I put in my sample.
Using the full code listing from the Github synposis (user management sample) doesn't result in usable code either.
What's wrong here? An issue with the software or with the documentation?
The text was updated successfully, but these errors were encountered: