|
@@ -4,7 +4,7 @@
|
4
|
4
|
import { request } from 'umi';
|
5
|
5
|
/** Update an existing pet PUT /pet */
|
6
|
6
|
|
7
|
|
-export async function updatePet(body, options) {
|
|
7
|
+export async function updatePet (body, options) {
|
8
|
8
|
return request('/pet', {
|
9
|
9
|
method: 'PUT',
|
10
|
10
|
headers: {
|
|
@@ -16,7 +16,7 @@ export async function updatePet(body, options) {
|
16
|
16
|
}
|
17
|
17
|
/** Add a new pet to the store POST /pet */
|
18
|
18
|
|
19
|
|
-export async function addPet(body, options) {
|
|
19
|
+export async function addPet (body, options) {
|
20
|
20
|
return request('/pet', {
|
21
|
21
|
method: 'POST',
|
22
|
22
|
headers: {
|
|
@@ -28,7 +28,7 @@ export async function addPet(body, options) {
|
28
|
28
|
}
|
29
|
29
|
/** Finds Pets by status Multiple status values can be provided with comma separated strings GET /pet/findByStatus */
|
30
|
30
|
|
31
|
|
-export async function findPetsByStatus(params, options) {
|
|
31
|
+export async function findPetsByStatus (params, options) {
|
32
|
32
|
return request('/pet/findByStatus', {
|
33
|
33
|
method: 'GET',
|
34
|
34
|
params: { ...params },
|
|
@@ -37,7 +37,7 @@ export async function findPetsByStatus(params, options) {
|
37
|
37
|
}
|
38
|
38
|
/** Finds Pets by tags Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. GET /pet/findByTags */
|
39
|
39
|
|
40
|
|
-export async function findPetsByTags(params, options) {
|
|
40
|
+export async function findPetsByTags (params, options) {
|
41
|
41
|
return request('/pet/findByTags', {
|
42
|
42
|
method: 'GET',
|
43
|
43
|
params: { ...params },
|
|
@@ -46,7 +46,7 @@ export async function findPetsByTags(params, options) {
|
46
|
46
|
}
|
47
|
47
|
/** Find pet by ID Returns a single pet GET /pet/${param0} */
|
48
|
48
|
|
49
|
|
-export async function getPetById(params, options) {
|
|
49
|
+export async function getPetById (params, options) {
|
50
|
50
|
const { petId: param0 } = params;
|
51
|
51
|
return request(`/pet/${param0}`, {
|
52
|
52
|
method: 'GET',
|
|
@@ -56,7 +56,7 @@ export async function getPetById(params, options) {
|
56
|
56
|
}
|
57
|
57
|
/** Updates a pet in the store with form data POST /pet/${param0} */
|
58
|
58
|
|
59
|
|
-export async function updatePetWithForm(params, body, options) {
|
|
59
|
+export async function updatePetWithForm (params, body, options) {
|
60
|
60
|
const { petId: param0 } = params;
|
61
|
61
|
const formData = new FormData();
|
62
|
62
|
Object.keys(body).forEach((ele) => {
|
|
@@ -78,7 +78,7 @@ export async function updatePetWithForm(params, body, options) {
|
78
|
78
|
}
|
79
|
79
|
/** Deletes a pet DELETE /pet/${param0} */
|
80
|
80
|
|
81
|
|
-export async function deletePet(params, options) {
|
|
81
|
+export async function deletePet (params, options) {
|
82
|
82
|
const { petId: param0 } = params;
|
83
|
83
|
return request(`/pet/${param0}`, {
|
84
|
84
|
method: 'DELETE',
|
|
@@ -88,7 +88,7 @@ export async function deletePet(params, options) {
|
88
|
88
|
}
|
89
|
89
|
/** uploads an image POST /pet/${param0}/uploadImage */
|
90
|
90
|
|
91
|
|
-export async function uploadFile(params, body, options) {
|
|
91
|
+export async function uploadFile (params, body, options) {
|
92
|
92
|
const { petId: param0 } = params;
|
93
|
93
|
const formData = new FormData();
|
94
|
94
|
Object.keys(body).forEach((ele) => {
|