diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenOperation.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenOperation.java index 7e18d3eb6a8..29a42c1ae89 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenOperation.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenOperation.java @@ -26,6 +26,7 @@ public class CodegenOperation extends CodegenObject { public List pathParams = new ArrayList(); public List queryParams = new ArrayList(); public List headerParams = new ArrayList(); + public List cookieParams = new ArrayList(); public List formParams = new ArrayList(); public List requiredParams = new ArrayList(); public List authMethods; @@ -76,6 +77,15 @@ public boolean getHasHeaderParams() { return nonempty(headerParams); } + /** + * Check if there's at least one cookie parameter + * + * @return true if cookie parameter exists, false otherwise + */ + public boolean getHasCookieParams() { + return nonempty(cookieParams); + } + /** * Check if there's at least one path parameter * @@ -292,6 +302,7 @@ public int hashCode() { result = 31 * result + (pathParams != null ? pathParams.hashCode() : 0); result = 31 * result + (queryParams != null ? queryParams.hashCode() : 0); result = 31 * result + (headerParams != null ? headerParams.hashCode() : 0); + result = 31 * result + (cookieParams != null ? cookieParams.hashCode() : 0); result = 31 * result + (formParams != null ? formParams.hashCode() : 0); result = 31 * result + (authMethods != null ? authMethods.hashCode() : 0); result = 31 * result + (tags != null ? tags.hashCode() : 0); @@ -403,6 +414,10 @@ public List getHeaderParams() { return headerParams; } + public List getCookieParams() { + return cookieParams; + } + public List getFormParams() { return formParams; }