mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-08 00:20:51 +00:00
[dart][dart-dio] Fix failing master due to unstable test dependency (#8870)
* replace branch ref with commit ref (new release of http_mock_adapter coming soon)
This commit is contained in:
parent
950bb3d18f
commit
d31875f505
@ -13,7 +13,7 @@ dev_dependencies:
|
||||
http_mock_adapter:
|
||||
git:
|
||||
url: https://github.com/kuhnroyal/http-mock-adapter.git
|
||||
ref: feature/response-building
|
||||
ref: 2d7bb10369be49d3c53a6567cc76e8580b5d133d
|
||||
openapi:
|
||||
path: ../petstore_client_lib_fake
|
||||
test: 1.15.5
|
||||
|
@ -25,6 +25,7 @@ void main() {
|
||||
test('complete', () async {
|
||||
server.onPost(
|
||||
'/fake',
|
||||
(request) => request.reply(200, null),
|
||||
data: {
|
||||
'number': '3',
|
||||
'double': '-13.57',
|
||||
@ -42,7 +43,6 @@ void main() {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
'content-length': 255,
|
||||
},
|
||||
handler: (response) => response.reply(200, null),
|
||||
);
|
||||
|
||||
final response = await client.getFakeApi().testEndpointParameters(
|
||||
@ -65,6 +65,7 @@ void main() {
|
||||
test('minimal', () async {
|
||||
server.onPost(
|
||||
'/fake',
|
||||
(request) => request.reply(200, null),
|
||||
data: {
|
||||
'byte': '0',
|
||||
'double': '-13.57',
|
||||
@ -75,7 +76,6 @@ void main() {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
'content-length': 79,
|
||||
},
|
||||
handler: (response) => response.reply(200, null),
|
||||
);
|
||||
|
||||
final response = await client.getFakeApi().testEndpointParameters(
|
||||
@ -95,6 +95,7 @@ void main() {
|
||||
// form data in the body but some weird map
|
||||
server.onGet(
|
||||
'/fake',
|
||||
(request) => request.reply(200, null),
|
||||
data: {
|
||||
'enum_form_string': 'formString',
|
||||
'enum_form_string_array': '[foo, bar]',
|
||||
@ -102,7 +103,6 @@ void main() {
|
||||
headers: <String, dynamic>{
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
handler: (response) => response.reply(200, null),
|
||||
);
|
||||
|
||||
final response = await client.getFakeApi().testEnumParameters(
|
||||
|
@ -29,7 +29,7 @@ void main() {
|
||||
test('complete', () async {
|
||||
server.onGet(
|
||||
'/pet/5',
|
||||
handler: (response) => response.reply(200, {
|
||||
(request) => request.reply(200, {
|
||||
'id': 5,
|
||||
'name': 'Paula',
|
||||
'status': 'sold',
|
||||
@ -70,7 +70,7 @@ void main() {
|
||||
test('minimal', () async {
|
||||
server.onGet(
|
||||
'/pet/5',
|
||||
handler: (response) => response.reply(200, {
|
||||
(request) => request.reply(200, {
|
||||
'id': 5,
|
||||
'name': 'Paula',
|
||||
'photoUrls': <String>[],
|
||||
@ -94,6 +94,7 @@ void main() {
|
||||
test('complete', () async {
|
||||
server.onPost(
|
||||
'/pet',
|
||||
(request) => request.reply(200, ''),
|
||||
data: {
|
||||
'id': 5,
|
||||
'name': 'Paula',
|
||||
@ -121,7 +122,6 @@ void main() {
|
||||
'content-type': 'application/json',
|
||||
'content-length': 204,
|
||||
},
|
||||
handler: (response) => response.reply(200, ''),
|
||||
);
|
||||
|
||||
final response = await client.getPetApi().addPet(Pet((p) => p
|
||||
@ -147,6 +147,7 @@ void main() {
|
||||
test('minimal', () async {
|
||||
server.onPost(
|
||||
'/pet',
|
||||
(request) => request.reply(200, ''),
|
||||
data: {
|
||||
'id': 5,
|
||||
'name': 'Paula',
|
||||
@ -156,7 +157,6 @@ void main() {
|
||||
'content-type': 'application/json',
|
||||
'content-length': 38,
|
||||
},
|
||||
handler: (response) => response.reply(200, ''),
|
||||
);
|
||||
|
||||
final response = await client.getPetApi().addPet(Pet((p) => p
|
||||
@ -171,16 +171,7 @@ void main() {
|
||||
test('findByStatus', () async {
|
||||
server.onRoute(
|
||||
'/pet/findByStatus',
|
||||
request: Request(
|
||||
method: RequestMethods.GET,
|
||||
queryParameters: <String, dynamic>{
|
||||
'status': <String>[
|
||||
'available',
|
||||
'sold',
|
||||
],
|
||||
},
|
||||
),
|
||||
handler: (response) => response.reply(200, [
|
||||
(request) => request.reply(200, [
|
||||
{
|
||||
'id': 5,
|
||||
'name': 'Paula',
|
||||
@ -194,6 +185,15 @@ void main() {
|
||||
'photoUrls': <String>[],
|
||||
},
|
||||
]),
|
||||
request: Request(
|
||||
method: RequestMethods.GET,
|
||||
queryParameters: <String, dynamic>{
|
||||
'status': <String>[
|
||||
'available',
|
||||
'sold',
|
||||
],
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
final response = await client.getPetApi().findPetsByStatus(
|
||||
|
@ -24,14 +24,14 @@ void main() {
|
||||
|
||||
server.onGet(
|
||||
'/store/inventory',
|
||||
headers: <String, dynamic>{
|
||||
'api_key': 'SECRET_API_KEY',
|
||||
},
|
||||
handler: (response) => response.reply(200, {
|
||||
(request) => request.reply(200, {
|
||||
'foo': 5,
|
||||
'bar': 999,
|
||||
'baz': 0,
|
||||
}),
|
||||
headers: <String, dynamic>{
|
||||
'api_key': 'SECRET_API_KEY',
|
||||
},
|
||||
);
|
||||
|
||||
final response = await client.getStoreApi().getInventory();
|
||||
|
Loading…
x
Reference in New Issue
Block a user