How to suppress the warnings in swagger generated code
We are using swagger.codegen.version 2.4.13 and getting some warnings in the generated code.
Is there a way to suppress these warnings so we can get a clean build?
Some of these warnings are:
api/server/RFC3339DateFormat.java:3: warning: [deprecation] ISO8601DateFormat in com.fasterxml.jackson.databind.util has been deprecated
import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
^
api/server/RFC3339DateFormat.java:4: warning: [deprecation] ISO8601Utils in com.fasterxml.jackson.databind.util has been deprecated
import com.fasterxml.jackson.databind.util.ISO8601Utils;
^
api/models/CommonCustomObject.java:27: warning: [serial] serializable class CommonCustomObject has no definition of serialVersionUID
public class CommonCustomObject extends HashMap<String, Object> {
^
api/models/ErrorModel.java:37: warning: [serial] serializable class ErrorModel has no definition of serialVersionUID
public class ErrorModel extends HashMap<String, Object> {
^
api/client/ApiClient.java:526: warning: [rawtypes] found raw type: Collection
public List<Pair> parameterToPairs(String collectionFormat, String name, Collection value) {
^
missing type arguments for generic class Collection<E>
where E is a type-variable:
E extends Object declared in interface Collection
api/client/ApiClient.java:959: warning: [cast] redundant cast to String
String contentType = (String) headerParams.get("Content-Type");
^
api/client/ApiException.java:20: warning: [serial] serializable class ApiException has no definition of serialVersionUID
public class ApiException extends Exception {
^
api/client/JSON.java:62: warning: [rawtypes] found raw type: Map
private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
^
missing type arguments for generic class Map<K,V>
where K,V are type-variables:
K extends Object declared in interface Map
V extends Object declared in interface Map
api/client/JSON.java:62: warning: [rawtypes] found raw type: Class
private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
^
missing type arguments for generic class Class<T>
where T is a type-variable:
T extends Object declared in class Class
api/client/JSON.java:63: warning: [rawtypes] found raw type: Class
Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase());
^
missing type arguments for generic class Class<T>
where T is a type-variable:
T extends Object declared in class Class
api/server/ApiException.java:4: warning: [serial] serializable class ApiException has no definition of serialVersionUID
public class ApiException extends Exception{
^
api/server/NotFoundException.java:4: warning: [serial] serializable class NotFoundException has no definition of serialVersionUID
public class NotFoundException extends ApiException {
^
api/server/RFC3339DateFormat.java:9: warning: [serial] serializable class RFC3339DateFormat has no definition of serialVersionUID
public class RFC3339DateFormat extends ISO8601DateFormat {
^
api/server/Bootstrap.java:13: warning: [serial] serializable class Bootstrap has no definition of serialVersionUID
public class Bootstrap extends HttpServlet {