loic911 / Rest-api-doc

MIT License
21 stars 32 forks source link

Cannot generate documentation #45

Closed moniman closed 9 years ago

moniman commented 9 years ago

Hi,

I would like to use this plugin, so I have this dependencies in my project

    build ':tomcat:8.0.15'

    // plugins for the compile step
    compile ':scaffolding:2.1.2'
    compile ':cache:1.1.8'
    compile ':asset-pipeline:2.0.21'
    compile ':spring-security-core:2.0-RC4'
    compile ':spring-security-facebook:0.16.2'
    compile ':spring-security-oauth2-provider:2.0-RC2'
    compile ':mail:1.0.7'
    compile ':quartz:1.0.2'
    compile ":rest-api-doc:0.6"

    // plugins needed at runtime but not for compilation
    runtime ':hibernate4:4.3.6.1'
    runtime ':database-migration:1.4.0'
    runtime ':jquery:1.11.1'
    runtime ":resources:1.2.13"

I know to documentation tell to use resources:1.2.1 but this version not work for me

project in java 8 and grails 2.4.4

at generation (rest-api-doc) I have this stacktrace, I don't understand, hope you can help me :

Start build JSON doc restapidoc.json... 2015-01-04 09:29:58 restapidoc.APIUtils Retrieve Controller... 2015-01-04 09:29:58 restapidoc.APIUtils Retrieve Domain... 2015-01-04 09:29:58 restapidoc.APIUtils Retrieve non-Domain pojo... 2015-01-04 09:29:58 utils.JSONDocUtilsLight Build path map... 2015-01-04 09:29:58 utils.JSONDocUtilsLight Process controller class merchant.MerchantController ... 2015-01-04 09:29:58 utils.JSONDocUtilsLight Process method public java.lang.Object merchant.MerchantController.index(java.lang.String) ... java.lang.IllegalArgumentException: No enum constant org.restapidoc.pojo.RestApiVerb. Error | java.lang.IllegalArgumentException: No enum constant org.restapidoc.pojo.RestApiVerb. Error | at java.lang.Enum.valueOf(Enum.java:238) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) Error | at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) Error | at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1461) Error | at groovy.lang.ExpandoMetaClass.invokeStaticMethod(ExpandoMetaClass.java:1123) Error | at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:62) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:169) Error | at org.restapidoc.pojo.RestApiVerb.valueOf(RestApiVerb.groovy) Error | at org.restapidoc.pojo.RestApiVerb$valueOf.call(Unknown Source) Error | at org.restapidoc.pojo.RestApiMethodDoc.retrieveVerb(RestApiMethodDoc.groovy:81) Error | at org.restapidoc.pojo.RestApiMethodDoc$retrieveVerb$0.callStatic(Unknown Source) Error | at org.restapidoc.pojo.RestApiMethodDoc.buildFromAnnotation(RestApiMethodDoc.groovy:33) Error | at org.restapidoc.pojo.RestApiMethodDoc$buildFromAnnotation.call(Unknown Source) Error | at org.restapidoc.utils.JSONDocUtilsLight.extractMethodDocs(JSONDocUtilsLight.groovy:208) Error | at org.restapidoc.utils.JSONDocUtilsLight$extractMethodDocs$2.callCurrent(Unknown Source) Error | at org.restapidoc.utils.JSONDocUtilsLight.getApiMethodDocs(JSONDocUtilsLight.groovy:127) Error | at org.restapidoc.utils.JSONDocUtilsLight.this$3$getApiMethodDocs(JSONDocUtilsLight.groovy) Error | at org.restapidoc.utils.JSONDocUtilsLight$this$3$getApiMethodDocs$1.callCurrent(Unknown Source) Error | at org.restapidoc.utils.JSONDocUtilsLight.getApiDocs(JSONDocUtilsLight.groovy:73) Error | at org.restapidoc.utils.JSONDocUtilsLight$getApiDocs$0.call(Unknown Source) Error | at org.restapidoc.APIUtils.buildApiRegistry(APIUtils.groovy:58) Error | at org.restapidoc.APIUtils$buildApiRegistry.call(Unknown Source) Error | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) Error | at RestApiDoc$_run_closure1.doCall(RestApiDoc:19) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) Error | at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) Error | at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) Error | at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149) Error | at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) Error | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) Error | at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) Error | at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) Error | at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) Error | at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) Error | at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) Error | at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) Error | at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) Error | at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) Error | at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1152) Error | at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:807) Error | at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44) Error | at groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1272) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1166) Error | at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149) Error | at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) Error | at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) Error | at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) Error | at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) Error | at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) Error | at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) Error | at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) Error | at gant.Gant.withBuildListeners(Gant.groovy:427) Error | at gant.Gant.this$2$withBuildListeners(Gant.groovy) Error | at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source) Error | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) Error | at gant.Gant.dispatch(Gant.groovy:415) Error | at gant.Gant.this$2$dispatch(Gant.groovy) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) Error | at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) Error | at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) Error | at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:809) Error | at gant.Gant.invokeMethod(Gant.groovy) Error | at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source) Error | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) Error | at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source) Error | at gant.Gant.executeTargets(Gant.groovy:591) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) Error | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) Error | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61) Error | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) Error | at gant.Gant.executeTargets(Gant.groovy:590) Error | at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeWithGantInstance(GrailsScriptRunner.java:781) Error | at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptFile(GrailsScriptRunner.java:573) Error | at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:472) Error | at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:423) Error | at org.grails.ide.api.impl.GrailsConnectorImpl.executeCommand(GrailsConnectorImpl.java:160) Error | at org.grails.ide.eclipse.longrunning.process.GrailsProcess.run(GrailsProcess.java:130) Error | at org.grails.ide.eclipse.longrunning.process.GrailsProcess.main(GrailsProcess.java:93) Error | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error | at java.lang.reflect.Method.invoke(Method.java:483) Error | at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:236) Error | at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)

