java.lang.IllegalStateException: Do not know how to pass type formdata
Opened this issue · 3 comments
Expected behavior: enunciate-openapi should recognize and encode formdata
parameters as described in the OpeAPI 3.0.0 spec, "special considerations for multipart content" section.
Actual behavior: enunciate-openapi throws an error when it encounters a param of type formdata
.
Debug info
If I run mvn enunciate:docs
in this repo, I'll get an error at Param.java:73
[link @ master] [@ 70bd54af].
Here's the relevant part of the stack trace.
# ... snip ...
Caused by: java.lang.IllegalStateException: Do not know how to pass type formdata
at dk.jyskebank.tools.enunciate.modules.openapi.paths.Param.<init> (Param.java:73)
at dk.jyskebank.tools.enunciate.modules.openapi.paths.Operation.<init> (Operation.java:66)
at dk.jyskebank.tools.enunciate.modules.openapi.paths.Endpoint.<init> (Endpoint.java:44)
at dk.jyskebank.tools.enunciate.modules.openapi.paths.Paths.<init> (Paths.java:44)
at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule$OpenApiInterfaceDescription.writeToFolder (OpenApiModule.java:212)
at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule.call (OpenApiModule.java:146)
at com.webcohesion.enunciate.Enunciate.invokeModules (Enunciate.java:898)
at com.webcohesion.enunciate.EnunciateAnnotationProcessor.process (EnunciateAnnotationProcessor.java:127)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor (JavacProcessingEnvironment.java:980)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs (JavacProcessingEnvironment.java:896)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run (JavacProcessingEnvironment.java:1222)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing (JavacProcessingEnvironment.java:1334)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations (JavaCompiler.java:1258)
at com.sun.tools.javac.main.JavaCompiler.compile (JavaCompiler.java:936)
# ... snip ...
Hi there. Just letting you know I am aware of the issues you created.
FYI I will try to get the docs updated (the other issue), but I am unlikely to spend time on fixing this bug.
hey, thanks for replying!
I am unlikely to spend time on fixing this bug.
Understandable since (1) this is open source but also (2) since this bug seems isolated. I was able to generate an openapi.yml in the above repo by excluding one API class which used org.glassfish.jersey.media.multipart.FormDataParam
[permalink to that line].
FYI I will try to get the docs updated (the other issue)
No rush. LMK when you start; I'll let you know if I free up and feel like drafting the documentation. I should be busy for the next 3 weeks, so no guarantees.
I am now experiencing this issue also, was excluding the FormDataParam class the recommended way to work around this?