-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ApiModelProperty and @ApiModel not respected in EJB module #485
Comments
On the same way, service are not read by the Swagger when the annotations for REST services are placed on external jar (on interfaces for remote access). |
Hi, I have not been able to reproduce this--if you have any tips on how to do so, please pass them on here. In the mean time, there was a defect (#486) which may be relevant--could you please try this with 1.3.3-SNAPSHOT? |
I can not find 1.3.3-SNAPSHOT. Can you give the link? |
perabello: clone the repo and build it by setting the version in the pom.xml under swagger-core module. |
Hi guys, Tried with 1.3.3-SNAPSHOT no luck yet... Also added some debug logs to the "match case": Then the EJB module case: (default task-10) processing method public java.lang.Integer model.EjbModel.getIntegterInEjb() So, for some reason the match case skips the ApiModelProperty paramater alltogether!? It's good to note that the XMLelement parameter works just fine, which is also weird to me. Here's again simple sample project that can reproduce the case on Wildfly 8 server. https://groups.google.com/group/swagger-swaggersocket/attach/101b8b58a6843084/mockproject.zip?part=4&authuser=0 |
To make it 100% clear: The match case I modified is in processAnnotations method. |
FYI the snapshots are here: Did you test against the develop branch, which builds the 1.3.3-SNAPSHOT? |
Yes, now descriptions for the sample are published. |
Hi guys, We got the issue solved by changing the project configuration. The EJB module scope in web module POM needs to be "compile". Otherwise while Checking the annotations Swagger will receive a proxy instead of the annotated interface and it fails to do the match case for getting the values. Working project https://groups.google.com/group/swagger-swaggersocket/attach/1d5184c961dcb6dc/mockproject%202.zip?part=4&authuser=0. This issue can be closed IMO. Thanks for the activity! |
@Paave - Thank you for providing a solution. Feel free to reopen it if you feel the need. |
@Paave - I dont think that is an acceptable solution. If you put an ejb in the ejb module with a method that returns an instance of "model.EjbModel" and calls the method from the web module, you will produce a ClassCastException since the class of the returned object (from the dependency in the ear) and the expected class (from the "compile" dependency in the war) will come from different places. I.e. with this solution you cant put any ejb:s in the ejb module... |
Please reopen this bug if possible |
per @elisid 's request... |
Hi @webron, a while since I was working on this, but from https://groups.google.com/forum/#!topic/swagger-swaggersocket/xVvQekBHLxo you can find complete mock projects to reproduce the issue on Wildfly. |
ok without a committed test case, I'm going to close this out |
I think it deserves to be reopened and fixed. |
Model descriptions are not read by the the Swagger when models are placed in to the EJB module of EJB in EAR project. This is likely in Swagger core According Ron R. and Tony Tam (as discussed in https://groups.google.com/forum/#!topic/swagger-swaggersocket/xVvQekBHLxo).
The text was updated successfully, but these errors were encountered: