forked from loafle/openapi-generator-original
Fix CircleCI failures (#9503)
* Fix go-echo-server sample not running in CircleCI * remove wrong argument * [dart] Fix petstore sample tests & Multipart not working * follow up to #9392 * `MultipartRequest(null, null)` is no longer valid after `http` package upgrade * fix petstore sample project not compiling * disable live petstore tests * use template to strip out unused code blocks
This commit is contained in:
parent
93166dd6b5
commit
55b95bc9c5
@ -99,39 +99,37 @@ class {{{classname}}} {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[{{#authMethods}}'{{{name}}}'{{^-last}}, {{/-last}}{{/authMethods}}];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
{{#formParams}}
|
||||
{{^isFile}}
|
||||
if ({{{paramName}}} != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'{{{baseName}}}'] = parameterToString({{{paramName}}});
|
||||
}
|
||||
{{/isFile}}
|
||||
{{#isFile}}
|
||||
if ({{{paramName}}} != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'{{{baseName}}}'] = {{{paramName}}}.field;
|
||||
mp.files.add({{{paramName}}});
|
||||
}
|
||||
{{/isFile}}
|
||||
{{/formParams}}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
{{#formParams}}
|
||||
{{^isFile}}
|
||||
if ({{{paramName}}} != null) {
|
||||
formParams[r'{{{baseName}}}'] = parameterToString({{{paramName}}});
|
||||
}
|
||||
{{/isFile}}
|
||||
{{/formParams}}
|
||||
{{#isMultipart}}
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest('{{{httpMethod}}}', Uri.parse(path));
|
||||
{{#formParams}}
|
||||
{{^isFile}}
|
||||
if ({{{paramName}}} != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'{{{baseName}}}'] = parameterToString({{{paramName}}});
|
||||
}
|
||||
{{/isFile}}
|
||||
{{#isFile}}
|
||||
if ({{{paramName}}} != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'{{{baseName}}}'] = {{{paramName}}}.field;
|
||||
mp.files.add({{{paramName}}});
|
||||
}
|
||||
{{/isFile}}
|
||||
{{/formParams}}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
{{/isMultipart}}
|
||||
{{^isMultipart}}
|
||||
{{#formParams}}
|
||||
{{^isFile}}
|
||||
if ({{{paramName}}} != null) {
|
||||
formParams[r'{{{baseName}}}'] = parameterToString({{{paramName}}});
|
||||
}
|
||||
{{/isFile}}
|
||||
{{/formParams}}
|
||||
{{/isMultipart}}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -1,2 +0,0 @@
|
||||
analyzer:
|
||||
strong-mode: true
|
@ -1,13 +1,18 @@
|
||||
name: petstore_client
|
||||
version: 1.0.0
|
||||
description: Petstore client using OpenAPI library
|
||||
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: '>=2.5.0 <3.0.0'
|
||||
sdk: '>=2.11.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
openapi:
|
||||
path: ../petstore_client_lib
|
||||
|
||||
dev_dependencies:
|
||||
test: ^1.8.0
|
||||
mockito: ^4.1.1
|
||||
http: ^0.12.0
|
||||
http: ^0.13.0
|
||||
collection: ^1.14.12
|
||||
|
@ -21,9 +21,9 @@ class FakeClient extends Fake implements Client {
|
||||
this.expectedPutRequestBody,
|
||||
this.putResponseBody,
|
||||
this.sendResponseBody,
|
||||
this.expectedUrl,
|
||||
String expectedUrl,
|
||||
this.expectedHeaders = null,
|
||||
});
|
||||
}) : this.expectedUrl = Uri.parse(expectedUrl);
|
||||
|
||||
Exception throwException;
|
||||
Object expectedPostRequestBody;
|
||||
@ -34,12 +34,12 @@ class FakeClient extends Fake implements Client {
|
||||
String expectedPutRequestBody;
|
||||
String putResponseBody;
|
||||
String sendResponseBody;
|
||||
String expectedUrl;
|
||||
Uri expectedUrl;
|
||||
Map<String, String> expectedHeaders;
|
||||
|
||||
@override
|
||||
Future<Response> post(url,
|
||||
{Map<String, String> headers, body, Encoding encoding}) async {
|
||||
Future<Response> post(Uri url,
|
||||
{Map<String, String> headers, Object body, Encoding encoding}) async {
|
||||
// check that the request was made with expected values
|
||||
if (url != expectedUrl) {
|
||||
throw StateError(
|
||||
@ -67,7 +67,7 @@ class FakeClient extends Fake implements Client {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response> get(url, {Map<String, String> headers}) async {
|
||||
Future<Response> get(Uri url, {Map<String, String> headers}) async {
|
||||
// check that the request was made with expected values
|
||||
if (url != expectedUrl) {
|
||||
throw StateError(
|
||||
@ -85,7 +85,8 @@ class FakeClient extends Fake implements Client {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response> delete(url, {Map<String, String> headers}) async {
|
||||
Future<Response> delete(Uri url,
|
||||
{Map<String, String> headers, Object body, Encoding encoding}) async {
|
||||
// check that the request was made with expected values
|
||||
if (url != expectedUrl) {
|
||||
throw StateError(
|
||||
@ -103,8 +104,8 @@ class FakeClient extends Fake implements Client {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response> put(url,
|
||||
{Map<String, String> headers, body, Encoding encoding}) async {
|
||||
Future<Response> put(Uri url,
|
||||
{Map<String, String> headers, Object body, Encoding encoding}) async {
|
||||
// check that the request was made with expected values
|
||||
if (url != expectedUrl) {
|
||||
throw StateError(
|
||||
|
@ -2,8 +2,8 @@ import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('Check if default value is generated', () async {
|
||||
var order = Order();
|
||||
expect(order.complete, equals(false));
|
||||
});
|
||||
test('Check if default value is generated', () async {
|
||||
var order = Order();
|
||||
expect(order.complete, equals(false));
|
||||
});
|
||||
}
|
||||
|
@ -26,11 +26,10 @@ void main() {
|
||||
..id = 124321
|
||||
..name = 'Jose'
|
||||
];
|
||||
return Pet()
|
||||
return Pet(name: name)
|
||||
..id = id
|
||||
..category = category
|
||||
..tags = tags
|
||||
..name = name
|
||||
..status = PetStatusEnum.fromJson(status)
|
||||
..photoUrls = ['https://petstore.com/sample/photo1.jpg'];
|
||||
}
|
||||
@ -53,8 +52,7 @@ void main() {
|
||||
// use the pet api to add a pet
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet',
|
||||
expectedPostRequestBody:
|
||||
await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
postResponseBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedHeaders: {'Content-Type': 'application/json'});
|
||||
await petApi.addPet(newPet);
|
||||
@ -76,8 +74,7 @@ void main() {
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet/$id',
|
||||
throwException: ApiException(400, 'not found'),
|
||||
);
|
||||
expect(
|
||||
petApi.getPetById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
expect(petApi.getPetById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
});
|
||||
|
||||
test('deletes existing pet by id', () async {
|
||||
@ -87,8 +84,7 @@ void main() {
|
||||
// add a new pet
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet',
|
||||
expectedPostRequestBody:
|
||||
await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
postResponseBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedHeaders: {'Content-Type': 'application/json'});
|
||||
await petApi.addPet(newPet);
|
||||
@ -106,8 +102,7 @@ void main() {
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet/$id',
|
||||
throwException: ApiException(400, 'Not found'),
|
||||
);
|
||||
expect(
|
||||
petApi.getPetById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
expect(petApi.getPetById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
});
|
||||
|
||||
test('updates pet with form', () async {
|
||||
@ -117,16 +112,11 @@ void main() {
|
||||
// add a new pet
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet',
|
||||
expectedPostRequestBody:
|
||||
await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
postResponseBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedHeaders: {'Content-Type': 'application/json'});
|
||||
await petApi.addPet(newPet);
|
||||
|
||||
final multipartRequest = MultipartRequest(null, null);
|
||||
multipartRequest.fields['name'] = 'Doge';
|
||||
multipartRequest.fields['status'] = '';
|
||||
|
||||
// update with form
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet/$id',
|
||||
@ -157,8 +147,7 @@ void main() {
|
||||
// add a new pet
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet',
|
||||
expectedPostRequestBody:
|
||||
await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
postResponseBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedHeaders: {'Content-Type': 'application/json'});
|
||||
await petApi.addPet(newPet);
|
||||
@ -166,8 +155,7 @@ void main() {
|
||||
// update the same pet
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet',
|
||||
expectedPutRequestBody:
|
||||
await petApi.apiClient.serializeAsync(updatePet),
|
||||
expectedPutRequestBody: await petApi.apiClient.serializeAsync(updatePet),
|
||||
putResponseBody: await petApi.apiClient.serializeAsync(updatePet),
|
||||
expectedHeaders: {'Content-Type': 'application/json'});
|
||||
await petApi.updatePet(updatePet);
|
||||
@ -196,15 +184,13 @@ void main() {
|
||||
|
||||
// retrieve pets by status
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl:
|
||||
'http://petstore.swagger.io/v2/pet/findByStatus?status=$status',
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet/findByStatus?status=$status',
|
||||
getResponseBody: await petApi.apiClient.serializeAsync([pet1, pet2]),
|
||||
);
|
||||
final pets = await petApi.findPetsByStatus([status]);
|
||||
|
||||
// tests serialisation and deserialisation of enum
|
||||
final petsByStatus =
|
||||
pets.where((p) => p.status == PetStatusEnum.available);
|
||||
final petsByStatus = pets.where((p) => p.status == PetStatusEnum.available);
|
||||
expect(petsByStatus.length, equals(2));
|
||||
final petIds = pets.map((pet) => pet.id).toList();
|
||||
expect(petIds, contains(id1));
|
||||
@ -216,14 +202,12 @@ void main() {
|
||||
final id = newId();
|
||||
final newPet = makePet(id: id);
|
||||
// get some test data (recorded from live response)
|
||||
final uploadResponse =
|
||||
await File('test/file_upload_response.json').readAsString();
|
||||
final uploadResponse = await File('test/file_upload_response.json').readAsString();
|
||||
|
||||
// add a new pet
|
||||
petApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet',
|
||||
expectedPostRequestBody:
|
||||
await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
postResponseBody: await petApi.apiClient.serializeAsync(newPet),
|
||||
expectedHeaders: {'Content-Type': 'application/json'});
|
||||
await petApi.addPet(newPet);
|
||||
@ -232,9 +216,8 @@ void main() {
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/pet',
|
||||
sendResponseBody: uploadResponse,
|
||||
);
|
||||
final file =
|
||||
new MultipartFile.fromBytes('file', [104, 101, 108, 108, 111]);
|
||||
await petApi.uploadFile(id, additionalMetadata: '', file: file);
|
||||
final file = new MultipartFile.fromBytes('file', [104, 101, 108, 108, 111]);
|
||||
await petApi.uploadFile(id, file: file);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
|
||||
@Skip('Needs real petstore')
|
||||
import 'package:http/http.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
@ -46,16 +45,14 @@ void main() {
|
||||
});
|
||||
|
||||
test('doesn\'t get non-existing pet by id', () {
|
||||
expect(petApi.getPetById(newId()),
|
||||
throwsA(equals(TypeMatcher<ApiException>())));
|
||||
expect(petApi.getPetById(newId()), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
});
|
||||
|
||||
test('deletes existing pet by id', () async {
|
||||
var id = newId();
|
||||
await petApi.addPet(makePet(id: id));
|
||||
await petApi.deletePet(id, apiKey: 'special-key');
|
||||
expect(
|
||||
petApi.getPetById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
expect(petApi.getPetById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
});
|
||||
|
||||
test('updates pet with form', () async {
|
||||
@ -100,5 +97,5 @@ void main() {
|
||||
var file = new MultipartFile.fromBytes('file', [104, 101, 108, 108, 111]);
|
||||
await petApi.uploadFile(id, additionalMetadata: '', file: file);
|
||||
});
|
||||
}, skip: 'e2e tests for CI');
|
||||
});
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ final _random = new Random();
|
||||
|
||||
int newId() {
|
||||
return _random.nextInt(999999);
|
||||
}
|
||||
}
|
||||
|
@ -21,62 +21,56 @@ void main() {
|
||||
|
||||
group('Store API with faked client', () {
|
||||
test('places an order and gets it by id', () async {
|
||||
// TODO: Please uncomment this after a content type of the petstore order in petstore.yaml is fixed.
|
||||
// final id = newId();
|
||||
// final newOrder = makeOrder(id: id);
|
||||
final id = newId();
|
||||
final newOrder = makeOrder(id: id);
|
||||
|
||||
// // use the store api to add an order
|
||||
// storeApi.apiClient.client = FakeClient(
|
||||
// expectedUrl: 'http://petstore.swagger.io/v2/store/order',
|
||||
// expectedPostRequestBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
// postResponseBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
// expectedHeaders: {"Content-Type": "application/json"}
|
||||
// );
|
||||
// await storeApi.placeOrder(newOrder);
|
||||
// use the store api to add an order
|
||||
storeApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/store/order',
|
||||
expectedPostRequestBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
postResponseBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
expectedHeaders: {"Content-Type": "application/json"});
|
||||
await storeApi.placeOrder(newOrder);
|
||||
|
||||
// // retrieve the same order by id
|
||||
// storeApi.apiClient.client = FakeClient(
|
||||
// expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id',
|
||||
// getResponseBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
// );
|
||||
// final placedOrder = await storeApi.getOrderById(id);
|
||||
// expect(placedOrder.id, equals(id));
|
||||
// retrieve the same order by id
|
||||
storeApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id',
|
||||
getResponseBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
);
|
||||
final placedOrder = await storeApi.getOrderById(id);
|
||||
expect(placedOrder.id, equals(id));
|
||||
});
|
||||
|
||||
test('deletes an order', () async {
|
||||
// TODO: Please uncomment this after a content type of the petstore order in petstore.yaml is fixed.
|
||||
// final id = newId();
|
||||
// final newOrder = makeOrder(id: id);
|
||||
final id = newId();
|
||||
final newOrder = makeOrder(id: id);
|
||||
|
||||
// // use the store api to add an order
|
||||
// storeApi.apiClient.client = FakeClient(
|
||||
// expectedUrl: 'http://petstore.swagger.io/v2/store/order',
|
||||
// expectedPostRequestBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
// postResponseBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
// expectedHeaders: {"Content-Type": "application/json"}
|
||||
// );
|
||||
// await storeApi.placeOrder(newOrder);
|
||||
// use the store api to add an order
|
||||
storeApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/store/order',
|
||||
expectedPostRequestBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
postResponseBody: await storeApi.apiClient.serializeAsync(newOrder),
|
||||
expectedHeaders: {"Content-Type": "application/json"});
|
||||
await storeApi.placeOrder(newOrder);
|
||||
|
||||
// // delete the same order
|
||||
// storeApi.apiClient.client = FakeClient(
|
||||
// expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id',
|
||||
// deleteResponseBody: '',
|
||||
// );
|
||||
// await storeApi.deleteOrder(id.toString());
|
||||
// delete the same order
|
||||
storeApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id',
|
||||
deleteResponseBody: '',
|
||||
);
|
||||
await storeApi.deleteOrder(id.toString());
|
||||
|
||||
// // try and retrieve the order
|
||||
// storeApi.apiClient.client = FakeClient(
|
||||
// expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id',
|
||||
// throwException: ApiException(400, 'Not found'),
|
||||
// );
|
||||
// expect(storeApi.getOrderById(id),
|
||||
// throwsA(equals(TypeMatcher<ApiException>())));
|
||||
// try and retrieve the order
|
||||
storeApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id',
|
||||
throwException: ApiException(400, 'Not found'),
|
||||
);
|
||||
expect(storeApi.getOrderById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
});
|
||||
|
||||
test('gets the store inventory', () async {
|
||||
// get some test data (recorded from live response)
|
||||
final inventoryResponse =
|
||||
await File('test/inventory_response.json').readAsString();
|
||||
final inventoryResponse = await File('test/inventory_response.json').readAsString();
|
||||
// use the store api to get the inventory
|
||||
storeApi.apiClient.client = FakeClient(
|
||||
expectedUrl: 'http://petstore.swagger.io/v2/store/inventory',
|
||||
|
@ -1,3 +1,4 @@
|
||||
@Skip('Needs real petstore')
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
@ -18,27 +19,24 @@ void main() {
|
||||
|
||||
group('Store API with live client', () {
|
||||
test('places an order and gets it by id', () async {
|
||||
// TODO: Please uncomment this after a content type of the petstore order in petstore.yaml is fixed.
|
||||
// var id = newId();
|
||||
var id = newId();
|
||||
|
||||
// await storeApi.placeOrder(makeOrder(id: id));
|
||||
// var order = await storeApi.getOrderById(id);
|
||||
// expect(order.id, equals(id));
|
||||
await storeApi.placeOrder(makeOrder(id: id));
|
||||
var order = await storeApi.getOrderById(id);
|
||||
expect(order.id, equals(id));
|
||||
});
|
||||
|
||||
test('deletes an order', () async {
|
||||
// TODO: Please uncomment this after a content type of the petstore order in petstore.yaml is fixed.
|
||||
// var id = newId();
|
||||
var id = newId();
|
||||
|
||||
// await storeApi.placeOrder(makeOrder(id: id));
|
||||
// await storeApi.deleteOrder(id.toString());
|
||||
// expect(storeApi.getOrderById(id),
|
||||
// throwsA(equals(TypeMatcher<ApiException>())));
|
||||
await storeApi.placeOrder(makeOrder(id: id));
|
||||
await storeApi.deleteOrder(id.toString());
|
||||
expect(storeApi.getOrderById(id), throwsA(equals(TypeMatcher<ApiException>())));
|
||||
});
|
||||
|
||||
test('gets the store inventory', () async {
|
||||
Map<String, int> inventory = await storeApi.getInventory();
|
||||
expect(inventory.length, isNot(equals(0)));
|
||||
});
|
||||
}); // , skip: 'e2e tests for CI'
|
||||
});
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
@Skip('Needs real petstore')
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
@ -6,8 +7,7 @@ import 'random_id.dart';
|
||||
void main() {
|
||||
var userApi = new UserApi();
|
||||
|
||||
User makeUser(
|
||||
{int id, String userName = 'username', String password = 'password'}) {
|
||||
User makeUser({int id, String userName = 'username', String password = 'password'}) {
|
||||
return User()
|
||||
..id = id
|
||||
..username = userName
|
||||
@ -63,8 +63,7 @@ void main() {
|
||||
var username = 'Riddlem325';
|
||||
await userApi.createUser(makeUser(id: newId(), userName: username));
|
||||
await userApi.deleteUser(username);
|
||||
expect(userApi.getUserByName(username),
|
||||
throwsA(TypeMatcher<ApiException>()));
|
||||
expect(userApi.getUserByName(username), throwsA(TypeMatcher<ApiException>()));
|
||||
});
|
||||
|
||||
test('logs a user in', () async {
|
||||
@ -76,5 +75,5 @@ void main() {
|
||||
var result = await userApi.loginUser(username, password);
|
||||
expect(result, contains('logged in user session:'));
|
||||
});
|
||||
}, skip: 'e2e tests for CI');
|
||||
});
|
||||
}
|
||||
|
@ -41,17 +41,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -118,17 +107,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -187,17 +165,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -265,17 +232,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -342,17 +298,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -414,17 +359,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -491,30 +425,11 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (name != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'status'] = parameterToString(status);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (name != null) {
|
||||
formParams[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
formParams[r'status'] = parameterToString(status);
|
||||
}
|
||||
if (name != null) {
|
||||
formParams[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
formParams[r'status'] = parameterToString(status);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -581,28 +496,19 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (file != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'file'] = file.field;
|
||||
mp.files.add(file);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (additionalMetadata != null) {
|
||||
formParams[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest('POST', Uri.parse(path));
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (file != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'file'] = file.field;
|
||||
mp.files.add(file);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
|
@ -44,17 +44,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -101,17 +90,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -171,17 +149,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -243,17 +210,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -43,17 +43,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -108,17 +97,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -171,17 +149,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -237,17 +204,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -303,17 +259,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -382,17 +327,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -445,17 +379,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -512,17 +435,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -43,17 +43,6 @@ class AnotherFakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -29,17 +29,6 @@ class DefaultApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -31,17 +31,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -110,17 +99,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['http_signature_test'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -176,17 +154,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -243,17 +210,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -310,17 +266,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -377,17 +322,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -447,17 +381,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -516,17 +439,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -581,17 +493,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -645,17 +546,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -767,112 +657,44 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['http_basic_test'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (integer != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'integer'] = parameterToString(integer);
|
||||
}
|
||||
if (int32 != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'int32'] = parameterToString(int32);
|
||||
}
|
||||
if (int64 != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'int64'] = parameterToString(int64);
|
||||
}
|
||||
if (number != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'number'] = parameterToString(number);
|
||||
}
|
||||
if (float != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'float'] = parameterToString(float);
|
||||
}
|
||||
if (double_ != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'double'] = parameterToString(double_);
|
||||
}
|
||||
if (string != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'string'] = parameterToString(string);
|
||||
}
|
||||
if (patternWithoutDelimiter != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'pattern_without_delimiter'] = parameterToString(patternWithoutDelimiter);
|
||||
}
|
||||
if (byte != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'byte'] = parameterToString(byte);
|
||||
}
|
||||
if (binary != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'binary'] = binary.field;
|
||||
mp.files.add(binary);
|
||||
}
|
||||
if (date != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'date'] = parameterToString(date);
|
||||
}
|
||||
if (dateTime != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'dateTime'] = parameterToString(dateTime);
|
||||
}
|
||||
if (password != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (callback != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'callback'] = parameterToString(callback);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (integer != null) {
|
||||
formParams[r'integer'] = parameterToString(integer);
|
||||
}
|
||||
if (int32 != null) {
|
||||
formParams[r'int32'] = parameterToString(int32);
|
||||
}
|
||||
if (int64 != null) {
|
||||
formParams[r'int64'] = parameterToString(int64);
|
||||
}
|
||||
if (number != null) {
|
||||
formParams[r'number'] = parameterToString(number);
|
||||
}
|
||||
if (float != null) {
|
||||
formParams[r'float'] = parameterToString(float);
|
||||
}
|
||||
if (double_ != null) {
|
||||
formParams[r'double'] = parameterToString(double_);
|
||||
}
|
||||
if (string != null) {
|
||||
formParams[r'string'] = parameterToString(string);
|
||||
}
|
||||
if (patternWithoutDelimiter != null) {
|
||||
formParams[r'pattern_without_delimiter'] = parameterToString(patternWithoutDelimiter);
|
||||
}
|
||||
if (byte != null) {
|
||||
formParams[r'byte'] = parameterToString(byte);
|
||||
}
|
||||
if (date != null) {
|
||||
formParams[r'date'] = parameterToString(date);
|
||||
}
|
||||
if (dateTime != null) {
|
||||
formParams[r'dateTime'] = parameterToString(dateTime);
|
||||
}
|
||||
if (password != null) {
|
||||
formParams[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (callback != null) {
|
||||
formParams[r'callback'] = parameterToString(callback);
|
||||
}
|
||||
if (integer != null) {
|
||||
formParams[r'integer'] = parameterToString(integer);
|
||||
}
|
||||
if (int32 != null) {
|
||||
formParams[r'int32'] = parameterToString(int32);
|
||||
}
|
||||
if (int64 != null) {
|
||||
formParams[r'int64'] = parameterToString(int64);
|
||||
}
|
||||
if (number != null) {
|
||||
formParams[r'number'] = parameterToString(number);
|
||||
}
|
||||
if (float != null) {
|
||||
formParams[r'float'] = parameterToString(float);
|
||||
}
|
||||
if (double_ != null) {
|
||||
formParams[r'double'] = parameterToString(double_);
|
||||
}
|
||||
if (string != null) {
|
||||
formParams[r'string'] = parameterToString(string);
|
||||
}
|
||||
if (patternWithoutDelimiter != null) {
|
||||
formParams[r'pattern_without_delimiter'] = parameterToString(patternWithoutDelimiter);
|
||||
}
|
||||
if (byte != null) {
|
||||
formParams[r'byte'] = parameterToString(byte);
|
||||
}
|
||||
if (date != null) {
|
||||
formParams[r'date'] = parameterToString(date);
|
||||
}
|
||||
if (dateTime != null) {
|
||||
formParams[r'dateTime'] = parameterToString(dateTime);
|
||||
}
|
||||
if (password != null) {
|
||||
formParams[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (callback != null) {
|
||||
formParams[r'callback'] = parameterToString(callback);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -1007,30 +829,11 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (enumFormStringArray != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'enum_form_string_array'] = parameterToString(enumFormStringArray);
|
||||
}
|
||||
if (enumFormString != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'enum_form_string'] = parameterToString(enumFormString);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (enumFormStringArray != null) {
|
||||
formParams[r'enum_form_string_array'] = parameterToString(enumFormStringArray);
|
||||
}
|
||||
if (enumFormString != null) {
|
||||
formParams[r'enum_form_string'] = parameterToString(enumFormString);
|
||||
}
|
||||
if (enumFormStringArray != null) {
|
||||
formParams[r'enum_form_string_array'] = parameterToString(enumFormStringArray);
|
||||
}
|
||||
if (enumFormString != null) {
|
||||
formParams[r'enum_form_string'] = parameterToString(enumFormString);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -1144,17 +947,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer_test'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -1224,17 +1016,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -1293,30 +1074,11 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (param != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'param'] = parameterToString(param);
|
||||
}
|
||||
if (param2 != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'param2'] = parameterToString(param2);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (param != null) {
|
||||
formParams[r'param'] = parameterToString(param);
|
||||
}
|
||||
if (param2 != null) {
|
||||
formParams[r'param2'] = parameterToString(param2);
|
||||
}
|
||||
if (param != null) {
|
||||
formParams[r'param'] = parameterToString(param);
|
||||
}
|
||||
if (param2 != null) {
|
||||
formParams[r'param2'] = parameterToString(param2);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -1398,17 +1160,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -43,17 +43,6 @@ class FakeClassnameTags123Api {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key_query'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -41,17 +41,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -111,17 +100,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -180,17 +158,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -258,17 +225,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -335,17 +291,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -407,17 +352,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -477,30 +411,11 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (name != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'status'] = parameterToString(status);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (name != null) {
|
||||
formParams[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
formParams[r'status'] = parameterToString(status);
|
||||
}
|
||||
if (name != null) {
|
||||
formParams[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
formParams[r'status'] = parameterToString(status);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -567,28 +482,19 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (file != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'file'] = file.field;
|
||||
mp.files.add(file);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (additionalMetadata != null) {
|
||||
formParams[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest('POST', Uri.parse(path));
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (file != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'file'] = file.field;
|
||||
mp.files.add(file);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -665,28 +571,19 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (requiredFile != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'requiredFile'] = requiredFile.field;
|
||||
mp.files.add(requiredFile);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (additionalMetadata != null) {
|
||||
formParams[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest('POST', Uri.parse(path));
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (requiredFile != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'requiredFile'] = requiredFile.field;
|
||||
mp.files.add(requiredFile);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
|
@ -44,17 +44,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -101,17 +90,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -171,17 +149,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -243,17 +210,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -43,17 +43,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -108,17 +97,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -171,17 +149,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -237,17 +204,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -303,17 +259,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -382,17 +327,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -445,17 +379,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -512,17 +435,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -43,17 +43,6 @@ class AnotherFakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -29,17 +29,6 @@ class DefaultApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -31,17 +31,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -111,17 +100,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['http_signature_test'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -177,17 +155,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -245,17 +212,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -313,17 +269,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -381,17 +326,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -452,17 +386,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -522,17 +445,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -587,17 +499,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -651,17 +552,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -774,112 +664,44 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['http_basic_test'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (integer != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'integer'] = parameterToString(integer);
|
||||
}
|
||||
if (int32 != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'int32'] = parameterToString(int32);
|
||||
}
|
||||
if (int64 != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'int64'] = parameterToString(int64);
|
||||
}
|
||||
if (number != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'number'] = parameterToString(number);
|
||||
}
|
||||
if (float != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'float'] = parameterToString(float);
|
||||
}
|
||||
if (double_ != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'double'] = parameterToString(double_);
|
||||
}
|
||||
if (string != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'string'] = parameterToString(string);
|
||||
}
|
||||
if (patternWithoutDelimiter != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'pattern_without_delimiter'] = parameterToString(patternWithoutDelimiter);
|
||||
}
|
||||
if (byte != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'byte'] = parameterToString(byte);
|
||||
}
|
||||
if (binary != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'binary'] = binary.field;
|
||||
mp.files.add(binary);
|
||||
}
|
||||
if (date != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'date'] = parameterToString(date);
|
||||
}
|
||||
if (dateTime != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'dateTime'] = parameterToString(dateTime);
|
||||
}
|
||||
if (password != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (callback != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'callback'] = parameterToString(callback);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (integer != null) {
|
||||
formParams[r'integer'] = parameterToString(integer);
|
||||
}
|
||||
if (int32 != null) {
|
||||
formParams[r'int32'] = parameterToString(int32);
|
||||
}
|
||||
if (int64 != null) {
|
||||
formParams[r'int64'] = parameterToString(int64);
|
||||
}
|
||||
if (number != null) {
|
||||
formParams[r'number'] = parameterToString(number);
|
||||
}
|
||||
if (float != null) {
|
||||
formParams[r'float'] = parameterToString(float);
|
||||
}
|
||||
if (double_ != null) {
|
||||
formParams[r'double'] = parameterToString(double_);
|
||||
}
|
||||
if (string != null) {
|
||||
formParams[r'string'] = parameterToString(string);
|
||||
}
|
||||
if (patternWithoutDelimiter != null) {
|
||||
formParams[r'pattern_without_delimiter'] = parameterToString(patternWithoutDelimiter);
|
||||
}
|
||||
if (byte != null) {
|
||||
formParams[r'byte'] = parameterToString(byte);
|
||||
}
|
||||
if (date != null) {
|
||||
formParams[r'date'] = parameterToString(date);
|
||||
}
|
||||
if (dateTime != null) {
|
||||
formParams[r'dateTime'] = parameterToString(dateTime);
|
||||
}
|
||||
if (password != null) {
|
||||
formParams[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (callback != null) {
|
||||
formParams[r'callback'] = parameterToString(callback);
|
||||
}
|
||||
if (integer != null) {
|
||||
formParams[r'integer'] = parameterToString(integer);
|
||||
}
|
||||
if (int32 != null) {
|
||||
formParams[r'int32'] = parameterToString(int32);
|
||||
}
|
||||
if (int64 != null) {
|
||||
formParams[r'int64'] = parameterToString(int64);
|
||||
}
|
||||
if (number != null) {
|
||||
formParams[r'number'] = parameterToString(number);
|
||||
}
|
||||
if (float != null) {
|
||||
formParams[r'float'] = parameterToString(float);
|
||||
}
|
||||
if (double_ != null) {
|
||||
formParams[r'double'] = parameterToString(double_);
|
||||
}
|
||||
if (string != null) {
|
||||
formParams[r'string'] = parameterToString(string);
|
||||
}
|
||||
if (patternWithoutDelimiter != null) {
|
||||
formParams[r'pattern_without_delimiter'] = parameterToString(patternWithoutDelimiter);
|
||||
}
|
||||
if (byte != null) {
|
||||
formParams[r'byte'] = parameterToString(byte);
|
||||
}
|
||||
if (date != null) {
|
||||
formParams[r'date'] = parameterToString(date);
|
||||
}
|
||||
if (dateTime != null) {
|
||||
formParams[r'dateTime'] = parameterToString(dateTime);
|
||||
}
|
||||
if (password != null) {
|
||||
formParams[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (callback != null) {
|
||||
formParams[r'callback'] = parameterToString(callback);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -1014,30 +836,11 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (enumFormStringArray != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'enum_form_string_array'] = parameterToString(enumFormStringArray);
|
||||
}
|
||||
if (enumFormString != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'enum_form_string'] = parameterToString(enumFormString);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (enumFormStringArray != null) {
|
||||
formParams[r'enum_form_string_array'] = parameterToString(enumFormStringArray);
|
||||
}
|
||||
if (enumFormString != null) {
|
||||
formParams[r'enum_form_string'] = parameterToString(enumFormString);
|
||||
}
|
||||
if (enumFormStringArray != null) {
|
||||
formParams[r'enum_form_string_array'] = parameterToString(enumFormStringArray);
|
||||
}
|
||||
if (enumFormString != null) {
|
||||
formParams[r'enum_form_string'] = parameterToString(enumFormString);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -1151,17 +954,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer_test'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -1231,17 +1023,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -1300,30 +1081,11 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (param != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'param'] = parameterToString(param);
|
||||
}
|
||||
if (param2 != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'param2'] = parameterToString(param2);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (param != null) {
|
||||
formParams[r'param'] = parameterToString(param);
|
||||
}
|
||||
if (param2 != null) {
|
||||
formParams[r'param2'] = parameterToString(param2);
|
||||
}
|
||||
if (param != null) {
|
||||
formParams[r'param'] = parameterToString(param);
|
||||
}
|
||||
if (param2 != null) {
|
||||
formParams[r'param2'] = parameterToString(param2);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -1405,17 +1167,6 @@ class FakeApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -43,17 +43,6 @@ class FakeClassnameTags123Api {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key_query'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -41,17 +41,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -111,17 +100,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -180,17 +158,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -259,17 +226,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -337,17 +293,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -410,17 +355,6 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -480,30 +414,11 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (name != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'status'] = parameterToString(status);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (name != null) {
|
||||
formParams[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
formParams[r'status'] = parameterToString(status);
|
||||
}
|
||||
if (name != null) {
|
||||
formParams[r'name'] = parameterToString(name);
|
||||
}
|
||||
if (status != null) {
|
||||
formParams[r'status'] = parameterToString(status);
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -570,28 +485,19 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (file != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'file'] = file.field;
|
||||
mp.files.add(file);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (additionalMetadata != null) {
|
||||
formParams[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest('POST', Uri.parse(path));
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (file != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'file'] = file.field;
|
||||
mp.files.add(file);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
@ -669,28 +575,19 @@ class PetApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['petstore_auth'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (requiredFile != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'requiredFile'] = requiredFile.field;
|
||||
mp.files.add(requiredFile);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (additionalMetadata != null) {
|
||||
formParams[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest('POST', Uri.parse(path));
|
||||
if (additionalMetadata != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata);
|
||||
}
|
||||
if (requiredFile != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'requiredFile'] = requiredFile.field;
|
||||
mp.files.add(requiredFile);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
|
@ -44,17 +44,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -101,17 +90,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['api_key'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -172,17 +150,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -245,17 +212,6 @@ class StoreApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -43,17 +43,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -108,17 +97,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -171,17 +149,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -237,17 +204,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -303,17 +259,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -383,17 +328,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -447,17 +381,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
@ -514,17 +437,6 @@ class UserApi {
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>[];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
|
@ -35,7 +35,6 @@
|
||||
<configuration>
|
||||
<executable>go</executable>
|
||||
<arguments>
|
||||
<argument>go</argument>
|
||||
<argument>mod</argument>
|
||||
<argument>download</argument>
|
||||
</arguments>
|
||||
|
Loading…
x
Reference in New Issue
Block a user