OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[x] Have you validated the input using an OpenAPI validator (example)?
[x] Have you tested with the latest master to confirm the issue still exists? --> No, only with 6.0.1 - master does not build at the moment (module java.base does not "opens java.util" to unnamed module xxx) !
[x] Have you searched for related issues/PRs?
[x] What's the actual output vs expected output? --> Generation error vs generation done: [WARNING] Could not compute datatypeWithEnum from UploadFileModel, null
Description
I'm trying to use openapi + spring boot to declare an endpoint where I can upload multiple files, each of them having metadatas (for example, an "urgent" flag that can be set for each file). I tried to use a multipart/form-data endpoint with a binary property but the generation of the beans&api is failing with a warning: [WARNING] Could not compute datatypeWithEnum from UploadFileModel, null
If I change the code to use a non-multipart request, eg. application/json+base64encoding for the upload file, then the issue disappear.
The code is available as a minimal reproducible example here: https://github.com/sebpiller/openapi-bug (toggle comment at demo.yaml, lines 11+12, 44+45 to have a working implem)
openapi-generator version
6.0.1, but fails similarly with all version I've tested
Bug Report Checklist
[WARNING] Could not compute datatypeWithEnum from UploadFileModel, null
Description
I'm trying to use openapi + spring boot to declare an endpoint where I can upload multiple files, each of them having metadatas (for example, an "urgent" flag that can be set for each file). I tried to use a multipart/form-data endpoint with a binary property but the generation of the beans&api is failing with a warning:
[WARNING] Could not compute datatypeWithEnum from UploadFileModel, null
If I change the code to use a non-multipart request, eg. application/json+base64encoding for the upload file, then the issue disappear.
The code is available as a minimal reproducible example here: https://github.com/sebpiller/openapi-bug (toggle comment at demo.yaml, lines 11+12, 44+45 to have a working implem)
openapi-generator version
6.0.1, but fails similarly with all version I've tested
OpenAPI declaration file content or url
Generation Details
Maven generator 6.0.1, see linked project's pom
Steps to reproduce
Run clean install on the demo project. It fails with a warning "[WARNING] Could not compute datatypeWithEnum from UploadFileModel, null"
Switching to application/json + base64 encoding of uploads works, but is suboptimal