stoicflame / enunciate-openapi

OpenAPI3 module for Enunciate
Apache License 2.0
10 stars 10 forks source link

Bump Enunciate to 2.12.0, plus Enunciate brings Jackson 2.9.x instead 2.5.x with update. #17

Closed soberich closed 5 years ago

soberich commented 5 years ago

Hi, For some reason 2.11.1 doesn't work for me. But 2.12.0 Enunciate works. So this update in highly appreciated. Jackson finally newer which brings some DateTime api nicer handling. The implementation in naive as all these are compile time operations. I double create DefaultRegistrationContext for example in OpenApiModule.java for example, because new Enunciate changes API a bit and I just avoided compilation errors. Feel free to correct it. Please let's update. Thank you for the tool!

soberich commented 5 years ago

With 2.12.0 I have exception

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':enunciate'.
> Failed to invoke Enunciate

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':enunciate'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:166)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:163)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:156)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
    at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
    at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.IllegalStateException: Failed to invoke Enunciate
    at com.webcohesion.enunciate.gradle.EnunciateTask.run(EnunciateTask.java:173)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:49)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:717)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:684)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$5.run(ExecuteActionsTaskExecuter.java:476)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:461)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:444)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:93)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:237)
    at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
    at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58)
    at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33)
    at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39)
    at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
    at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
    at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)
    at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
    at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)
    at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)
    at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:208)
    at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)
    at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)
    at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
    at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)
    at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:69)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:47)
    at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:140)
    ... 34 more
Caused by: java.lang.RuntimeException: com.webcohesion.enunciate.EnunciateException: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> parameter.description  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 70, column 24]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use [#if myOptionalVar??]when-present[#else]when-missing[/#if]. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
    - Failed at: ${parameter.description}  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 70, column 22]
    - Reached through: @file name="openapi.yml" charset="utf-8"  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 19, column 1]
----
    at com.sun.tools.javac.main.Main.compile(Main.java:553)
    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:667)
    at com.webcohesion.enunciate.gradle.EnunciateTask.configureAndInvokeEnunciate(EnunciateTask.java:211)
    at com.webcohesion.enunciate.gradle.EnunciateTask.run(EnunciateTask.java:171)
    ... 88 more
Caused by: com.webcohesion.enunciate.EnunciateException: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> parameter.description  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 70, column 24]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use [#if myOptionalVar??]when-present[#else]when-missing[/#if]. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
    - Failed at: ${parameter.description}  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 70, column 22]
    - Reached through: @file name="openapi.yml" charset="utf-8"  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 19, column 1]
----
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule$OpenApiInterfaceDescription.writeToFolder(OpenApiModule.java:227)
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule.call(OpenApiModule.java:147)
    at com.webcohesion.enunciate.Enunciate.invokeModules(Enunciate.java:890)
    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)
    ... 93 more
Caused by: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> parameter.description  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 70, column 24]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use [#if myOptionalVar??]when-present[#else]when-missing[/#if]. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
    - Failed at: ${parameter.description}  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 70, column 22]
    - Reached through: @file name="openapi.yml" charset="utf-8"  [in template "jar:file:/Users/.gradle/caches/jars-3/7b97ef2225aa19260ffa68bfbcbceb84/enunciate-openapi-1.0.9-SNAPSHOT.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 19, column 1]
----
    at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
    at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:467)
    at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:389)
    at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:358)
    at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100)
    at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
    at freemarker.core.Environment.visit(Environment.java:366)
    at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317)
    at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
    at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
    at freemarker.core.Environment.visitIteratorBlock(Environment.java:642)
    at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107)
    at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93)
    at freemarker.core.Environment.visit(Environment.java:330)
    at freemarker.core.Environment.visit(Environment.java:372)
    at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317)
    at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
    at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
    at freemarker.core.Environment.visitIteratorBlock(Environment.java:642)
    at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107)
    at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93)
    at freemarker.core.Environment.visit(Environment.java:366)
    at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317)
    at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
    at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
    at freemarker.core.Environment.visitIteratorBlock(Environment.java:642)
    at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107)
    at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93)
    at freemarker.core.Environment.visit(Environment.java:330)
    at freemarker.core.Environment.visit(Environment.java:372)
    at freemarker.core.Environment$NestedElementTemplateDirectiveBody.render(Environment.java:2900)
    at com.webcohesion.enunciate.util.freemarker.FileDirective.execute(FileDirective.java:78)
    at freemarker.core.Environment.visit(Environment.java:445)
    at freemarker.core.UnifiedCall.accept(UnifiedCall.java:101)
    at freemarker.core.Environment.visit(Environment.java:330)
    at freemarker.core.Environment.visit(Environment.java:336)
    at freemarker.core.Environment.process(Environment.java:309)
    at freemarker.template.Template.process(Template.java:384)
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule.processTemplate(OpenApiModule.java:300)
    at dk.jyskebank.tools.enunciate.modules.openapi.OpenApiModule$OpenApiInterfaceDescription.writeToFolder(OpenApiModule.java:224)
    ... 104 more

in HERE in openapi.fmt

paths:
  [#list paths.endpoints as endpoint]
  ${endpoint.path}:
    [#list endpoint.operations as operation]
    ${operation.httpMethod}:
      description: ${operation.description}
      tags:
        - ${endpoint.resourceGroupTag}
      summary: ${operation.summary}
      deprecated: ${operation.deprecated}
      operationId: ${operation.operationId}
      [#if operation.hasParameters]
      parameters:
        [#list operation.parameters as parameter]
      - name: ${parameter.name}
        in: ${parameter.inFormat}
        description: ${parameter.description}                    // <= HERE e.g. **parameter.description**
        required: ${parameter.required}
        schema:
          ${parameter.renderDataType("          ")}
        style: ${parameter.style}
        [/#list][#-- list parameters --]
      [/#if][#-- if operation.hasParameters --]
      [#if operation.hasEntity]

EDIT

my enunciate.xml


<enunciate
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.12.0.xsd">

    <title>If You Wanna Be Cool API</title>
    <description package="com.ifyouwannabecool.api"/>
    <copyright>IfYouWannaBeCool.com</copyright>

    <application root="http://www.ifyouwannabecool.com/api"/>

    <modules>
        <docs>
            <download file="LICENSE" name="Apache II" description="The license governing this API" showLink="true"/>
        </docs>
        <jackson1 disabled="true"/>
        <openapi disabled="false"/>
        <spring-web disabled="false"/>
    </modules>

</enunciate>
soberich commented 5 years ago

@jskovjyskebankdk Hi-hi! Just a ping.

jskov-jyskebank-dk commented 5 years ago

Ack! But no time right now. Will try to look at it next week.

soberich commented 5 years ago

@PlamenSStefanov @jskovjyskebankdk Exception thrown for spring-web only, e.g. works for jax-rs.

EDITED

Bottom line to reproduce.

given:

  1. spring-mvc annotated controller/resource
  2. verb and at least one parameter in method present which has no corresponding Javadoc

then: exception is thrown if:

Adding Javadoc for all params, or using Jax-RS annotations fixes the problem.

Could you address it?

jskov-jyskebank-dk commented 5 years ago

I have merged the changes, with some minor tweaks (c2fec12746ac74e5117388b01d5ebf036c9a203f).

I do not use spring myself, so I will not work on a fix for spring-mvc.

But if you make a PR with a test that demonstrates the problem, maybe someone else will (or I will, if I can easily see the cause of the problem).

Cheers!