@@ -9,11 +9,10 @@ test('DocumentPrinter', () => {
99 const text = printer . print ( ) ;
1010 writeFile ( 'petStore3.types.txt' , text ) ;
1111 expect ( text ) . toMatchInlineSnapshot ( `
12- "import type { OneOf } from "openapi-axios/helpers"
13- import type { AxiosPromise, AxiosRequestConfig } from "axios";
14- import { DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, resolveURL } from "openapi-axios/helpers";
15- import axios from 'axios';
16- const request = axios.request;
12+ "import type { OneOf } from "pkg-name-for-test/client"
13+ import { DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, resolveURL } from "pkg-name-for-test/client";
14+ import type {AxiosRequestConfig, AxiosPromise} from "axios";
15+ import axios from "axios";
1716 const BASE_URL = "/api/v3";
1817 export type Address = {/**
1918 * @example Palo Alto
@@ -151,7 +150,7 @@ test('DocumentPrinter', () => {
151150 * @description Add a new pet to the store
152151 */
153152 export async function addPet(data:AddPetReqData, config?:AxiosRequestConfig): AxiosPromise<AddPetResData> {
154- return request ({
153+ return axios ({
155154 url: resolveURL(BASE_URL, \`/pet\`),
156155 method: POST,
157156 data,
@@ -166,7 +165,7 @@ test('DocumentPrinter', () => {
166165 * @description Update an existing pet by Id
167166 */
168167 export async function updatePet(data:UpdatePetReqData, config?:AxiosRequestConfig): AxiosPromise<UpdatePetResData> {
169- return request ({
168+ return axios ({
170169 url: resolveURL(BASE_URL, \`/pet\`),
171170 method: PUT,
172171 data,
@@ -184,7 +183,7 @@ test('DocumentPrinter', () => {
184183 * @description
185184 */
186185 export async function deletePet(path:DeletePetReqPath, config?:AxiosRequestConfig): AxiosPromise<never> {
187- return request ({
186+ return axios ({
188187 url: resolveURL(BASE_URL, \`/pet/\${path.petId}\`),
189188 method: DELETE,
190189 ...config
@@ -202,7 +201,7 @@ test('DocumentPrinter', () => {
202201 * @description Returns a single pet
203202 */
204203 export async function getPetById(path:GetPetByIdReqPath, config?:AxiosRequestConfig): AxiosPromise<GetPetByIdResData> {
205- return request ({
204+ return axios ({
206205 url: resolveURL(BASE_URL, \`/pet/\${path.petId}\`),
207206 method: GET,
208207 ...config
@@ -227,7 +226,7 @@ test('DocumentPrinter', () => {
227226 * @description
228227 */
229228 export async function updatePetWithForm(path:UpdatePetWithFormReqPath, params?:UpdatePetWithFormReqParams, config?:AxiosRequestConfig): AxiosPromise<never> {
230- return request ({
229+ return axios ({
231230 url: resolveURL(BASE_URL, \`/pet/\${path.petId}\`),
232231 method: POST,
233232 params,
@@ -251,7 +250,7 @@ test('DocumentPrinter', () => {
251250 * @description
252251 */
253252 export async function uploadFile(path:UploadFileReqPath, data:UploadFileReqData, params?:UploadFileReqParams, config?:AxiosRequestConfig): AxiosPromise<UploadFileResData> {
254- return request ({
253+ return axios ({
255254 url: resolveURL(BASE_URL, \`/pet/\${path.petId}/uploadImage\`),
256255 method: POST,
257256 params,
@@ -271,7 +270,7 @@ test('DocumentPrinter', () => {
271270 * @description Multiple status values can be provided with comma separated strings
272271 */
273272 export async function findPetsByStatus(params?:FindPetsByStatusReqParams, config?:AxiosRequestConfig): AxiosPromise<FindPetsByStatusResData> {
274- return request ({
273+ return axios ({
275274 url: resolveURL(BASE_URL, \`/pet/findByStatus\`),
276275 method: GET,
277276 params,
@@ -289,7 +288,7 @@ test('DocumentPrinter', () => {
289288 * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
290289 */
291290 export async function findPetsByTags(params?:FindPetsByTagsReqParams, config?:AxiosRequestConfig): AxiosPromise<FindPetsByTagsResData> {
292- return request ({
291+ return axios ({
293292 url: resolveURL(BASE_URL, \`/pet/findByTags\`),
294293 method: GET,
295294 params,
@@ -306,7 +305,7 @@ test('DocumentPrinter', () => {
306305 * @description Returns a map of status codes to quantities
307306 */
308307 export async function getInventory(config?:AxiosRequestConfig): AxiosPromise<GetInventoryResData> {
309- return request ({
308+ return axios ({
310309 url: resolveURL(BASE_URL, \`/store/inventory\`),
311310 method: GET,
312311 ...config
@@ -320,7 +319,7 @@ test('DocumentPrinter', () => {
320319 * @description Place a new order in the store
321320 */
322321 export async function placeOrder(data:PlaceOrderReqData, config?:AxiosRequestConfig): AxiosPromise<PlaceOrderResData> {
323- return request ({
322+ return axios ({
324323 url: resolveURL(BASE_URL, \`/store/order\`),
325324 method: POST,
326325 data,
@@ -338,7 +337,7 @@ test('DocumentPrinter', () => {
338337 * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
339338 */
340339 export async function deleteOrder(path:DeleteOrderReqPath, config?:AxiosRequestConfig): AxiosPromise<never> {
341- return request ({
340+ return axios ({
342341 url: resolveURL(BASE_URL, \`/store/order/\${path.orderId}\`),
343342 method: DELETE,
344343 ...config
@@ -356,7 +355,7 @@ test('DocumentPrinter', () => {
356355 * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.
357356 */
358357 export async function getOrderById(path:GetOrderByIdReqPath, config?:AxiosRequestConfig): AxiosPromise<GetOrderByIdResData> {
359- return request ({
358+ return axios ({
360359 url: resolveURL(BASE_URL, \`/store/order/\${path.orderId}\`),
361360 method: GET,
362361 ...config
@@ -369,7 +368,7 @@ test('DocumentPrinter', () => {
369368 * @description This can only be done by the logged in user.
370369 */
371370 export async function createUser(data:CreateUserReqData, config?:AxiosRequestConfig): AxiosPromise<never> {
372- return request ({
371+ return axios ({
373372 url: resolveURL(BASE_URL, \`/user\`),
374373 method: POST,
375374 data,
@@ -386,7 +385,7 @@ test('DocumentPrinter', () => {
386385 * @description This can only be done by the logged in user.
387386 */
388387 export async function deleteUser(path:DeleteUserReqPath, config?:AxiosRequestConfig): AxiosPromise<never> {
389- return request ({
388+ return axios ({
390389 url: resolveURL(BASE_URL, \`/user/\${path.username}\`),
391390 method: DELETE,
392391 ...config
@@ -403,7 +402,7 @@ test('DocumentPrinter', () => {
403402 * @description
404403 */
405404 export async function getUserByName(path:GetUserByNameReqPath, config?:AxiosRequestConfig): AxiosPromise<GetUserByNameResData> {
406- return request ({
405+ return axios ({
407406 url: resolveURL(BASE_URL, \`/user/\${path.username}\`),
408407 method: GET,
409408 ...config
@@ -420,7 +419,7 @@ test('DocumentPrinter', () => {
420419 * @description This can only be done by the logged in user.
421420 */
422421 export async function updateUser(path:UpdateUserReqPath, data:UpdateUserReqData, config?:AxiosRequestConfig): AxiosPromise<never> {
423- return request ({
422+ return axios ({
424423 url: resolveURL(BASE_URL, \`/user/\${path.username}\`),
425424 method: PUT,
426425 data,
@@ -435,7 +434,7 @@ test('DocumentPrinter', () => {
435434 * @description Creates list of users with given input array
436435 */
437436 export async function createUsersWithListInput(data?:CreateUsersWithListInputReqData, config?:AxiosRequestConfig): AxiosPromise<CreateUsersWithListInputResData> {
438- return request ({
437+ return axios ({
439438 url: resolveURL(BASE_URL, \`/user/createWithList\`),
440439 method: POST,
441440 data,
@@ -457,7 +456,7 @@ test('DocumentPrinter', () => {
457456 * @description
458457 */
459458 export async function loginUser(params?:LoginUserReqParams, config?:AxiosRequestConfig): AxiosPromise<LoginUserResData> {
460- return request ({
459+ return axios ({
461460 url: resolveURL(BASE_URL, \`/user/login\`),
462461 method: GET,
463462 params,
@@ -470,7 +469,7 @@ test('DocumentPrinter', () => {
470469 * @description
471470 */
472471 export async function logoutUser(config?:AxiosRequestConfig): AxiosPromise<never> {
473- return request ({
472+ return axios ({
474473 url: resolveURL(BASE_URL, \`/user/logout\`),
475474 method: GET,
476475 ...config
0 commit comments