I have been trying to add API management to my Google Cloud Endpoints (2.0) API.
I have been following Google's documentation here, however when running the endpoints-framework-tools get-openapi-doc command, as follows:
endpoints-framework-tools-2.0.8/bin/endpoints-framework-tools \
get-openapi-doc \
--hostname=myapp-id.appspot.com \
--war=target/backend-1.0-SNAPSHOT \
uk.co.myproject.backend.MyServiceEndpoint
I just the following response: Error: uk.co.myproject.backend.MyServiceEndpoint
I have tried adding the folders containing all of my .class files to the --classpath argument, as suggested in this question, but it seems to make no difference.
--classpath="cldata/build/classes/java/main/uk/co/myproject/cldata/tables;backend/build/classes/java/main/uk/co/myproject/backend;backend/build/classes/java/main/uk/co/myproject/backend/datahelpers;backend/build/classes/java/main/uk/co/myproject/backend/entities" \
If anyone has any idea as to what the problem may be, I would be most grateful. This unhelpful error message is very frustrating!
I have not been able to get this command to work. However, I am using Android Studio & the endpoints-framework-gradle-plugin, which has solved the issue for my particular needs.
As mentioned on its Github page, it provides a
endpointsOpenApiDocs
command to generate the OpenAPI doc.I was able to use this to generate the openapi.json file by using Android Studio's Terminal to run:
from my Endpoints module's directory (I'm using the gradle wrapper, which lives up a level at the root of the project).
I hope this helps others who may end up in the same situation.