diff --git a/packages/ts-axios/package.json b/packages/ts-axios/package.json index f020635..87ca1fa 100644 --- a/packages/ts-axios/package.json +++ b/packages/ts-axios/package.json @@ -1,6 +1,6 @@ { "name": "pastapi-ts-axios", - "version": "0.3.2", + "version": "0.3.3", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/packages/ts-axios/src/namespace.ts b/packages/ts-axios/src/namespace.ts index 979a7d1..b386d0f 100644 --- a/packages/ts-axios/src/namespace.ts +++ b/packages/ts-axios/src/namespace.ts @@ -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 (axios: AxiosInstance, vars: Variables, config?: AxiosRequestConfig<${ diff --git a/packages/ts-axios/test/api1/gen/client.ts b/packages/ts-axios/test/api1/gen/client.ts index 720e649..ca8a36b 100644 --- a/packages/ts-axios/test/api1/gen/client.ts +++ b/packages/ts-axios/test/api1/gen/client.ts @@ -53,8 +53,8 @@ export namespace GetUser { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -134,8 +134,8 @@ export namespace PostUser { }, params: {}, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -212,8 +212,8 @@ export namespace GetUserId { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -292,8 +292,8 @@ export namespace GetCookie { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -383,8 +383,8 @@ export namespace GetHeader { }, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -466,8 +466,8 @@ export namespace GetQuery { b: requestParamSchemas["b"].parse(vars.b), }, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -540,8 +540,8 @@ export namespace GetError { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < diff --git a/packages/ts-axios/test/petstore/gen/client.ts b/packages/ts-axios/test/petstore/gen/client.ts index 7860528..576b4ab 100644 --- a/packages/ts-axios/test/petstore/gen/client.ts +++ b/packages/ts-axios/test/petstore/gen/client.ts @@ -174,8 +174,8 @@ export namespace UpdatePet { }, params: {}, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -369,8 +369,8 @@ export namespace AddPet { }, params: {}, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -500,8 +500,8 @@ export namespace FindPetsByStatus { status: requestParamSchemas["status"].parse(vars.status), }, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -628,8 +628,8 @@ export namespace FindPetsByTags { tags: requestParamSchemas["tags"].parse(vars.tags), }, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -750,8 +750,8 @@ export namespace GetPetById { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -828,8 +828,8 @@ export namespace UpdatePetWithForm { status: requestParamSchemas["status"].parse(vars.status), }, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -903,8 +903,8 @@ export namespace DeletePet { }, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1000,8 +1000,8 @@ export namespace UploadFile { ), }, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1074,8 +1074,8 @@ export namespace GetInventory { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1196,8 +1196,8 @@ export namespace PlaceOrder { }, params: {}, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1294,8 +1294,8 @@ export namespace GetOrderById { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1365,8 +1365,8 @@ export namespace DeleteOrder { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1510,8 +1510,8 @@ export namespace CreateUser { }, params: {}, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1626,8 +1626,8 @@ export namespace CreateUsersWithListInput { }, params: {}, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1715,8 +1715,8 @@ export namespace LoginUser { password: requestParamSchemas["password"].parse(vars.password), }, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1782,8 +1782,8 @@ export namespace LogoutUser { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -1884,8 +1884,8 @@ export namespace GetUserByName { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -2002,8 +2002,8 @@ export namespace UpdateUser { }, params: {}, data: requestBodySchemas[vars.contentType].parse(vars.body), - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async < @@ -2073,8 +2073,8 @@ export namespace DeleteUser { headers: {}, params: {}, - ...config, validateStatus: () => true, + ...config, }); export const requestOk = async <