Skip to content

Commit

Permalink
Merge pull request #8725 from swagger-api/issue-8696
Browse files Browse the repository at this point in the history
added fields, for test generated files, on codegen objects.
  • Loading branch information
HugoMario committed Sep 20, 2018
2 parents 75c6867 + 1924d22 commit d67e877
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
public class CodegenOperation extends CodegenObject {
public final List<CodegenProperty> responseHeaders = new ArrayList<CodegenProperty>();
public boolean returnTypeIsPrimitive, returnSimpleType, subresourceOperation;
public String path, operationId, returnType, httpMethod, returnBaseType,
returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse;
public String path, operationId, returnType, httpMethod, returnBaseType, returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse, testPath;
public Discriminator discriminator;
public List<Map<String, String>> consumes, produces, prioritizedContentTypes;
public CodegenParameter bodyParam;
Expand Down Expand Up @@ -353,6 +352,10 @@ public String getDefaultResponse() {
return defaultResponse;
}

public String getTestPath() {
return testPath;
}

public Discriminator getDiscriminator() {
return discriminator;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class CodegenParameter extends CodegenObject {
collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName;

public String example; // example value (x-example)
public String testExample;
public String jsonSchema;
public List<String> _enum;
public Map<String, Object> allowableValues;
Expand Down Expand Up @@ -120,6 +121,7 @@ public CodegenParameter copy() {
output.jsonSchema = this.jsonSchema;
output.defaultValue = this.defaultValue;
output.example = this.example;
output.testExample = this.testExample;
if (this._enum != null) {
output._enum = new ArrayList<String>(this._enum);
}
Expand Down Expand Up @@ -297,6 +299,10 @@ public String getExample() {
return example;
}

public String getTestExample() {
return testExample;
}

public String getJsonSchema() {
return jsonSchema;
}
Expand Down

0 comments on commit d67e877

Please sign in to comment.