ChaosWars commented 9 years ago

Did you solve this? I have this error too. Same plugin version and resources version

AiqinLai commented 9 years ago

I use grails 2.4.2 and jdk1.7.0_21

plugins {
runtime ":resources:1.2.13" build ':tomcat:8.0.15' compile ":rest-api-doc:0.6"

    // plugins for the compile step
    compile ':scaffolding:2.1.2'
    compile ':cache:1.1.8'
    compile ':asset-pipeline:2.0.21'

    compile ':spring-security-core:2.0-RC4'
    compile ':spring-security-facebook:0.16.2'
    compile ':spring-security-oauth2-provider:2.0-RC2'
    //compile ':mail:1.0.7'
    compile ':quartz:1.0.2'

    // plugins needed at runtime but not for compilation
    runtime ':hibernate4:4.3.6.1'
    runtime ':database-migration:1.4.0'
    runtime ':jquery:1.11.1'

}

It works fine.

restapidoc.APIUtils Doc builder is finished... Write in file C:\EclipseJ2EE\web-app\restapidoc.json...

ChaosWars commented 9 years ago

Still can't get it to work, using that same configuration. I'm running on Linux though, not Windows

loic911 commented 9 years ago

I've check with your BuildConfig + Linux + JDK 1.7 / 1.8. It works.

Could you check if all your VERB are: RestApiVerb.GET, POST, PUT, DELETE, PATCH or NULL?

May be you can try to put a log in RestApiMethodDoc.grooy, line 81 just before: return RestApiVerb.valueOf(verb.toUpperCase()) to get the verb.toUpperCase() value

Thanks

moniman commented 9 years ago

finally rest-api-doc does not throw exception but restapidoc.json is empty... { "basePath": "Fill with basePath config", "apis": [], "objects": [], "version": "0.1.1" }

AiqinLai commented 9 years ago

I met this issue before. solved by: 1) Make sure the project path doesn't contain blank space. For example, I put my project under "../ Eclipse J2EE/", the doc is incorrect; change "Eclipse J2EE" to "EclipseJ2EE", the doc is right. 2) Use packageToScan to specify the package want to scan to generate the doc. in Config.groovy : grails { plugins { restapidoc { packageToScan="com.xxx.xxxx.xxx.xx"; } } }

ChaosWars commented 9 years ago

How did you get it to stop throwing the Verb exception moniman? I'm a bit puzzled since I'm not using RestApiVerb anywhere at all, and yet I'm seeing this error

loic911 commented 9 years ago

@moniman I try with space in my package and it works (but with LInux).

