ardielle / ardielle-tools

Apache License 2.0
18 stars 19 forks source link

java server @Path annotation assumes root servlet support #67

Closed havetisyan closed 7 years ago

havetisyan commented 7 years ago

When generating a resources for my service called zms, the @Path annotation generated in the resource files is:

@Path("/zms/v1")

This works well if the servlet I generate is set as the default servlet since I want to support my service with endpoints like: http://myhost:4443/zms/v1 but it doesn't work when I have multiple rdl generated servlets that I want to deploy within the same container e.g.:

http://myhost:4443/zms/v1 (zms.war) http://myhost:4443/ums/v1 (ums.war)

The java server generator should have an option to generate the Path with (default option) or without the service name in the path.

boynton commented 7 years ago

Does the -b option to set the @Path to what you want not cover that?

-b path Specify the base path of the URL for server and client generators.

havetisyan commented 7 years ago

Yes, it is does. Thanks. Didn't notice that option since I only looked at rdl -? and I should have looked at rdl generate -?.