Closed georgeajit closed 6 years ago
With this commit, a service directory with service.json but no *.api / endpoint module pairs should throw an error instead of generating an empty proxy class.
The task will throw an error now. Here is an output:
:generateTestProxyWithBothParamsfunction declaration without endpoint main module: C:\space\b9_0\markLogicDevelopmentToolsFunctionalTest\marklogic-development-tools-functionattests\src\main\ml-modules\root\simple\incrementer.api
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generateTestProxyWithBothParams'.
> no proxy declaration with endpoint module found in /simple/
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
1 actionable task: 1 executed
The issue is fixed.
Version of MarkLogic Java Client API
4.1
Version of MarkLogic Server
10.0 nightly build
Java version
1.8
OS and version
Windows / Cygwin
Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end
Installed the latest development-tools jar using
Created a dummy gradle project with build.gradle
API declaration file:
Service declaration file:
Ran the following task without having a main module:
Actual output: What did you observe? What errors did you see? Can you attach the logs? (Java logs, MarkLogic logs)
It is also seen that the utility function generates an interface without any method declarations inside such as this:
Expected output: What specifically did you expect to happen?
Throw an error and may be do not generate the interface.
Alternatives: What else have you tried, actual/expected?