@ChaosWars @moniman If you have still problems, -Can you provide me your grails.plugins.restapidoc* config options and the log during the restapidoc file generation? -If you project is not on github, You can try to reproduce the issue with the RestApiDoc-example app (https://github.com/loic911/restapidoc-example) and send me the "error" case.

ChaosWars commented 9 years ago

@loic911 I have a sample project here: https://ashenshugar@bitbucket.org/ashenshugar/shoppy.git I don't have any config options set for restapidoc. I have documented the PurchaseController.groovy.

Basically I've found that you can replicate this error for any project by simply adding rest-api-doc:0.6.1 (and resources:1.2.8) and documenting a single controller. This has triggered this error in both projects I've tried rest-api-doc with to date.

The resulting error is:

Start build JSON doc restapidoc.json... java.lang.IllegalArgumentException: No enum constant org.restapidoc.pojo.RestApiVerb. | Error java.lang.IllegalArgumentException: No enum constant org.restapidoc.pojo.RestApiVerb. | Error at java.lang.Enum.valueOf(Enum.java:238) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) | Error at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) | Error at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1461) | Error at groovy.lang.ExpandoMetaClass.invokeStaticMethod(ExpandoMetaClass.java:1123) | Error at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:62) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:169) | Error at org.restapidoc.pojo.RestApiVerb.valueOf(RestApiVerb.groovy) | Error at org.restapidoc.pojo.RestApiVerb$valueOf.call(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) | Error at org.restapidoc.pojo.RestApiMethodDoc.retrieveVerb(RestApiMethodDoc.groovy:81) | Error at org.restapidoc.pojo.RestApiMethodDoc$retrieveVerb$0.callStatic(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165) | Error at org.restapidoc.pojo.RestApiMethodDoc.buildFromAnnotation(RestApiMethodDoc.groovy:33) | Error at org.restapidoc.pojo.RestApiMethodDoc$buildFromAnnotation.call(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) | Error at org.restapidoc.utils.JSONDocUtilsLight.extractMethodDocs(JSONDocUtilsLight.groovy:208) | Error at org.restapidoc.utils.JSONDocUtilsLight$extractMethodDocs$2.callCurrent(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) | Error at org.restapidoc.utils.JSONDocUtilsLight.getApiMethodDocs(JSONDocUtilsLight.groovy:127) | Error at org.restapidoc.utils.JSONDocUtilsLight.this$3$getApiMethodDocs(JSONDocUtilsLight.groovy) | Error at org.restapidoc.utils.JSONDocUtilsLight$this$3$getApiMethodDocs$1.callCurrent(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149) | Error at org.restapidoc.utils.JSONDocUtilsLight.getApiDocs(JSONDocUtilsLight.groovy:73) | Error at org.restapidoc.utils.JSONDocUtilsLight$getApiDocs$0.call(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124) | Error at org.restapidoc.APIUtils.buildApiRegistry(APIUtils.groovy:58) | Error at org.restapidoc.APIUtils$buildApiRegistry.call(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) | Error at RestApiDoc$_run_closure1.doCall(RestApiDoc:19) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) | Error at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) | Error at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149) | Error at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) | Error at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) | Error at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) | Error at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) | Error at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) | Error at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) | Error at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) | Error at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) | Error at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1152) | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:807) | Error at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44) | Error at groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1272) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1166) | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149) | Error at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) | Error at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) | Error at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) | Error at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) | Error at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) | Error at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) | Error at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) | Error at gant.Gant.withBuildListeners(Gant.groovy:427) | Error at gant.Gant.this$2$withBuildListeners(Gant.groovy) | Error at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) | Error at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source) | Error at gant.Gant.dispatch(Gant.groovy:415) | Error at gant.Gant.this$2$dispatch(Gant.groovy) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) | Error at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:809) | Error at gant.Gant.invokeMethod(Gant.groovy) | Error at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) | Error at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source) | Error at gant.Gant.executeTargets(Gant.groovy:591) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) | Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61) | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) | Error at gant.Gant.executeTargets(Gant.groovy:590) | Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeWithGantInstance(GrailsScriptRunner.java:781) | Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptFile(GrailsScriptRunner.java:573) | Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:472) | Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:423) | Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner$executeScriptWithCaching$0.call(Unknown Source) | Error at org.codehaus.groovy.grails.cli.interactive.InteractiveMode.parseAndExecute(InteractiveMode.groovy:339) | Error at org.codehaus.groovy.grails.cli.interactive.InteractiveMode$parseAndExecute$0.callCurrent(Unknown Source) | Error at org.codehaus.groovy.grails.cli.interactive.InteractiveMode.run(InteractiveMode.groovy:155) | Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:216) | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | Error at java.lang.reflect.Method.invoke(Method.java:483) | Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:236) | Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)

loic911 commented 9 years ago

@ChaosWars I have no access to this repo (username lrollus)

ChaosWars commented 9 years ago

@loic911 You should have access now

loic911 commented 9 years ago
compile ":restapidoc:0.1.4"

It seems that you don't use this plugin. There are rest-api-doc and restapidoc. My plugin is rest-api-doc ;-) See: http://loic911.github.io/restapidoc/ for some examples/docs.

ChaosWars commented 9 years ago

@loic911 You need to pull the development branch. The master branch does indeed use restapidoc, but that was simply due to me being unable to get rest-api-doc to work. I made a commit this morning to the develop branch in which this error is now present

loic911 commented 9 years ago

