Skip to content

Commit

Permalink
refs #9820 - Adding cookie parameter to operation for generation
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Nov 16, 2019
1 parent dd30ea7 commit 5029241
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class CodegenOperation extends CodegenObject {
public List<CodegenParameter> pathParams = new ArrayList<CodegenParameter>();
public List<CodegenParameter> queryParams = new ArrayList<CodegenParameter>();
public List<CodegenParameter> headerParams = new ArrayList<CodegenParameter>();
public List<CodegenParameter> cookieParams = new ArrayList<CodegenParameter>();
public List<CodegenParameter> formParams = new ArrayList<CodegenParameter>();
public List<CodegenParameter> requiredParams = new ArrayList<CodegenParameter>();
public List<CodegenSecurity> authMethods;
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -403,6 +414,10 @@ public List<CodegenParameter> getHeaderParams() {
return headerParams;
}

public List<CodegenParameter> getCookieParams() {
return cookieParams;
}

public List<CodegenParameter> getFormParams() {
return formParams;
}
Expand Down

0 comments on commit 5029241

Please sign in to comment.