-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Primitive RequestPart parameters generate incorrect Swagger Model #2717
Comments
Alright, I see that a contract test is failing that relates to #1965 apparently. The spec says that only name, in, description, and required are "fixed" fields. It also specifically says the following: It only seems valid to model a JSON document sent via a formData multipart as |
I also encountered this problem. It worked correctly on 2.7.0 version and broke on 2.8.0 version (problem was discovered when I wanted to upgrade this library). Currently I'm forced to stay on old version. |
Hi, I am having the same problem
generates this:
Is there any workaround to avoid having |
I'm running springfox at version 2.9.2 When you build a custom ApiDescription with the ParametersBuilder as follow:
Generates the same broken JSON for formData:
The expected valid JSON is:
|
We have the same problem in v2.9.2, any update on this? |
Same Problem with 2.9.2! |
Same |
Method parameters of the following form will generate incorrect parameters in Swagger 2. Non-validating parsers will not immediately choke on it, but code generators like swagger-codegen or openapi-codegen will.
The generated spec will look like this:
This is a problem because parameters with
in=formData
can't have a schema, only a type is allowed. The spec doesn't allow formData parameters to be anything other than a primitive.The expected JSON should be:
The text was updated successfully, but these errors were encountered: