Skip to content

Commit 61c717b

Browse files
committed
add comments
1 parent 8927c1d commit 61c717b

File tree

5 files changed

+11
-24
lines changed

5 files changed

+11
-24
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public String toApiFilename(String name) {
284284
}
285285

286286
/**
287-
* Return the file name of the Api
287+
* Return the file name of the Api Test
288288
*
289289
* @param name the file name of the Api
290290
* @return the file name of the Api
@@ -314,7 +314,7 @@ public String toModelFilename(String name) {
314314
}
315315

316316
/**
317-
* Return the capitalized file name of the model
317+
* Return the capitalized file name of the model test
318318
*
319319
* @param name the model name
320320
* @return the file name of the model
@@ -2071,6 +2071,14 @@ public String apiFilename(String templateName, String tag) {
20712071
return apiFileFolder() + '/' + toApiFilename(tag) + suffix;
20722072
}
20732073

2074+
/**
2075+
* Return the full path and API test file
2076+
*
2077+
* @param templateName template name
2078+
* @param tag tag
2079+
*
2080+
* @return the API test file name with full path
2081+
*/
20742082
public String apiTestFilename(String templateName, String tag) {
20752083
String suffix = apiTestTemplateFiles().get(templateName);
20762084
return apiTestFileFolder() + '/' + toApiTestFilename(tag) + suffix;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ public Reader getTemplate(String name) {
311311
files.add(new File(filename));
312312
}
313313

314+
// to generate api test files
314315
for (String templateName : config.apiTestTemplateFiles().keySet()) {
315316
String filename = config.apiTestFilename(templateName, tag);
316317
if (!config.shouldOverwrite(filename) && new File(filename).exists()) {

samples/client/petstore/php/SwaggerClient-php/lib/Tests/PetApiTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public static function tearDownAfterClass() {
7272
*
7373
*/
7474
public function test_updatePet() {
75-
//$body = null
7675

7776
}
7877

@@ -83,7 +82,6 @@ public function test_updatePet() {
8382
*
8483
*/
8584
public function test_addPet() {
86-
//$body = null
8785

8886
}
8987

@@ -94,7 +92,6 @@ public function test_addPet() {
9492
*
9593
*/
9694
public function test_findPetsByStatus() {
97-
//$status = null
9895

9996
}
10097

@@ -105,7 +102,6 @@ public function test_findPetsByStatus() {
105102
*
106103
*/
107104
public function test_findPetsByTags() {
108-
//$tags = null
109105

110106
}
111107

@@ -116,7 +112,6 @@ public function test_findPetsByTags() {
116112
*
117113
*/
118114
public function test_getPetById() {
119-
//$pet_id
120115

121116
}
122117

@@ -127,7 +122,6 @@ public function test_getPetById() {
127122
*
128123
*/
129124
public function test_updatePetWithForm() {
130-
//$pet_id, $name = null, $status = null
131125

132126
}
133127

@@ -138,7 +132,6 @@ public function test_updatePetWithForm() {
138132
*
139133
*/
140134
public function test_deletePet() {
141-
//$pet_id, $api_key = null
142135

143136
}
144137

@@ -149,7 +142,6 @@ public function test_deletePet() {
149142
*
150143
*/
151144
public function test_uploadFile() {
152-
//$pet_id, $additional_metadata = null, $file = null
153145

154146
}
155147

@@ -160,7 +152,6 @@ public function test_uploadFile() {
160152
*
161153
*/
162154
public function test_getPetByIdWithByteArray() {
163-
//$pet_id
164155

165156
}
166157

@@ -171,7 +162,6 @@ public function test_getPetByIdWithByteArray() {
171162
*
172163
*/
173164
public function test_addPetUsingByteArray() {
174-
//$body = null
175165

176166
}
177167

samples/client/petstore/php/SwaggerClient-php/lib/Tests/StoreApiTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public static function tearDownAfterClass() {
7272
*
7373
*/
7474
public function test_getInventory() {
75-
//
7675

7776
}
7877

@@ -83,7 +82,6 @@ public function test_getInventory() {
8382
*
8483
*/
8584
public function test_placeOrder() {
86-
//$body = null
8785

8886
}
8987

@@ -94,7 +92,6 @@ public function test_placeOrder() {
9492
*
9593
*/
9694
public function test_getOrderById() {
97-
//$order_id
9895

9996
}
10097

@@ -105,7 +102,6 @@ public function test_getOrderById() {
105102
*
106103
*/
107104
public function test_deleteOrder() {
108-
//$order_id
109105

110106
}
111107

samples/client/petstore/php/SwaggerClient-php/lib/Tests/UserApiTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public static function tearDownAfterClass() {
7272
*
7373
*/
7474
public function test_createUser() {
75-
//$body = null
7675

7776
}
7877

@@ -83,7 +82,6 @@ public function test_createUser() {
8382
*
8483
*/
8584
public function test_createUsersWithArrayInput() {
86-
//$body = null
8785

8886
}
8987

@@ -94,7 +92,6 @@ public function test_createUsersWithArrayInput() {
9492
*
9593
*/
9694
public function test_createUsersWithListInput() {
97-
//$body = null
9895

9996
}
10097

@@ -105,7 +102,6 @@ public function test_createUsersWithListInput() {
105102
*
106103
*/
107104
public function test_loginUser() {
108-
//$username = null, $password = null
109105

110106
}
111107

@@ -116,7 +112,6 @@ public function test_loginUser() {
116112
*
117113
*/
118114
public function test_logoutUser() {
119-
//
120115

121116
}
122117

@@ -127,7 +122,6 @@ public function test_logoutUser() {
127122
*
128123
*/
129124
public function test_getUserByName() {
130-
//$username
131125

132126
}
133127

@@ -138,7 +132,6 @@ public function test_getUserByName() {
138132
*
139133
*/
140134
public function test_updateUser() {
141-
//$username, $body = null
142135

143136
}
144137

@@ -149,7 +142,6 @@ public function test_updateUser() {
149142
*
150143
*/
151144
public function test_deleteUser() {
152-
//$username
153145

154146
}
155147

0 commit comments

Comments
 (0)