DART: Removed the 'justIgnoreThisFlag' flag (#4116)

* feat[dart]: remove unused argument 'justIgnoreThisFlag'

* chore[dart]: petstore rebuild
This commit is contained in:
ircecho 2016-11-04 12:17:23 +01:00 committed by wing328
parent a2d924d863
commit 51b941cf88
5 changed files with 22 additions and 106 deletions

View File

@ -12,11 +12,7 @@ class {{classname}} {
/// {{summary}}
///
/// {{notes}}
{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}, {{/required}}{{/allParams}} { {{#allParams}}{{^required}} {{{dataType}}} {{paramName}}, {{/required}}{{/allParams}} bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async {
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
// verify required params are set

View File

@ -8,7 +8,7 @@ import com.google.common.collect.ImmutableMap;
import java.util.Map;
public class DartClientOptionsProvider implements OptionsProvider {
public static final String SORT_PARAMS_VALUE = "false";
public static final String SORT_PARAMS_VALUE = "true";
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
public static final String BROWSER_CLIENT_VALUE = "true";
public static final String PUB_NAME_VALUE = "swagger";

View File

@ -10,11 +10,7 @@ class PetApi {
/// Add a new pet to the store
///
///
Future addPet(Pet body, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future addPet(Pet body) async {
Object postBody = body;
// verify required params are set
@ -65,11 +61,7 @@ class PetApi {
/// Deletes a pet
///
///
Future deletePet(int petId, { String apiKey, bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future deletePet(int petId, { String apiKey }) async {
Object postBody = null;
// verify required params are set
@ -121,11 +113,7 @@ class PetApi {
/// Finds Pets by status
///
/// Multiple status values can be provided with comma separated strings
Future<List<Pet>> findPetsByStatus(List<String> status, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<List<Pet>> findPetsByStatus(List<String> status) async {
Object postBody = null;
// verify required params are set
@ -177,11 +165,7 @@ class PetApi {
/// Finds Pets by tags
///
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
Future<List<Pet>> findPetsByTags(List<String> tags, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<List<Pet>> findPetsByTags(List<String> tags) async {
Object postBody = null;
// verify required params are set
@ -233,11 +217,7 @@ class PetApi {
/// Find pet by ID
///
/// Returns a single pet
Future<Pet> getPetById(int petId, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<Pet> getPetById(int petId) async {
Object postBody = null;
// verify required params are set
@ -288,11 +268,7 @@ class PetApi {
/// Update an existing pet
///
///
Future updatePet(Pet body, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future updatePet(Pet body) async {
Object postBody = body;
// verify required params are set
@ -343,11 +319,7 @@ class PetApi {
/// Updates a pet in the store with form data
///
///
Future updatePetWithForm(int petId, { String name, String status, bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future updatePetWithForm(int petId, { String name, String status }) async {
Object postBody = null;
// verify required params are set
@ -412,11 +384,7 @@ if (status != null)
/// uploads an image
///
///
Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file, bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async {
Object postBody = null;
// verify required params are set

View File

@ -10,11 +10,7 @@ class StoreApi {
/// Delete purchase order by ID
///
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
Future deleteOrder(String orderId, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future deleteOrder(String orderId) async {
Object postBody = null;
// verify required params are set
@ -65,11 +61,7 @@ class StoreApi {
/// Returns pet inventories by status
///
/// Returns a map of status codes to quantities
Future<Map<String, int>> getInventory( { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<Map<String, int>> getInventory() async {
Object postBody = null;
// verify required params are set
@ -117,11 +109,7 @@ class StoreApi {
/// Find purchase order by ID
///
/// For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
Future<Order> getOrderById(int orderId, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<Order> getOrderById(int orderId) async {
Object postBody = null;
// verify required params are set
@ -172,11 +160,7 @@ class StoreApi {
/// Place an order for a pet
///
///
Future<Order> placeOrder(Order body, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<Order> placeOrder(Order body) async {
Object postBody = body;
// verify required params are set

View File

@ -10,11 +10,7 @@ class UserApi {
/// Create user
///
/// This can only be done by the logged in user.
Future createUser(User body, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future createUser(User body) async {
Object postBody = body;
// verify required params are set
@ -65,11 +61,7 @@ class UserApi {
/// Creates list of users with given input array
///
///
Future createUsersWithArrayInput(List<User> body, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future createUsersWithArrayInput(List<User> body) async {
Object postBody = body;
// verify required params are set
@ -120,11 +112,7 @@ class UserApi {
/// Creates list of users with given input array
///
///
Future createUsersWithListInput(List<User> body, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future createUsersWithListInput(List<User> body) async {
Object postBody = body;
// verify required params are set
@ -175,11 +163,7 @@ class UserApi {
/// Delete user
///
/// This can only be done by the logged in user.
Future deleteUser(String username, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future deleteUser(String username) async {
Object postBody = null;
// verify required params are set
@ -230,11 +214,7 @@ class UserApi {
/// Get user by user name
///
///
Future<User> getUserByName(String username, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<User> getUserByName(String username) async {
Object postBody = null;
// verify required params are set
@ -285,11 +265,7 @@ class UserApi {
/// Logs user into the system
///
///
Future<String> loginUser(String username, String password, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future<String> loginUser(String username, String password) async {
Object postBody = null;
// verify required params are set
@ -345,11 +321,7 @@ class UserApi {
/// Logs out current logged in user session
///
///
Future logoutUser( { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future logoutUser() async {
Object postBody = null;
// verify required params are set
@ -397,11 +369,7 @@ class UserApi {
/// Updated user
///
/// This can only be done by the logged in user.
Future updateUser(String username, User body, { bool justIgnoreThisFlag: true}) async {
if (!justIgnoreThisFlag) {
print('Why??? Just trust me, I only need this variable inside the mustache codegen template.');
// This code may be removed as soon as dart accepts trailing spaces (has already been implemented).
}
Future updateUser(String username, User body) async {
Object postBody = body;
// verify required params are set