forked from loafle/openapi-generator-original
DART: Removed the 'justIgnoreThisFlag' flag (#4116)
* feat[dart]: remove unused argument 'justIgnoreThisFlag' * chore[dart]: petstore rebuild
This commit is contained in:
parent
a2d924d863
commit
51b941cf88
@ -12,11 +12,7 @@ class {{classname}} {
|
|||||||
/// {{summary}}
|
/// {{summary}}
|
||||||
///
|
///
|
||||||
/// {{notes}}
|
/// {{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 {
|
{{#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 {
|
||||||
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).
|
|
||||||
}
|
|
||||||
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
|
@ -8,7 +8,7 @@ import com.google.common.collect.ImmutableMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class DartClientOptionsProvider implements OptionsProvider {
|
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 ENSURE_UNIQUE_PARAMS_VALUE = "true";
|
||||||
public static final String BROWSER_CLIENT_VALUE = "true";
|
public static final String BROWSER_CLIENT_VALUE = "true";
|
||||||
public static final String PUB_NAME_VALUE = "swagger";
|
public static final String PUB_NAME_VALUE = "swagger";
|
||||||
|
@ -10,11 +10,7 @@ class PetApi {
|
|||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future addPet(Pet body, { bool justIgnoreThisFlag: true}) async {
|
Future addPet(Pet body) 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).
|
|
||||||
}
|
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -65,11 +61,7 @@ class PetApi {
|
|||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future deletePet(int petId, { String apiKey, bool justIgnoreThisFlag: true}) async {
|
Future deletePet(int petId, { String apiKey }) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -121,11 +113,7 @@ class PetApi {
|
|||||||
/// Finds Pets by status
|
/// Finds Pets by status
|
||||||
///
|
///
|
||||||
/// Multiple status values can be provided with comma separated strings
|
/// Multiple status values can be provided with comma separated strings
|
||||||
Future<List<Pet>> findPetsByStatus(List<String> status, { bool justIgnoreThisFlag: true}) async {
|
Future<List<Pet>> findPetsByStatus(List<String> status) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -177,11 +165,7 @@ class PetApi {
|
|||||||
/// Finds Pets by tags
|
/// Finds Pets by tags
|
||||||
///
|
///
|
||||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
/// 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 {
|
Future<List<Pet>> findPetsByTags(List<String> tags) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -233,11 +217,7 @@ class PetApi {
|
|||||||
/// Find pet by ID
|
/// Find pet by ID
|
||||||
///
|
///
|
||||||
/// Returns a single pet
|
/// Returns a single pet
|
||||||
Future<Pet> getPetById(int petId, { bool justIgnoreThisFlag: true}) async {
|
Future<Pet> getPetById(int petId) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -288,11 +268,7 @@ class PetApi {
|
|||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future updatePet(Pet body, { bool justIgnoreThisFlag: true}) async {
|
Future updatePet(Pet body) 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).
|
|
||||||
}
|
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -343,11 +319,7 @@ class PetApi {
|
|||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future updatePetWithForm(int petId, { String name, String status, bool justIgnoreThisFlag: true}) async {
|
Future updatePetWithForm(int petId, { String name, String status }) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -412,11 +384,7 @@ if (status != null)
|
|||||||
/// uploads an image
|
/// uploads an image
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file, bool justIgnoreThisFlag: true}) async {
|
Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
|
@ -10,11 +10,7 @@ class StoreApi {
|
|||||||
/// Delete purchase order by ID
|
/// Delete purchase order by ID
|
||||||
///
|
///
|
||||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
Future deleteOrder(String orderId, { bool justIgnoreThisFlag: true}) async {
|
Future deleteOrder(String orderId) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -65,11 +61,7 @@ class StoreApi {
|
|||||||
/// Returns pet inventories by status
|
/// Returns pet inventories by status
|
||||||
///
|
///
|
||||||
/// Returns a map of status codes to quantities
|
/// Returns a map of status codes to quantities
|
||||||
Future<Map<String, int>> getInventory( { bool justIgnoreThisFlag: true}) async {
|
Future<Map<String, int>> getInventory() 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -117,11 +109,7 @@ class StoreApi {
|
|||||||
/// Find purchase order by ID
|
/// Find purchase order by ID
|
||||||
///
|
///
|
||||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
Future<Order> getOrderById(int orderId, { bool justIgnoreThisFlag: true}) async {
|
Future<Order> getOrderById(int orderId) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -172,11 +160,7 @@ class StoreApi {
|
|||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future<Order> placeOrder(Order body, { bool justIgnoreThisFlag: true}) async {
|
Future<Order> placeOrder(Order body) 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).
|
|
||||||
}
|
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
|
@ -10,11 +10,7 @@ class UserApi {
|
|||||||
/// Create user
|
/// Create user
|
||||||
///
|
///
|
||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
Future createUser(User body, { bool justIgnoreThisFlag: true}) async {
|
Future createUser(User body) 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).
|
|
||||||
}
|
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -65,11 +61,7 @@ class UserApi {
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future createUsersWithArrayInput(List<User> body, { bool justIgnoreThisFlag: true}) async {
|
Future createUsersWithArrayInput(List<User> body) 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).
|
|
||||||
}
|
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -120,11 +112,7 @@ class UserApi {
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future createUsersWithListInput(List<User> body, { bool justIgnoreThisFlag: true}) async {
|
Future createUsersWithListInput(List<User> body) 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).
|
|
||||||
}
|
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -175,11 +163,7 @@ class UserApi {
|
|||||||
/// Delete user
|
/// Delete user
|
||||||
///
|
///
|
||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
Future deleteUser(String username, { bool justIgnoreThisFlag: true}) async {
|
Future deleteUser(String username) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -230,11 +214,7 @@ class UserApi {
|
|||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future<User> getUserByName(String username, { bool justIgnoreThisFlag: true}) async {
|
Future<User> getUserByName(String username) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -285,11 +265,7 @@ class UserApi {
|
|||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future<String> loginUser(String username, String password, { bool justIgnoreThisFlag: true}) async {
|
Future<String> loginUser(String username, String password) 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -345,11 +321,7 @@ class UserApi {
|
|||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
Future logoutUser( { bool justIgnoreThisFlag: true}) async {
|
Future logoutUser() 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).
|
|
||||||
}
|
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
@ -397,11 +369,7 @@ class UserApi {
|
|||||||
/// Updated user
|
/// Updated user
|
||||||
///
|
///
|
||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
Future updateUser(String username, User body, { bool justIgnoreThisFlag: true}) async {
|
Future updateUser(String username, User body) 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).
|
|
||||||
}
|
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
// verify required params are set
|
// verify required params are set
|
||||||
|
Loading…
x
Reference in New Issue
Block a user