Skip to content

Commit

Permalink
fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
1cedsoda committed Feb 2, 2024
1 parent ea1f747 commit 5c9308a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/ts-axios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pastapi-ts-axios",
"version": "0.3.2",
"version": "0.3.3",
"main": "dist/index",
"types": "dist/index",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/ts-axios/src/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ const operationNamespace = (o: Operation) => {
.join(",")}
},
${o.requestBodies.length > 0 ? `data: requestBodySchemas[vars.contentType].parse(vars.body),` : ``}
validateStatus: () => true
...config,
validateStatus: () => true,
...config
})
export const requestOk = async <REQ_B = RequestBody, RES_B_OK = ResponseBodyOk, RES_B_ERROR = ResponseBodyError>(axios: AxiosInstance, vars: Variables, config?: AxiosRequestConfig<${
Expand Down
14 changes: 7 additions & 7 deletions packages/ts-axios/test/api1/gen/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export namespace GetUser {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -134,8 +134,8 @@ export namespace PostUser {
},
params: {},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -212,8 +212,8 @@ export namespace GetUserId {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -292,8 +292,8 @@ export namespace GetCookie {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -383,8 +383,8 @@ export namespace GetHeader {
},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -466,8 +466,8 @@ export namespace GetQuery {
b: requestParamSchemas["b"].parse(vars.b),
},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -540,8 +540,8 @@ export namespace GetError {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down
38 changes: 19 additions & 19 deletions packages/ts-axios/test/petstore/gen/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ export namespace UpdatePet {
},
params: {},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -369,8 +369,8 @@ export namespace AddPet {
},
params: {},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -500,8 +500,8 @@ export namespace FindPetsByStatus {
status: requestParamSchemas["status"].parse(vars.status),
},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -628,8 +628,8 @@ export namespace FindPetsByTags {
tags: requestParamSchemas["tags"].parse(vars.tags),
},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -750,8 +750,8 @@ export namespace GetPetById {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -828,8 +828,8 @@ export namespace UpdatePetWithForm {
status: requestParamSchemas["status"].parse(vars.status),
},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -903,8 +903,8 @@ export namespace DeletePet {
},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1000,8 +1000,8 @@ export namespace UploadFile {
),
},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1074,8 +1074,8 @@ export namespace GetInventory {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1196,8 +1196,8 @@ export namespace PlaceOrder {
},
params: {},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1294,8 +1294,8 @@ export namespace GetOrderById {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1365,8 +1365,8 @@ export namespace DeleteOrder {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1510,8 +1510,8 @@ export namespace CreateUser {
},
params: {},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1626,8 +1626,8 @@ export namespace CreateUsersWithListInput {
},
params: {},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1715,8 +1715,8 @@ export namespace LoginUser {
password: requestParamSchemas["password"].parse(vars.password),
},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1782,8 +1782,8 @@ export namespace LogoutUser {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -1884,8 +1884,8 @@ export namespace GetUserByName {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -2002,8 +2002,8 @@ export namespace UpdateUser {
},
params: {},
data: requestBodySchemas[vars.contentType].parse(vars.body),
...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down Expand Up @@ -2073,8 +2073,8 @@ export namespace DeleteUser {
headers: {},
params: {},

...config,
validateStatus: () => true,
...config,
});

export const requestOk = async <
Expand Down

0 comments on commit 5c9308a

Please sign in to comment.