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

Class override in ApiResponseObject #38

Closed
fabiomaffioletti opened this Issue Nov 26, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@fabiomaffioletti
Owner

fabiomaffioletti commented Nov 26, 2014

Give the possibility to specify the response object as part of the @ApiResponseObject annotation. For example:

@ApiResponseObject(City.class)

letting it possible to annotate old school servlets:

@ApiMethod(path = "/implicitResponseObject", verb = ApiVerb.GET, description = "a-test-method")
@ApiResponseObject(City.class)
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
...
}

Use the JSONDocTypeBuilder class to build the return type. Please create JSONDocNullType and use it as default class in the annotation declaration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment