
com.deepoove.swagger.diff.model.ChangedOperation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-diff Show documentation
Show all versions of swagger-diff Show documentation
diff swagger api documents
The newest version!
package com.deepoove.swagger.diff.model;
import java.util.ArrayList;
import java.util.List;
import io.swagger.models.parameters.Parameter;
public class ChangedOperation extends ChangedExtensionGroup implements Changed {
private String summary;
private List addParameters = new ArrayList();
private List missingParameters = new ArrayList();
private List changedParameter = new ArrayList();
private List addProps = new ArrayList();
private List missingProps = new ArrayList();
private List changedProps = new ArrayList();
public List getAddParameters() {
return addParameters;
}
public void setAddParameters(List addParameters) {
this.addParameters = addParameters;
}
public List getMissingParameters() {
return missingParameters;
}
public void setMissingParameters(List missingParameters) {
this.missingParameters = missingParameters;
}
public List getChangedParameter() {
return changedParameter;
}
public void setChangedParameter(List changedParameter) {
this.changedParameter = changedParameter;
}
public List getAddProps() {
return addProps;
}
public void setAddProps(List addProps) {
this.addProps = addProps;
}
public List getMissingProps() {
return missingProps;
}
public void setMissingProps(List missingProps) {
this.missingProps = missingProps;
}
public List getChangedProps() {
return changedProps;
}
public void setChangedProps(List changedProps) {
this.changedProps = changedProps;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public boolean isDiff() {
return !addParameters.isEmpty() || !missingParameters.isEmpty()
|| !changedParameter.isEmpty() || !addProps.isEmpty()
|| !missingProps.isEmpty() || vendorExtensionsAreDiff();
}
public boolean isDiffProp(){
return !addProps.isEmpty()
|| !missingProps.isEmpty()
|| !changedProps.isEmpty()
|| propVendorExtsAreDiff();
}
public boolean propVendorExtsAreDiff() {
boolean accumulator = false;
for (ElProperty prop : changedProps) {
accumulator = accumulator || prop.vendorExtensionsAreDiff();
}
return accumulator;
}
public boolean isDiffParam(){
return !addParameters.isEmpty() || !missingParameters.isEmpty()
|| !changedParameter.isEmpty();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy