Situación:
Error principal
Al generar el código HTML de Swagger se produce un error en el proceso de compilación.
Traza del error:
Discovered module jersey
Discovered module obj-c
Discovered module php
Discovered module ruby
Discovered module xml
Discovered module swagger
Loading config /XXXXXXXXXXXXXXXXXX/_ACTIVE_ PROJECTS/XXXXXXX/XXXXXXXXXXXX_ GIT/B2B/B2BProj/ATG/ATG10.1.2/ dgl_b2b/enunciate-b2b- configuration.xml
[enunciate] warning: The apt tool and its associated API are planned to be
[enunciate] removed in the next major JDK release. These features have been
[enunciate] superseded by javac and the standardized annotation processing API,
[enunciate] javax.annotation.processing and javax.lang.model. Users are
[enunciate] recommended to migrate to the annotation processing features of
[enunciate] javac; see the javac man page for more information.
Discovered module obj-c
Discovered module php
Discovered module ruby
Discovered module xml
Discovered module swagger
Loading config /XXXXXXXXXXXXXXXXXX/_ACTIVE_
[enunciate] warning: The apt tool and its associated API are planned to be
[enunciate] removed in the next major JDK release. These features have been
[enunciate] superseded by javac and the standardized annotation processing API,
[enunciate] javax.annotation.processing and javax.lang.model. Users are
[enunciate] recommended to migrate to the annotation processing features of
[enunciate] javac; see the javac man page for more information.
BUILD FAILED
/XXXXXXXXXXXXXXX/_ACTIVE_ PROJECTS/XXXXXXXXX/XXXXXXXXXX_ GIT/XXX/XXXProj/ATG/ATGX.X.X/ dgl_XXX/build.xml:582: org.codehaus.enunciate. contract.validation. ValidationException: (unknown source position): Accessor user of biz.xxxxx.xxx.api.params. profile.ValidateProfileParams: An interface type cannot be an xml type.
/XXXXXXXXXXXXXXX/_ACTIVE_
Problema: Dentro de la clase se utiliza la anotación @XmlRootElement(«<nombre>»). Produce un error dado que el tipo del recuperador de la clase es RepositoryItem de atg y no es correcto.
La interfície no puede utilizar este tipo dado que no es XML.
Dos posibles soluciones:
1) Eliminar el tipo de repositoryItem y utilizar el tipo String modificando también los nombres del objecto Params (de object a userId).
2) Eliminar la notación @XmlRootElement de la clase para que no sea detectada por Swagger.
Información adicional: