Skip to content
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

refs #9820 - Adding cookie parameter to operation for generation #9869

Merged
merged 1 commit into from
Nov 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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