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

Automatic class discovery from REST resources #20

Closed
mzuzcak opened this issue Dec 10, 2015 · 2 comments
Closed

Automatic class discovery from REST resources #20

mzuzcak opened this issue Dec 10, 2015 · 2 comments
Milestone

Comments

@mzuzcak
Copy link

mzuzcak commented Dec 10, 2015

please add automatic discovery of rest classes, based on consumed and produced classes from resources.

@vojtechhabarta
Copy link
Owner

Great idea.
For example from this REST resource class:

@Path("user")
public class UserResource {
    @GET
    public User getCurrentUser() {}
}

we can discover JSON class User.

But we need to first discover resource classes. This could be done using some classpath scanning library or maybe we can get list of resources from JAX-RS/Jersey.

Classpath scanning is slow but this feature is meant to be turned on by user so I think this is not a problem.

vojtechhabarta added a commit that referenced this issue Dec 17, 2015
@vojtechhabarta vojtechhabarta changed the title automatic class discovery Automatic class discovery from REST resources Dec 17, 2015
@vojtechhabarta vojtechhabarta added this to the 1.4 milestone Jan 12, 2016
@vojtechhabarta
Copy link
Owner

Implemented automatic discovery of JSON classes used in configured JAX-RS application (classesFromJaxrsApplication option). It is possible to exclude some resources or classes from processing using excludeClasses option. Also practical is to set sortTypeDeclarations option to sort generated interfaces alphabetically.

(part of 1.4.152 release)

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

2 participants