@ChaosWars The restapidoc.json is valid with my env (Grails 2.4.4, Java 8). No errors. Which version do you use (grails+java)?

ChaosWars commented 9 years ago

I was trying to build this on Linux, with Grails 2.4.4 and Java 8 (Oracle). I ran into the exact same error on Mac though, as well. On Mac is ran into the issue using Grails 2.4.4 and Java 8, and again with Grails 2.3.11 and Java 7

I just checked my project out on Windows, and using Java 8 and the Grails wrapper of the project (Grails 2.4.4) I get completely different errors:

Start build JSON doc restapidoc.json... | Error Error running script rest-api-doc --stacktrace: org/jsondoc/core/pojo/Ap iObjectDoc (NOTE: Stack trace has been filtered. Use --verbose to see entire tra ce.) java.lang.NoClassDefFoundError: org/jsondoc/core/pojo/ApiObjectDoc at org.restapidoc.JSONUtils.registerMarshallers(JSONUtils.groovy:17) at org.restapidoc.JSONUtils$registerMarshallers.call(Unknown Source) at RestApiDoc$_run_closure1.doCall(RestApiDoc:17) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure 16_closure18.doCall(GantBinding.groovy:185) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure 16_closure18.doCall(GantBinding.groovy) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groo vy) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure 16.doCall(GantBinding.groovy:185) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure 16.doCall(GantBinding.groovy) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source) at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:591) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at gant.Gant.executeTargets(Gant.groovy:590) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl ectiveInterceptor.java:1270) at org.grails.wrapper.GrailsWrapper.main(GrailsWrapper.java:93) | Error Error running script rest-api-doc --stacktrace: org/jsondoc/core/pojo/Ap iObjectDoc

I'll trying installing Grails and if I still get errors.

ChaosWars commented 9 years ago

On Linux, I did as you suggested and added a debug line in the function: public static RestApiVerb retrieveVerb(String verb) (line 81)

I had to make it throw an exception as the Log4j output wasn't showing up for some reason: throw new Exception("Verb: " + verb.toUpperCase());

The output was: Start build JSON doc restapidoc.json... java.lang.Exception: Verb: | Error java.lang.Exception: Verb:

So it looks as though the input for the function is the "*" symbol. I don't know in the context of rest-api-doc if that is actually valid input - I would guess that it isn't. Looking at the code that calls that function, it looks as though it either expects "POST", "PUT", or "PATCH".

ChaosWars commented 9 years ago

Well, after installing Grails 2.4.4 on Windows I get the exact same error about the function input being "*". I suspect that there must be some configuration issue since it would seem that it is definitely independent of host OS.

You could probably easily reproduce the error by installing a VM and installing Ubuntu 64-bit. I must say though that I checked out your example project on my Mac last week and it generated the documentation for that without a problem. I tried to see if any config options from that helped my problems, but I couldn't find any obvious ones. It might be that your example project has some configuration that lets it build, but you still have access to my project that you could use as an additional test on any fresh installs you do.

loic911 commented 9 years ago

@ChaosWars Can you try with my last commit Modify your buildconfig: comment the rest-api-doc:xxx line and add this line at the beginning of the BuildConfig file

grails.plugin.location.restapidoc = "PATH_TO_RESTAPIDOC"
ChaosWars commented 9 years ago

Ok, I'll try that just now.

This morning I switched branches, and then switched back to the one I was trying to integrate rest-api-doc in. I'd removed some files in doing so, including the restapidoc.json file. When I ran the command "rest-api-doc" it built this time around. Very odd. It would seem that perhaps some temp files are causing this issue?

loic911 commented 9 years ago

You just need to get the last source code in a path. Then you reference this path in grails.plugin.location.restapidoc. You can use a relative path (if you have /home/you/project/shoppy and you download the rest-api-doc source in /home/you/project/restapi, you just need to put "../restapi").

ChaosWars commented 9 years ago

It seems to be working. I'd like to test it on my machine at home with the projects on other host OS/Grails combinations that it was also erroring consistently on before I say unequivocally that it's working for me. But on my work machine at least it seems to be generating documentation. Thanks for all the help so far.

ChaosWars commented 9 years ago

I think we can mark this as fixed, it works on all machines it previously failed on

stacysimpson commented 9 years ago

In case someone else run across this thread. I was receiving the same "No enum constant org.restapidoc.pojo.RestApiVerb.*" error message for custom REST endpoints. For custom endpoints, one should specify the 'verb' as part of the @RestApiMethod annotation. Long term, it might be nice for a more user friendly error message for this situation.

loic911 commented 9 years ago

It should be fix since Commits on Feb 9, 2015 @loic911 "Add * support"