Open jeffshee opened 2 years ago
Hi, how is this issue going? Do you need any additional info?
Tried out using a workaround from https://github.com/OpenAPITools/openapi-generator/issues/10415#issuecomment-1003067496 and it fixes the issue.
@RomioSahoo Thanks. Did you tried the workaround with the test source code that I provided above?
I tried adding the option --global-property skipFormModel=true
to the generator and it didn't fix the issue.
@jeffshee it is true by default. Try setting to false instead.
Bug Report Checklist
Description
As titled, when a property is referenced using
$ref
withmultipart/form-data
in the requestBody, such property is always null. It works otherwise when not using$ref
, or when not usingmultipart/form-data
. This issue might only occur with the above combinations.openapi-generator version
I tested with docker images of openapi-generator-cli v5.2.0 and v5.4.0. Both have the same issue. I couldn't test with the latest docker images v6.0.1. The server gives HTTP error 503 for all requests and refuses to work. This is also the reason why I couldn't test with the latest master. (This would be another issue.)
OpenAPI declaration file content or url
For the source codes to reproduce the issue, please refer to this repo: https://github.com/jeffshee/openapi-test The OpenAPI declaration file can be found here: https://github.com/jeffshee/openapi-test/blob/master/api.yaml
Generation Details
Steps to reproduce
Docker environment is required for using the Makefile provided in the repo.
make all
to compile and run the docker image.test1
is not working. For comparison,test2
andtest3
are working.Related issues/PRs
N/A
Suggest a fix
N/A