mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 00:21:19 +00:00
refactored to create separate serviceinterface, implementation and corresponding factory. JaxRs class uses the factory to find the implementation. Also fixed possibility for a code generator to control which API files that should be overwritten
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package {{package}}.impl;
|
||||
|
||||
import {{package}}.*;
|
||||
import {{modelPackage}}.*;
|
||||
|
||||
import com.sun.jersey.multipart.FormDataParam;
|
||||
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
|
||||
import java.util.List;
|
||||
import {{package}}.NotFoundException;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.sun.jersey.core.header.FormDataContentDisposition;
|
||||
import com.sun.jersey.multipart.FormDataParam;
|
||||
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
{{#operations}}
|
||||
public class {{classname}}ServiceImpl implements {{classname}}Service {
|
||||
{{#operation}}
|
||||
public Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}{{#hasMore}},{{/hasMore}}{{/allParams}})
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
||||
Reference in New Issue
Block a user