Skip to content
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

Support for @RequestPart #26

Open
soberich opened this issue Apr 17, 2020 · 0 comments
Open

Support for @RequestPart #26

soberich opened this issue Apr 17, 2020 · 0 comments

Comments

@soberich
Copy link
Contributor

Hi,
Currently @RequestPart("fileContent") MultipartFile fileContent
in parameters fails with stackstace..

Enunciate has literal "file" for such type and it is not listed in switch expression there.

Caused by: java.lang.IllegalStateException: Called with unhandled type file
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiTypeFormat.toEnunciateType (OpenApiTypeFormat.java:115)
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiTypeFormat.from (OpenApiTypeFormat.java:78)
    at dk.jyskebank.tools.enunciate.modules.openapi.DataTypeReferenceRenderer.renderType (DataTypeReferenceRenderer.java:147)
    at dk.jyskebank.tools.enunciate.modules.openapi.paths.ParameterRenderer.addType (ParameterRenderer.java:61)
    at dk.jyskebank.tools.enunciate.modules.openapi.paths.ParameterRenderer.exec (ParameterRenderer.java:48)
    at dk.jyskebank.tools.enunciate.modules.openapi.paths.ParameterRenderer.exec (ParameterRenderer.java:29)
    at dk.jyskebank.tools.enunciate.modules.freemarker.Typed1ArgTemplateMethod.exec (Typed1ArgTemplateMethod.java:41)
    at freemarker.core.MethodCall._eval (MethodCall.java:62)
    at freemarker.core.Expression.eval (Expression.java:101)
    at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup (DollarVariable.java:100)
    at freemarker.core.DollarVariable.accept (DollarVariable.java:63)
    at freemarker.core.Environment.visit (Environment.java:370)
    at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing (IteratorBlock.java:321)
    at freemarker.core.IteratorBlock$IterationContext.executeNestedContent (IteratorBlock.java:271)
    at freemarker.core.IteratorBlock$IterationContext.accept (IteratorBlock.java:244)
    at freemarker.core.Environment.visitIteratorBlock (Environment.java:644)
    at freemarker.core.IteratorBlock.acceptWithResult (IteratorBlock.java:108)
    at freemarker.core.IteratorBlock.accept (IteratorBlock.java:94)
    at freemarker.core.Environment.visit (Environment.java:334)
    at freemarker.core.Environment.visit (Environment.java:376)
    at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing (IteratorBlock.java:321)
    at freemarker.core.IteratorBlock$IterationContext.executeNestedContent (IteratorBlock.java:271)
    at freemarker.core.IteratorBlock$IterationContext.accept (IteratorBlock.java:244)
    at freemarker.core.Environment.visitIteratorBlock (Environment.java:644)
    at freemarker.core.IteratorBlock.acceptWithResult (IteratorBlock.java:108)
    at freemarker.core.IteratorBlock.accept (IteratorBlock.java:94)
    at freemarker.core.Environment.visit (Environment.java:370)
    at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing (IteratorBlock.java:321)
    at freemarker.core.IteratorBlock$IterationContext.executeNestedContent (IteratorBlock.java:271)
    at freemarker.core.IteratorBlock$IterationContext.accept (IteratorBlock.java:244)
    at freemarker.core.Environment.visitIteratorBlock (Environment.java:644)
    at freemarker.core.IteratorBlock.acceptWithResult (IteratorBlock.java:108)
    at freemarker.core.IteratorBlock.accept (IteratorBlock.java:94)
    at freemarker.core.Environment.visit (Environment.java:334)
    at freemarker.core.Environment.visit (Environment.java:376)
    at freemarker.core.Environment$NestedElementTemplateDirectiveBody.render (Environment.java:3244)
    at com.webcohesion.enunciate.util.freemarker.FileDirective.execute (FileDirective.java:78)
    at freemarker.core.Environment.visit (Environment.java:451)
    at freemarker.core.UnifiedCall.accept (UnifiedCall.java:102)
    at freemarker.core.Environment.visit (Environment.java:334)
    at freemarker.core.Environment.visit (Environment.java:340)
    at freemarker.core.Environment.process (Environment.java:313)
    at freemarker.template.Template.process (Template.java:383)
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule.processTemplate (OpenApiModule.java:300)
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule$OpenApiInterfaceDescription.writeToFolder (OpenApiModule.java:220)
    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:802)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs (JavacProcessingEnvironment.java:713)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800 (JavacProcessingEnvironment.java:91)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run (JavacProcessingEnvironment.java:1043)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing (JavacProcessingEnvironment.java:1184)
    at com.sun.tools.javac.main.JavaCompiler.processAnnotations (JavaCompiler.java:1170)
    at com.sun.tools.javac.main.JavaCompiler.compile (JavaCompiler.java:856)
    at com.sun.tools.javac.main.Main.compile (Main.java:523)
    at com.sun.tools.javac.api.JavacTaskImpl.doCall (JavacTaskImpl.java:129)
    at com.sun.tools.javac.api.JavacTaskImpl.call (JavacTaskImpl.java:138)
    at com.webcohesion.enunciate.Enunciate.run (Enunciate.java:671)
    at com.webcohesion.enunciate.mojo.ConfigMojo.execute (ConfigMojo.java:436)
    at com.webcohesion.enunciate.mojo.AssembleBaseMojo.execute (AssembleBaseMojo.java:102)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:190)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant