Skip to content

Commit f40c469

Browse files
committed
added codegen argument class and a new method to be implemented for languages classes.
1 parent 61d7047 commit f40c469

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
package io.swagger.codegen;
2+
3+
public class CodegenArgument {
4+
5+
private String option;
6+
private String shortOption;
7+
private String description;
8+
private String type;
9+
10+
public String getOption() {
11+
return option;
12+
}
13+
14+
public void setOption(String option) {
15+
this.option = option;
16+
}
17+
18+
public CodegenArgument option(String option) {
19+
this.option = option;
20+
return this;
21+
}
22+
23+
public String getShortOption() {
24+
return shortOption;
25+
}
26+
27+
public void setShortOption(String shortOption) {
28+
this.shortOption = shortOption;
29+
}
30+
31+
public CodegenArgument shortOption(String shortOption) {
32+
this.shortOption = shortOption;
33+
return this;
34+
}
35+
36+
public String getDescription() {
37+
return description;
38+
}
39+
40+
public void setDescription(String description) {
41+
this.description = description;
42+
}
43+
44+
public CodegenArgument description(String description) {
45+
this.description = description;
46+
return this;
47+
}
48+
49+
public String getType() {
50+
return type;
51+
}
52+
53+
public void setType(String type) {
54+
this.type = type;
55+
}
56+
57+
public CodegenArgument type(String type) {
58+
this.type = type;
59+
return this;
60+
}
61+
}

modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,6 @@ public interface CodegenConfig {
219219
String toGetter(String name);
220220

221221
void addHandlebarHelpers(Handlebars handlebars);
222+
223+
List<CodegenArgument> getLanguageArguments();
222224
}

modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3164,6 +3164,11 @@ public void addHandlebarHelpers(Handlebars handlebars) {
31643164
handlebars.registerHelper(HasNotHelper.NAME, new HasNotHelper());
31653165
}
31663166

3167+
@Override
3168+
public List<CodegenArgument> getLanguageArguments() {
3169+
return null;
3170+
}
3171+
31673172
/**
31683173
* Only write if the file doesn't exist
31693174
*

0 commit comments

Comments
 (0)