Skip to content

Commit 5eab2a0

Browse files
authored
Merge pull request #8644 from swagger-api/codegen-param-fix
refactored codegen param pojo
2 parents 73ea23e + 28ce6b4 commit 5eab2a0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenParameter.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.List;
77

88
public class CodegenParameter extends CodegenObject {
9-
public boolean secondaryParam, notFile;
9+
public boolean secondaryParam;
1010
public String baseName, paramName, dataType, datatypeWithEnum, dataFormat,
1111
collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName;
1212

@@ -94,7 +94,6 @@ public Boolean getIsBodyParam() {
9494

9595
public CodegenParameter copy() {
9696
CodegenParameter output = new CodegenParameter();
97-
output.notFile = this.notFile;
9897
output.secondaryParam = this.secondaryParam;
9998
output.baseName = this.baseName;
10099
output.paramName = this.paramName;
@@ -177,8 +176,6 @@ public boolean equals(Object o) {
177176
return false;
178177
if (jsonSchema != null ? !jsonSchema.equals(that.jsonSchema) : that.jsonSchema != null)
179178
return false;
180-
if (notFile != that.notFile)
181-
return false;
182179
if (_enum != null ? !_enum.equals(that._enum) : that._enum != null)
183180
return false;
184181
if (allowableValues != null ? !allowableValues.equals(that.allowableValues) : that.allowableValues != null)
@@ -229,7 +226,6 @@ public int hashCode() {
229226
result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0);
230227
result = 31 * result + (example != null ? example.hashCode() : 0);
231228
result = 31 * result + (jsonSchema != null ? jsonSchema.hashCode() : 0);
232-
result = 31 * result + (notFile ? 13:31);
233229
result = 31 * result + (_enum != null ? _enum.hashCode() : 0);
234230
result = 31 * result + (allowableValues != null ? allowableValues.hashCode() : 0);
235231
result = 31 * result + (items != null ? items.hashCode() : 0);
@@ -305,8 +301,8 @@ public String getJsonSchema() {
305301
return jsonSchema;
306302
}
307303

308-
public boolean getIsNotFile() {
309-
return notFile;
304+
public boolean getNotFile() {
305+
return !getIsFile();
310306
}
311307

312308
public List<String> get_enum() {

0 commit comments

Comments
 (0)