Skip to content
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

using the plugin with separate modules does not seem to work #537

Open
patoulatchi opened this issue Sep 18, 2017 · 2 comments
Open

using the plugin with separate modules does not seem to work #537

patoulatchi opened this issue Sep 18, 2017 · 2 comments

Comments

@patoulatchi
Copy link

Hi,

I'm trying to generate the swagger documentation in a separate documentation maven project which depends on multiple dependencies who each implements multiple jaxrs interfaces.

I get the following error where the plugin cannot load the class which implements the interface which contains the @Api annotation:

Failed to execute goal com.github.kongchen:swagger-maven-plugin:3.1.5:generate (default) on project dms-admin-doc: could not get type for name com.xxx.yyy.PingRsImpl -> [Help 1]

It seems to me to be a bug when the plugin tries to load the classes who implements it. The implementation class is inside the same module which also provides the interface, so in principle the implementation class should be visible as well.

I configured the plugin with a location who provides the root package name of both the interface and the implementation class.

<locations> <location> com.xxx </location> </locations>

I'm using the latest released version (3.1.5).

By the way: It works fine if I generate the documentation directly inside one a my rest projects.

Anyone using this plugin in similar configuration ?

Thanks,
Nicolas

@Aerilius
Copy link

Aerilius commented Jan 12, 2018

We also have datastructures in a separate Maven project that is included in the Rest API project as a Maven dependency. Annotations on the datastructures do not appear in documentation, only annotations in the api project (api operations, api parameters), where I run mvn compile.

This is a big blocker, because our parameters are deeply nested with classes from the datastructures project, which need explanations for our users.

I thought I just need to play around with adding the package paths to locations, or finding some other configuration, but no success so far.

@MHM01
Copy link

MHM01 commented Dec 25, 2019

Hello,
We’re looking for the same feature. Did you manage to get a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants