-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Hi guys,
I am trying to use the jaxrs-spec-interface server template creators to build a war application containing several independent REST services. I am using exception mappers etc specific to each service, so i am writing my own @ApplicationPath annotated classes for the services, but i find it a bit annoying, that i have to provide the base path aka 'contextPath' for the @ApplicationPath("/thePath") myself.
I would like the template creator to generate a string constant with the content of the 'contextPath', which i can use instead of a string litteral. F.x '@ApplicationPath(RootResource.ROOT)'
I have looked into custom templates etc, but i do not see a path to success going down that path.
I am using the openapi generator gradle plugin, and i do not see support for custom templates in the plugin
I am also constrained in my choice of template creators to JAXRS due to project requirements.
I have looked into the jaxrs-spec creator code and templates, and it is fairly easy to extend the creators to produce a class with the string constant, i am looking for. I will create a tiny PR for this.