From d729470b74121eef6776649654921ce61b35da51 Mon Sep 17 00:00:00 2001 From: Stijn Van Hulle Date: Fri, 24 Nov 2023 18:56:27 +0100 Subject: [PATCH] feat: mapper and schemaTransformer (#676) * feat: mapper and schemaTransformer * feat: use of Query and Mutation omponent for swagger-faker * feat: add 'root' to KubbFile.Import * chore: update ts and zod package with React components * chore: update examples * chore: camelcase/pascalcase transformers * chore: fixes * chore: pack updates * feat: transformers subpackage * chore: cleanup * chore: jsdoc with tsFactory * chore: fix snap * chore(zod): example for mapper --- .changeset/bright-needles-move.md | 5 + .changeset/khaki-crews-act.md | 5 + .changeset/large-melons-try.md | 5 + .changeset/lucky-moles-travel.md | 5 + .changeset/old-pandas-teach.md | 2 +- .changeset/swift-eagles-raise.md | 6 + configs/vitest.config.ts | 1 + docs/guide/introduction.md | 2 +- docs/package.json | 4 +- eslint.config.js | 1 + .../gen/clients/axios/petService/addPet.ts | 3 +- .../gen/clients/axios/petService/deletePet.ts | 3 +- .../axios/petService/findPetsByStatus.ts | 3 +- .../axios/petService/findPetsByTags.ts | 3 +- .../clients/axios/petService/getPetById.ts | 3 +- .../gen/clients/axios/petService/updatePet.ts | 3 +- .../axios/petService/updatePetWithForm.ts | 3 +- .../clients/axios/petService/uploadFile.ts | 3 +- .../clients/axios/petsService/createPets.ts | 3 +- .../clients/axios/userService/createUser.ts | 3 +- .../userService/createUsersWithListInput.ts | 3 +- .../clients/axios/userService/deleteUser.ts | 3 +- .../axios/userService/getUserByName.ts | 3 +- .../clients/axios/userService/loginUser.ts | 3 +- .../clients/axios/userService/logoutUser.ts | 3 +- .../clients/axios/userService/updateUser.ts | 3 +- .../clients/hooks/petController/useAddPet.ts | 3 +- .../hooks/petController/useDeletePet.ts | 3 +- .../petController/useFindPetsByStatus.ts | 15 +- .../hooks/petController/useFindPetsByTags.ts | 15 +- .../hooks/petController/useGetPetById.ts | 15 +- .../hooks/petController/useUpdatePet.ts | 3 +- .../petController/useUpdatePetWithForm.ts | 3 +- .../hooks/petController/useUploadFile.ts | 3 +- .../hooks/petsController/useCreatePets.ts | 3 +- .../hooks/userController/useCreateUser.ts | 3 +- .../useCreateUsersWithListInput.ts | 3 +- .../hooks/userController/useDeleteUser.ts | 3 +- .../hooks/userController/useGetUserByName.ts | 15 +- .../hooks/userController/useLoginUser.ts | 15 +- .../hooks/userController/useLogoutUser.ts | 15 +- .../hooks/userController/useUpdateUser.ts | 3 +- .../clients/swr/petSWRController/useAddPet.ts | 3 +- .../swr/petSWRController/useDeletePet.ts | 3 +- .../petSWRController/useFindPetsByStatus.ts | 7 +- .../swr/petSWRController/useFindPetsByTags.ts | 7 +- .../swr/petSWRController/useGetPetById.ts | 7 +- .../swr/petSWRController/useUpdatePet.ts | 3 +- .../petSWRController/useUpdatePetWithForm.ts | 3 +- .../swr/petSWRController/useUploadFile.ts | 3 +- .../swr/petsSWRController/useCreatePets.ts | 3 +- .../swr/userSWRController/useCreateUser.ts | 3 +- .../useCreateUsersWithListInput.ts | 3 +- .../swr/userSWRController/useDeleteUser.ts | 3 +- .../swr/userSWRController/useGetUserByName.ts | 7 +- .../swr/userSWRController/useLoginUser.ts | 7 +- .../swr/userSWRController/useLogoutUser.ts | 7 +- .../swr/userSWRController/useUpdateUser.ts | 3 +- .../src/gen/mocks/createAddPetRequest.ts | 5 +- .../advanced/src/gen/mocks/createAddress.ts | 3 +- .../src/gen/mocks/createApiResponse.ts | 3 +- .../advanced/src/gen/mocks/createCategory.ts | 3 +- .../advanced/src/gen/mocks/createCustomer.ts | 5 +- .../advanced/src/gen/mocks/createOrder.ts | 3 +- examples/advanced/src/gen/mocks/createPet.ts | 5 +- .../src/gen/mocks/createPetNotFound.ts | 3 +- examples/advanced/src/gen/mocks/createTag.ts | 3 +- examples/advanced/src/gen/mocks/createUser.ts | 3 +- .../advanced/src/gen/mocks/createUserArray.ts | 5 +- .../gen/mocks/petController/createAddPet.ts | 7 +- .../mocks/petController/createDeletePet.ts | 6 +- .../petController/createFindPetsByStatus.ts | 6 +- .../petController/createFindPetsByTags.ts | 12 +- .../mocks/petController/createGetPetById.ts | 8 +- .../mocks/petController/createUpdatePet.ts | 10 +- .../petController/createUpdatePetWithForm.ts | 11 +- .../mocks/petController/createUploadFile.ts | 12 +- .../mocks/petsController/createCreatePets.ts | 18 +- .../mocks/userController/createCreateUser.ts | 6 +- .../createCreateUsersWithListInput.ts | 10 +- .../mocks/userController/createDeleteUser.ts | 7 +- .../userController/createGetUserByName.ts | 8 +- .../mocks/userController/createLoginUser.ts | 6 +- .../mocks/userController/createLogoutUser.ts | 3 +- .../mocks/userController/createUpdateUser.ts | 7 +- .../src/gen/models/ts/petController/AddPet.ts | 1 - .../gen/models/ts/petController/DeletePet.ts | 1 - .../ts/petController/FindPetsByStatus.ts | 1 - .../models/ts/petController/FindPetsByTags.ts | 1 - .../gen/models/ts/petController/GetPetById.ts | 1 - .../gen/models/ts/petController/UpdatePet.ts | 1 - .../ts/petController/UpdatePetWithForm.ts | 1 - .../gen/models/ts/petController/UploadFile.ts | 1 - .../models/ts/petsController/CreatePets.ts | 1 - .../models/ts/storeController/DeleteOrder.ts | 1 - .../models/ts/storeController/GetInventory.ts | 1 - .../models/ts/storeController/GetOrderById.ts | 1 - .../models/ts/storeController/PlaceOrder.ts | 1 - .../ts/storeController/PlaceOrderPatch.ts | 1 - .../models/ts/userController/CreateUser.ts | 1 - .../CreateUsersWithListInput.ts | 1 - .../models/ts/userController/DeleteUser.ts | 1 - .../models/ts/userController/GetUserByName.ts | 1 - .../gen/models/ts/userController/LoginUser.ts | 1 - .../models/ts/userController/LogoutUser.ts | 1 - .../models/ts/userController/UpdateUser.ts | 1 - .../src/gen/zod/addPetRequestSchema.ts | 3 +- .../advanced/src/gen/zod/customerSchema.ts | 3 +- .../src/gen/zod/petController/addPetSchema.ts | 1 - .../petController/findPetsByStatusSchema.ts | 1 - .../zod/petController/findPetsByTagsSchema.ts | 1 - .../gen/zod/petController/getPetByIdSchema.ts | 1 - .../gen/zod/petController/updatePetSchema.ts | 1 - .../gen/zod/petController/uploadFileSchema.ts | 1 - examples/advanced/src/gen/zod/petSchema.ts | 3 +- .../zod/petsController/createPetsSchema.ts | 1 - .../advanced/src/gen/zod/userArraySchema.ts | 3 +- .../zod/userController/createUserSchema.ts | 1 - .../createUsersWithListInputSchema.ts | 1 - .../zod/userController/getUserByNameSchema.ts | 1 - .../zod/userController/updateUserSchema.ts | 1 - examples/advanced/src/gen/zodios.ts | 16 +- .../gen/clients/axios/petService/addPet.ts | 3 +- .../gen/clients/axios/petService/deletePet.ts | 3 +- .../axios/petService/findPetsByStatus.ts | 3 +- .../axios/petService/findPetsByTags.ts | 3 +- .../clients/axios/petService/getPetById.ts | 3 +- .../gen/clients/axios/petService/updatePet.ts | 3 +- .../axios/petService/updatePetWithForm.ts | 3 +- .../clients/axios/petService/uploadFile.ts | 3 +- .../clients/axios/petsService/createPets.ts | 3 +- .../clients/axios/userService/createUser.ts | 3 +- .../userService/createUsersWithListInput.ts | 3 +- .../clients/axios/userService/deleteUser.ts | 3 +- .../axios/userService/getUserByName.ts | 3 +- .../clients/axios/userService/loginUser.ts | 3 +- .../clients/axios/userService/logoutUser.ts | 3 +- .../clients/axios/userService/updateUser.ts | 3 +- .../src/gen/models/ts/petController/AddPet.ts | 1 - .../gen/models/ts/petController/DeletePet.ts | 1 - .../ts/petController/FindPetsByStatus.ts | 1 - .../models/ts/petController/FindPetsByTags.ts | 1 - .../gen/models/ts/petController/GetPetById.ts | 1 - .../gen/models/ts/petController/UpdatePet.ts | 1 - .../ts/petController/UpdatePetWithForm.ts | 1 - .../gen/models/ts/petController/UploadFile.ts | 1 - .../models/ts/petsController/CreatePets.ts | 1 - .../models/ts/storeController/DeleteOrder.ts | 1 - .../models/ts/storeController/GetInventory.ts | 1 - .../models/ts/storeController/GetOrderById.ts | 1 - .../models/ts/storeController/PlaceOrder.ts | 1 - .../ts/storeController/PlaceOrderPatch.ts | 1 - .../models/ts/userController/CreateUser.ts | 1 - .../CreateUsersWithListInput.ts | 1 - .../models/ts/userController/DeleteUser.ts | 1 - .../models/ts/userController/GetUserByName.ts | 1 - .../gen/models/ts/userController/LoginUser.ts | 1 - .../models/ts/userController/LogoutUser.ts | 1 - .../models/ts/userController/UpdateUser.ts | 1 - examples/faker/kubb.config.js | 49 +- .../src/gen/customMocks/createAddress.ts | 12 + .../src/gen/customMocks/createApiResponse.ts | 6 + .../src/gen/customMocks/createCategory.ts | 6 + .../src/gen/customMocks/createCustomer.ts | 7 + .../faker/src/gen/customMocks/createOrder.ts | 13 + .../faker/src/gen/customMocks/createPet.ts | 15 + .../faker/src/gen/customMocks/createTag.ts | 6 + .../createUpdatePet.ts | 12 +- .../createUpdatePetWithForm.ts | 15 +- .../faker/src/gen/customMocks/createUser.ts | 15 + .../{mocks => customMocks}/createUserArray.ts | 5 +- .../src/gen/{mocks => customMocks}/index.ts | 5 +- examples/faker/src/gen/index.ts | 2 +- examples/faker/src/gen/mocks/createAddress.ts | 13 - .../faker/src/gen/mocks/createApiResponse.ts | 7 - .../faker/src/gen/mocks/createCategory.ts | 7 - .../faker/src/gen/mocks/createCustomer.ts | 8 - examples/faker/src/gen/mocks/createOrder.ts | 14 - examples/faker/src/gen/mocks/createPet.ts | 16 - examples/faker/src/gen/mocks/createTag.ts | 7 - examples/faker/src/gen/mocks/createUser.ts | 16 - .../src/gen/mocks/petMocks/createAddPet.ts | 28 - .../src/gen/mocks/petMocks/createDeletePet.ts | 26 - .../mocks/petMocks/createFindPetsByStatus.ts | 26 - .../mocks/petMocks/createFindPetsByTags.ts | 26 - .../gen/mocks/petMocks/createGetPetById.ts | 35 - .../gen/mocks/petMocks/createUploadFile.ts | 27 - .../faker/src/gen/mocks/petMocks/index.ts | 8 - .../gen/mocks/storeMocks/createDeleteOrder.ts | 30 - .../mocks/storeMocks/createGetInventory.ts | 9 - .../mocks/storeMocks/createGetOrderById.ts | 35 - .../gen/mocks/storeMocks/createPlaceOrder.ts | 24 - .../faker/src/gen/mocks/storeMocks/index.ts | 4 - .../gen/mocks/userMocks/createCreateUser.ts | 24 - .../createCreateUsersWithListInput.ts | 26 - .../gen/mocks/userMocks/createDeleteUser.ts | 30 - .../mocks/userMocks/createGetUserByName.ts | 35 - .../gen/mocks/userMocks/createLoginUser.ts | 25 - .../gen/mocks/userMocks/createLogoutUser.ts | 14 - .../gen/mocks/userMocks/createUpdateUser.ts | 31 - .../faker/src/gen/mocks/userMocks/index.ts | 7 - examples/faker/src/gen/models/AddPet.ts | 1 - examples/faker/src/gen/models/Address.ts | 6 +- examples/faker/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - examples/faker/src/gen/models/DeleteOrder.ts | 1 - examples/faker/src/gen/models/DeletePet.ts | 1 - examples/faker/src/gen/models/DeleteUser.ts | 1 - .../faker/src/gen/models/FindPetsByStatus.ts | 7 +- .../faker/src/gen/models/FindPetsByTags.ts | 1 - examples/faker/src/gen/models/GetInventory.ts | 1 - examples/faker/src/gen/models/GetOrderById.ts | 1 - examples/faker/src/gen/models/GetPetById.ts | 1 - .../faker/src/gen/models/GetUserByName.ts | 1 - examples/faker/src/gen/models/LoginUser.ts | 1 - examples/faker/src/gen/models/LogoutUser.ts | 1 - examples/faker/src/gen/models/Order.ts | 6 +- examples/faker/src/gen/models/Pet.ts | 6 +- examples/faker/src/gen/models/PlaceOrder.ts | 1 - examples/faker/src/gen/models/UpdatePet.ts | 1 - .../faker/src/gen/models/UpdatePetWithForm.ts | 1 - examples/faker/src/gen/models/UpdateUser.ts | 1 - examples/faker/src/gen/models/UploadFile.ts | 1 - .../src/gen/mocks/createAddPetRequest.ts | 5 +- .../msw-v2/src/gen/mocks/createAddress.ts | 3 +- .../msw-v2/src/gen/mocks/createApiResponse.ts | 3 +- .../msw-v2/src/gen/mocks/createCategory.ts | 3 +- .../msw-v2/src/gen/mocks/createCustomer.ts | 5 +- examples/msw-v2/src/gen/mocks/createOrder.ts | 3 +- examples/msw-v2/src/gen/mocks/createPet.ts | 5 +- .../msw-v2/src/gen/mocks/createPetNotFound.ts | 3 +- examples/msw-v2/src/gen/mocks/createTag.ts | 3 +- examples/msw-v2/src/gen/mocks/createUser.ts | 3 +- .../msw-v2/src/gen/mocks/createUserArray.ts | 5 +- .../src/gen/mocks/petMocks/createAddPet.ts | 7 +- .../src/gen/mocks/petMocks/createDeletePet.ts | 6 +- .../mocks/petMocks/createFindPetsByStatus.ts | 6 +- .../mocks/petMocks/createFindPetsByTags.ts | 6 +- .../gen/mocks/petMocks/createGetPetById.ts | 8 +- .../src/gen/mocks/petMocks/createUpdatePet.ts | 10 +- .../mocks/petMocks/createUpdatePetWithForm.ts | 11 +- .../gen/mocks/petMocks/createUploadFile.ts | 7 +- .../gen/mocks/storeMocks/createDeleteOrder.ts | 7 +- .../mocks/storeMocks/createGetInventory.ts | 2 +- .../mocks/storeMocks/createGetOrderById.ts | 8 +- .../gen/mocks/storeMocks/createPlaceOrder.ts | 5 +- .../mocks/storeMocks/createPlaceOrderPatch.ts | 5 +- .../gen/mocks/userMocks/createCreateUser.ts | 6 +- .../createCreateUsersWithListInput.ts | 10 +- .../gen/mocks/userMocks/createDeleteUser.ts | 7 +- .../mocks/userMocks/createGetUserByName.ts | 8 +- .../gen/mocks/userMocks/createLoginUser.ts | 6 +- .../gen/mocks/userMocks/createLogoutUser.ts | 3 +- .../gen/mocks/userMocks/createUpdateUser.ts | 7 +- examples/msw-v2/src/gen/models/AddPet.ts | 1 - examples/msw-v2/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - examples/msw-v2/src/gen/models/DeleteOrder.ts | 1 - examples/msw-v2/src/gen/models/DeletePet.ts | 1 - examples/msw-v2/src/gen/models/DeleteUser.ts | 1 - .../msw-v2/src/gen/models/FindPetsByStatus.ts | 1 - .../msw-v2/src/gen/models/FindPetsByTags.ts | 1 - .../msw-v2/src/gen/models/GetInventory.ts | 1 - .../msw-v2/src/gen/models/GetOrderById.ts | 1 - examples/msw-v2/src/gen/models/GetPetById.ts | 1 - .../msw-v2/src/gen/models/GetUserByName.ts | 1 - examples/msw-v2/src/gen/models/LoginUser.ts | 1 - examples/msw-v2/src/gen/models/LogoutUser.ts | 1 - examples/msw-v2/src/gen/models/PlaceOrder.ts | 1 - .../msw-v2/src/gen/models/PlaceOrderPatch.ts | 1 - examples/msw-v2/src/gen/models/UpdatePet.ts | 1 - .../src/gen/models/UpdatePetWithForm.ts | 1 - examples/msw-v2/src/gen/models/UpdateUser.ts | 1 - examples/msw-v2/src/gen/models/UploadFile.ts | 1 - .../msw/src/gen/mocks/createAddPetRequest.ts | 5 +- examples/msw/src/gen/mocks/createAddress.ts | 3 +- .../msw/src/gen/mocks/createApiResponse.ts | 3 +- examples/msw/src/gen/mocks/createCategory.ts | 3 +- examples/msw/src/gen/mocks/createCustomer.ts | 5 +- examples/msw/src/gen/mocks/createOrder.ts | 3 +- examples/msw/src/gen/mocks/createPet.ts | 5 +- .../msw/src/gen/mocks/createPetNotFound.ts | 3 +- examples/msw/src/gen/mocks/createTag.ts | 3 +- examples/msw/src/gen/mocks/createUser.ts | 3 +- examples/msw/src/gen/mocks/createUserArray.ts | 5 +- .../src/gen/mocks/petMocks/createAddPet.ts | 7 +- .../src/gen/mocks/petMocks/createDeletePet.ts | 6 +- .../mocks/petMocks/createFindPetsByStatus.ts | 6 +- .../mocks/petMocks/createFindPetsByTags.ts | 6 +- .../gen/mocks/petMocks/createGetPetById.ts | 8 +- .../src/gen/mocks/petMocks/createUpdatePet.ts | 10 +- .../mocks/petMocks/createUpdatePetWithForm.ts | 11 +- .../gen/mocks/petMocks/createUploadFile.ts | 7 +- .../gen/mocks/storeMocks/createDeleteOrder.ts | 7 +- .../mocks/storeMocks/createGetInventory.ts | 2 +- .../mocks/storeMocks/createGetOrderById.ts | 8 +- .../gen/mocks/storeMocks/createPlaceOrder.ts | 5 +- .../mocks/storeMocks/createPlaceOrderPatch.ts | 5 +- .../gen/mocks/userMocks/createCreateUser.ts | 6 +- .../createCreateUsersWithListInput.ts | 10 +- .../gen/mocks/userMocks/createDeleteUser.ts | 7 +- .../mocks/userMocks/createGetUserByName.ts | 8 +- .../gen/mocks/userMocks/createLoginUser.ts | 6 +- .../gen/mocks/userMocks/createLogoutUser.ts | 3 +- .../gen/mocks/userMocks/createUpdateUser.ts | 7 +- examples/msw/src/gen/models/AddPet.ts | 1 - examples/msw/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - examples/msw/src/gen/models/DeleteOrder.ts | 1 - examples/msw/src/gen/models/DeletePet.ts | 1 - examples/msw/src/gen/models/DeleteUser.ts | 1 - .../msw/src/gen/models/FindPetsByStatus.ts | 1 - examples/msw/src/gen/models/FindPetsByTags.ts | 1 - examples/msw/src/gen/models/GetInventory.ts | 1 - examples/msw/src/gen/models/GetOrderById.ts | 1 - examples/msw/src/gen/models/GetPetById.ts | 1 - examples/msw/src/gen/models/GetUserByName.ts | 1 - examples/msw/src/gen/models/LoginUser.ts | 1 - examples/msw/src/gen/models/LogoutUser.ts | 1 - examples/msw/src/gen/models/PlaceOrder.ts | 1 - .../msw/src/gen/models/PlaceOrderPatch.ts | 1 - examples/msw/src/gen/models/UpdatePet.ts | 1 - .../msw/src/gen/models/UpdatePetWithForm.ts | 1 - examples/msw/src/gen/models/UpdateUser.ts | 1 - examples/msw/src/gen/models/UploadFile.ts | 1 - examples/react-query-v5/package.json | 2 +- .../src/gen/hooks/useAddPetHook.ts | 3 +- .../src/gen/hooks/useCreateUserHook.ts | 3 +- .../hooks/useCreateUsersWithListInputHook.ts | 3 +- .../src/gen/hooks/useDeleteOrderHook.ts | 3 +- .../src/gen/hooks/useDeletePetHook.ts | 3 +- .../src/gen/hooks/useDeleteUserHook.ts | 3 +- .../src/gen/hooks/useFindPetsByStatusHook.ts | 23 +- .../src/gen/hooks/useFindPetsByTagsHook.ts | 23 +- .../src/gen/hooks/useGetInventoryHook.ts | 23 +- .../src/gen/hooks/useGetOrderByIdHook.ts | 23 +- .../src/gen/hooks/useGetPetByIdHook.ts | 23 +- .../src/gen/hooks/useGetUserByNameHook.ts | 23 +- .../src/gen/hooks/useLoginUserHook.ts | 23 +- .../src/gen/hooks/useLogoutUserHook.ts | 23 +- .../src/gen/hooks/usePlaceOrderHook.ts | 3 +- .../src/gen/hooks/usePlaceOrderPatchHook.ts | 3 +- .../src/gen/hooks/useUpdatePetHook.ts | 3 +- .../src/gen/hooks/useUpdatePetWithFormHook.ts | 3 +- .../src/gen/hooks/useUpdateUserHook.ts | 3 +- .../src/gen/hooks/useUploadFileHook.ts | 3 +- .../react-query-v5/src/gen/models/AddPet.ts | 1 - .../src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - .../src/gen/models/DeleteOrder.ts | 1 - .../src/gen/models/DeletePet.ts | 1 - .../src/gen/models/DeleteUser.ts | 1 - .../src/gen/models/FindPetsByStatus.ts | 1 - .../src/gen/models/FindPetsByTags.ts | 1 - .../src/gen/models/GetInventory.ts | 1 - .../src/gen/models/GetOrderById.ts | 1 - .../src/gen/models/GetPetById.ts | 1 - .../src/gen/models/GetUserByName.ts | 1 - .../src/gen/models/LoginUser.ts | 1 - .../src/gen/models/LogoutUser.ts | 1 - .../src/gen/models/PlaceOrder.ts | 1 - .../src/gen/models/PlaceOrderPatch.ts | 1 - .../src/gen/models/UpdatePet.ts | 1 - .../src/gen/models/UpdatePetWithForm.ts | 1 - .../src/gen/models/UpdateUser.ts | 1 - .../src/gen/models/UploadFile.ts | 1 - .../src/gen/hooks/useAddPetHook.ts | 3 +- .../src/gen/hooks/useCreateUserHook.ts | 3 +- .../hooks/useCreateUsersWithListInputHook.ts | 3 +- .../src/gen/hooks/useDeleteOrderHook.ts | 3 +- .../src/gen/hooks/useDeletePetHook.ts | 3 +- .../src/gen/hooks/useDeleteUserHook.ts | 3 +- .../src/gen/hooks/useFindPetsByStatusHook.ts | 15 +- .../src/gen/hooks/useFindPetsByTagsHook.ts | 15 +- .../src/gen/hooks/useGetInventoryHook.ts | 15 +- .../src/gen/hooks/useGetOrderByIdHook.ts | 15 +- .../src/gen/hooks/useGetPetByIdHook.ts | 15 +- .../src/gen/hooks/useGetUserByNameHook.ts | 15 +- .../src/gen/hooks/useLoginUserHook.ts | 15 +- .../src/gen/hooks/useLogoutUserHook.ts | 15 +- .../src/gen/hooks/usePlaceOrderHook.ts | 3 +- .../src/gen/hooks/usePlaceOrderPatchHook.ts | 3 +- .../src/gen/hooks/useUpdatePetHook.ts | 3 +- .../src/gen/hooks/useUpdatePetWithFormHook.ts | 3 +- .../src/gen/hooks/useUpdateUserHook.ts | 3 +- .../src/gen/hooks/useUploadFileHook.ts | 3 +- examples/react-query/src/gen/models/AddPet.ts | 1 - .../react-query/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - .../react-query/src/gen/models/DeleteOrder.ts | 1 - .../react-query/src/gen/models/DeletePet.ts | 1 - .../react-query/src/gen/models/DeleteUser.ts | 1 - .../src/gen/models/FindPetsByStatus.ts | 1 - .../src/gen/models/FindPetsByTags.ts | 1 - .../src/gen/models/GetInventory.ts | 1 - .../src/gen/models/GetOrderById.ts | 1 - .../react-query/src/gen/models/GetPetById.ts | 1 - .../src/gen/models/GetUserByName.ts | 1 - .../react-query/src/gen/models/LoginUser.ts | 1 - .../react-query/src/gen/models/LogoutUser.ts | 1 - .../react-query/src/gen/models/PlaceOrder.ts | 1 - .../src/gen/models/PlaceOrderPatch.ts | 1 - .../react-query/src/gen/models/UpdatePet.ts | 1 - .../src/gen/models/UpdatePetWithForm.ts | 1 - .../react-query/src/gen/models/UpdateUser.ts | 1 - .../react-query/src/gen/models/UploadFile.ts | 1 - examples/simple-single/src/gen/hooks.ts | 92 +- examples/simple-single/src/gen/models.ts | 20 - .../solid-query/src/gen/hooks/addPetQuery.ts | 3 +- .../src/gen/hooks/createUserQuery.ts | 3 +- .../hooks/createUsersWithListInputQuery.ts | 3 +- .../src/gen/hooks/deleteOrderQuery.ts | 3 +- .../src/gen/hooks/deletePetQuery.ts | 3 +- .../src/gen/hooks/deleteUserQuery.ts | 3 +- .../src/gen/hooks/findPetsByStatusQuery.ts | 7 +- .../src/gen/hooks/findPetsByTagsQuery.ts | 7 +- .../src/gen/hooks/getInventoryQuery.ts | 7 +- .../src/gen/hooks/getOrderByIdQuery.ts | 7 +- .../src/gen/hooks/getPetByIdQuery.ts | 7 +- .../src/gen/hooks/getUserByNameQuery.ts | 7 +- .../src/gen/hooks/loginUserQuery.ts | 7 +- .../src/gen/hooks/logoutUserQuery.ts | 7 +- .../src/gen/hooks/placeOrderPatchQuery.ts | 3 +- .../src/gen/hooks/placeOrderQuery.ts | 3 +- .../src/gen/hooks/updatePetQuery.ts | 3 +- .../src/gen/hooks/updatePetWithFormQuery.ts | 3 +- .../src/gen/hooks/updateUserQuery.ts | 3 +- .../src/gen/hooks/uploadFileQuery.ts | 3 +- examples/solid-query/src/gen/models/AddPet.ts | 1 - .../solid-query/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - .../solid-query/src/gen/models/DeleteOrder.ts | 1 - .../solid-query/src/gen/models/DeletePet.ts | 1 - .../solid-query/src/gen/models/DeleteUser.ts | 1 - .../src/gen/models/FindPetsByStatus.ts | 1 - .../src/gen/models/FindPetsByTags.ts | 1 - .../src/gen/models/GetInventory.ts | 1 - .../src/gen/models/GetOrderById.ts | 1 - .../solid-query/src/gen/models/GetPetById.ts | 1 - .../src/gen/models/GetUserByName.ts | 1 - .../solid-query/src/gen/models/LoginUser.ts | 1 - .../solid-query/src/gen/models/LogoutUser.ts | 1 - .../solid-query/src/gen/models/PlaceOrder.ts | 1 - .../src/gen/models/PlaceOrderPatch.ts | 1 - .../solid-query/src/gen/models/UpdatePet.ts | 1 - .../src/gen/models/UpdatePetWithForm.ts | 1 - .../solid-query/src/gen/models/UpdateUser.ts | 1 - .../solid-query/src/gen/models/UploadFile.ts | 1 - .../svelte-query/src/gen/hooks/addPetQuery.ts | 3 +- .../src/gen/hooks/createUserQuery.ts | 3 +- .../hooks/createUsersWithListInputQuery.ts | 3 +- .../src/gen/hooks/deleteOrderQuery.ts | 3 +- .../src/gen/hooks/deletePetQuery.ts | 3 +- .../src/gen/hooks/deleteUserQuery.ts | 3 +- .../src/gen/hooks/findPetsByStatusQuery.ts | 14 +- .../src/gen/hooks/findPetsByTagsQuery.ts | 14 +- .../src/gen/hooks/getInventoryQuery.ts | 14 +- .../src/gen/hooks/getOrderByIdQuery.ts | 14 +- .../src/gen/hooks/getPetByIdQuery.ts | 14 +- .../src/gen/hooks/getUserByNameQuery.ts | 14 +- .../src/gen/hooks/loginUserQuery.ts | 14 +- .../src/gen/hooks/logoutUserQuery.ts | 14 +- .../src/gen/hooks/placeOrderPatchQuery.ts | 3 +- .../src/gen/hooks/placeOrderQuery.ts | 3 +- .../src/gen/hooks/updatePetQuery.ts | 3 +- .../src/gen/hooks/updatePetWithFormQuery.ts | 3 +- .../src/gen/hooks/updateUserQuery.ts | 3 +- .../src/gen/hooks/uploadFileQuery.ts | 3 +- .../svelte-query/src/gen/models/AddPet.ts | 1 - .../svelte-query/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - .../src/gen/models/DeleteOrder.ts | 1 - .../svelte-query/src/gen/models/DeletePet.ts | 1 - .../svelte-query/src/gen/models/DeleteUser.ts | 1 - .../src/gen/models/FindPetsByStatus.ts | 1 - .../src/gen/models/FindPetsByTags.ts | 1 - .../src/gen/models/GetInventory.ts | 1 - .../src/gen/models/GetOrderById.ts | 1 - .../svelte-query/src/gen/models/GetPetById.ts | 1 - .../src/gen/models/GetUserByName.ts | 1 - .../svelte-query/src/gen/models/LoginUser.ts | 1 - .../svelte-query/src/gen/models/LogoutUser.ts | 1 - .../svelte-query/src/gen/models/PlaceOrder.ts | 1 - .../src/gen/models/PlaceOrderPatch.ts | 1 - .../svelte-query/src/gen/models/UpdatePet.ts | 1 - .../src/gen/models/UpdatePetWithForm.ts | 1 - .../svelte-query/src/gen/models/UpdateUser.ts | 1 - .../svelte-query/src/gen/models/UploadFile.ts | 1 - examples/swr/src/gen/hooks/useAddPet.ts | 3 +- examples/swr/src/gen/hooks/useCreateUser.ts | 3 +- .../gen/hooks/useCreateUsersWithListInput.ts | 3 +- examples/swr/src/gen/hooks/useDeleteOrder.ts | 3 +- examples/swr/src/gen/hooks/useDeletePet.ts | 3 +- examples/swr/src/gen/hooks/useDeleteUser.ts | 3 +- .../swr/src/gen/hooks/useFindPetsByStatus.ts | 7 +- .../swr/src/gen/hooks/useFindPetsByTags.ts | 7 +- examples/swr/src/gen/hooks/useGetInventory.ts | 7 +- examples/swr/src/gen/hooks/useGetOrderById.ts | 7 +- examples/swr/src/gen/hooks/useGetPetById.ts | 7 +- .../swr/src/gen/hooks/useGetUserByName.ts | 7 +- examples/swr/src/gen/hooks/useLoginUser.ts | 7 +- examples/swr/src/gen/hooks/useLogoutUser.ts | 7 +- examples/swr/src/gen/hooks/usePlaceOrder.ts | 3 +- .../swr/src/gen/hooks/usePlaceOrderPatch.ts | 3 +- examples/swr/src/gen/hooks/useUpdatePet.ts | 3 +- .../swr/src/gen/hooks/useUpdatePetWithForm.ts | 3 +- examples/swr/src/gen/hooks/useUpdateUser.ts | 3 +- examples/swr/src/gen/hooks/useUploadFile.ts | 3 +- examples/swr/src/gen/models/AddPet.ts | 1 - examples/swr/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - examples/swr/src/gen/models/DeleteOrder.ts | 1 - examples/swr/src/gen/models/DeletePet.ts | 1 - examples/swr/src/gen/models/DeleteUser.ts | 1 - .../swr/src/gen/models/FindPetsByStatus.ts | 1 - examples/swr/src/gen/models/FindPetsByTags.ts | 1 - examples/swr/src/gen/models/GetInventory.ts | 1 - examples/swr/src/gen/models/GetOrderById.ts | 1 - examples/swr/src/gen/models/GetPetById.ts | 1 - examples/swr/src/gen/models/GetUserByName.ts | 1 - examples/swr/src/gen/models/LoginUser.ts | 1 - examples/swr/src/gen/models/LogoutUser.ts | 1 - examples/swr/src/gen/models/PlaceOrder.ts | 1 - .../swr/src/gen/models/PlaceOrderPatch.ts | 1 - examples/swr/src/gen/models/UpdatePet.ts | 1 - .../swr/src/gen/models/UpdatePetWithForm.ts | 1 - examples/swr/src/gen/models/UpdateUser.ts | 1 - examples/swr/src/gen/models/UploadFile.ts | 1 - examples/typescript/src/gen/models.ts | 20 - examples/typescript/src/gen/modelsConst.ts | 20 - examples/vue-query-v5/package.json | 2 +- .../vue-query-v5/src/gen/hooks/useAddPet.ts | 3 +- .../src/gen/hooks/useCreateUser.ts | 3 +- .../gen/hooks/useCreateUsersWithListInput.ts | 3 +- .../src/gen/hooks/useDeleteOrder.ts | 3 +- .../src/gen/hooks/useDeletePet.ts | 3 +- .../src/gen/hooks/useDeleteUser.ts | 3 +- .../src/gen/hooks/useFindPetsByStatus.ts | 7 +- .../src/gen/hooks/useFindPetsByTags.ts | 7 +- .../src/gen/hooks/useGetInventory.ts | 7 +- .../src/gen/hooks/useGetOrderById.ts | 7 +- .../src/gen/hooks/useGetPetById.ts | 7 +- .../src/gen/hooks/useGetUserByName.ts | 7 +- .../src/gen/hooks/useLoginUser.ts | 7 +- .../src/gen/hooks/useLogoutUser.ts | 7 +- .../src/gen/hooks/usePlaceOrder.ts | 3 +- .../src/gen/hooks/useUpdatePet.ts | 3 +- .../src/gen/hooks/useUpdatePetWithForm.ts | 3 +- .../src/gen/hooks/useUpdateUser.ts | 3 +- .../src/gen/hooks/useUploadFile.ts | 3 +- .../vue-query-v5/src/gen/models/AddPet.ts | 1 - .../vue-query-v5/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - .../src/gen/models/DeleteOrder.ts | 1 - .../vue-query-v5/src/gen/models/DeletePet.ts | 1 - .../vue-query-v5/src/gen/models/DeleteUser.ts | 1 - .../src/gen/models/FindPetsByStatus.ts | 1 - .../src/gen/models/FindPetsByTags.ts | 1 - .../src/gen/models/GetInventory.ts | 1 - .../src/gen/models/GetOrderById.ts | 1 - .../vue-query-v5/src/gen/models/GetPetById.ts | 1 - .../src/gen/models/GetUserByName.ts | 1 - .../vue-query-v5/src/gen/models/LoginUser.ts | 1 - .../vue-query-v5/src/gen/models/LogoutUser.ts | 1 - .../vue-query-v5/src/gen/models/PlaceOrder.ts | 1 - .../vue-query-v5/src/gen/models/UpdatePet.ts | 1 - .../src/gen/models/UpdatePetWithForm.ts | 1 - .../vue-query-v5/src/gen/models/UpdateUser.ts | 1 - .../vue-query-v5/src/gen/models/UploadFile.ts | 1 - examples/vue-query/src/gen/hooks/useAddPet.ts | 3 +- .../vue-query/src/gen/hooks/useCreateUser.ts | 3 +- .../gen/hooks/useCreateUsersWithListInput.ts | 3 +- .../vue-query/src/gen/hooks/useDeleteOrder.ts | 3 +- .../vue-query/src/gen/hooks/useDeletePet.ts | 3 +- .../vue-query/src/gen/hooks/useDeleteUser.ts | 3 +- .../src/gen/hooks/useFindPetsByStatus.ts | 7 +- .../src/gen/hooks/useFindPetsByTags.ts | 7 +- .../src/gen/hooks/useGetInventory.ts | 7 +- .../src/gen/hooks/useGetOrderById.ts | 7 +- .../vue-query/src/gen/hooks/useGetPetById.ts | 7 +- .../src/gen/hooks/useGetUserByName.ts | 7 +- .../vue-query/src/gen/hooks/useLoginUser.ts | 7 +- .../vue-query/src/gen/hooks/useLogoutUser.ts | 7 +- .../vue-query/src/gen/hooks/usePlaceOrder.ts | 3 +- .../vue-query/src/gen/hooks/useUpdatePet.ts | 3 +- .../src/gen/hooks/useUpdatePetWithForm.ts | 3 +- .../vue-query/src/gen/hooks/useUpdateUser.ts | 3 +- .../vue-query/src/gen/hooks/useUploadFile.ts | 3 +- examples/vue-query/src/gen/models/AddPet.ts | 1 - .../vue-query/src/gen/models/CreateUser.ts | 1 - .../gen/models/CreateUsersWithListInput.ts | 1 - .../vue-query/src/gen/models/DeleteOrder.ts | 1 - .../vue-query/src/gen/models/DeletePet.ts | 1 - .../vue-query/src/gen/models/DeleteUser.ts | 1 - .../src/gen/models/FindPetsByStatus.ts | 1 - .../src/gen/models/FindPetsByTags.ts | 1 - .../vue-query/src/gen/models/GetInventory.ts | 1 - .../vue-query/src/gen/models/GetOrderById.ts | 1 - .../vue-query/src/gen/models/GetPetById.ts | 1 - .../vue-query/src/gen/models/GetUserByName.ts | 1 - .../vue-query/src/gen/models/LoginUser.ts | 1 - .../vue-query/src/gen/models/LogoutUser.ts | 1 - .../vue-query/src/gen/models/PlaceOrder.ts | 1 - .../vue-query/src/gen/models/UpdatePet.ts | 1 - .../src/gen/models/UpdatePetWithForm.ts | 1 - .../vue-query/src/gen/models/UpdateUser.ts | 1 - .../vue-query/src/gen/models/UploadFile.ts | 1 - .../zod/src/gen/zod/addPetRequestSchema.ts | 3 +- examples/zod/src/gen/zod/addPetSchema.ts | 1 - examples/zod/src/gen/zod/createUserSchema.ts | 1 - .../gen/zod/createUsersWithListInputSchema.ts | 1 - examples/zod/src/gen/zod/customerSchema.ts | 3 +- .../zod/src/gen/zod/findPetsByStatusSchema.ts | 1 - .../zod/src/gen/zod/findPetsByTagsSchema.ts | 1 - .../zod/src/gen/zod/getOrderByIdSchema.ts | 1 - examples/zod/src/gen/zod/getPetByIdSchema.ts | 1 - .../zod/src/gen/zod/getUserByNameSchema.ts | 1 - examples/zod/src/gen/zod/petSchema.ts | 3 +- .../zod/src/gen/zod/placeOrderPatchSchema.ts | 1 - examples/zod/src/gen/zod/placeOrderSchema.ts | 1 - examples/zod/src/gen/zod/updatePetSchema.ts | 1 - examples/zod/src/gen/zod/updateUserSchema.ts | 1 - examples/zod/src/gen/zod/uploadFileSchema.ts | 1 - examples/zod/src/gen/zod/userArraySchema.ts | 3 +- .../zodios/src/gen/zod/addPetRequestSchema.ts | 3 +- examples/zodios/src/gen/zod/addPetSchema.ts | 1 - .../zodios/src/gen/zod/createUserSchema.ts | 1 - .../gen/zod/createUsersWithListInputSchema.ts | 1 - examples/zodios/src/gen/zod/customerSchema.ts | 3 +- .../src/gen/zod/findPetsByStatusSchema.ts | 1 - .../src/gen/zod/findPetsByTagsSchema.ts | 1 - .../zodios/src/gen/zod/getOrderByIdSchema.ts | 1 - .../zodios/src/gen/zod/getPetByIdSchema.ts | 1 - .../zodios/src/gen/zod/getUserByNameSchema.ts | 1 - examples/zodios/src/gen/zod/petSchema.ts | 3 +- .../src/gen/zod/placeOrderPatchSchema.ts | 1 - .../zodios/src/gen/zod/placeOrderSchema.ts | 1 - .../zodios/src/gen/zod/updatePetSchema.ts | 1 - .../zodios/src/gen/zod/updateUserSchema.ts | 1 - .../zodios/src/gen/zod/uploadFileSchema.ts | 1 - .../zodios/src/gen/zod/userArraySchema.ts | 3 +- examples/zodios/src/gen/zodios.ts | 2 - package.json | 4 +- packages/cli/package.json | 2 +- packages/config/eslint-config/src/ignores.ts | 2 +- packages/config/eslint-config/src/rules.ts | 1 - packages/config/tsup-config/package.json | 2 +- packages/core/package.json | 5 + packages/core/src/FileManager.test.ts | 2 + packages/core/src/FileManager.ts | 48 +- packages/core/src/PluginManager.ts | 18 +- packages/core/src/SchemaGenerator.ts | 8 - packages/core/src/build.ts | 2 +- packages/core/src/index.ts | 1 - packages/core/src/transformers/casing.ts | 9 + .../{utils => }/transformers/combineCodes.ts | 0 .../transformers/createJSDocBlockText.test.ts | 3 +- .../src/transformers/createJSDocBlockText.ts | 9 + .../{utils => }/transformers/escape.test.ts | 0 .../src/{utils => }/transformers/escape.ts | 0 .../src/{utils => }/transformers/indent.ts | 0 packages/core/src/transformers/index.ts | 36 + .../{utils => }/transformers/nameSorter.ts | 0 .../transformers/searchAndReplace.ts | 0 .../transformReservedWord.test.ts | 0 .../transformers/transformReservedWord.ts | 0 packages/core/src/transformers/trim.ts | 7 + packages/core/src/utils/FunctionParams.ts | 5 +- packages/core/src/utils/URLPath.ts | 10 +- packages/core/src/utils/index.ts | 1 - .../transformers/createJSDocBlockText.ts | 15 - packages/core/src/utils/transformers/index.ts | 22 - packages/core/src/utils/transformers/trim.ts | 3 - packages/core/src/utils/write.ts | 2 +- packages/core/tsup.config.ts | 14 + packages/kubb/package.json | 2 +- packages/react/src/components/File.test.tsx | 5 + .../react/src/components/Function.test.tsx | 19 + packages/react/src/components/Function.tsx | 14 +- packages/react/src/components/Import.tsx | 10 +- packages/react/src/components/Type.tsx | 6 +- .../__snapshots__/Function.test.tsx.snap | 14 +- .../__snapshots__/Type.test.tsx.snap | 4 +- packages/react/src/hooks/index.ts | 2 + packages/react/src/hooks/useIndent.ts | 2 +- .../src/hooks/useResolveName.ts | 8 +- packages/react/src/hooks/useResolvePath.ts | 11 + packages/react/src/index.ts | 15 +- .../src/shared/utils/squashExportNodes.ts | 7 +- .../src/shared/utils/squashImportNodes.ts | 7 +- .../react/src/shared/utils/squashTextNodes.ts | 16 +- packages/swagger-client/package.json | 3 +- .../src/OperationGenerator.test.tsx | 3 + .../swagger-client/src/OperationGenerator.tsx | 10 +- .../OperationGenerator.test.tsx.snap | 9 +- .../swagger-client/src/components/Client.tsx | 9 +- .../src/components/Operations.tsx | 22 +- packages/swagger-client/src/plugin.ts | 7 +- packages/swagger-faker/package.json | 14 +- packages/swagger-faker/src/FakerBuilder.ts | 58 + .../src/{generators => }/FakerGenerator.ts | 98 +- .../swagger-faker/src/OperationGenerator.tsx | 50 + .../src/builders/FakerBuilder.ts | 92 -- packages/swagger-faker/src/builders/index.ts | 1 - .../swagger-faker/src/components/Mutation.tsx | 63 + .../swagger-faker/src/components/Query.tsx | 62 + .../swagger-faker/src/components/index.ts | 2 + .../src/{parsers => }/fakerParser.test.ts | 0 .../src/{parsers => }/fakerParser.ts | 5 +- .../src/generators/OperationGenerator.ts | 143 -- .../swagger-faker/src/generators/index.ts | 2 - packages/swagger-faker/src/index.ts | 1 - packages/swagger-faker/src/parsers/index.ts | 1 - packages/swagger-faker/src/plugin.ts | 91 +- packages/swagger-faker/src/resolve.ts | 9 - packages/swagger-faker/src/types.ts | 15 +- packages/swagger-faker/tsup.config.ts | 12 + packages/swagger-msw/package.json | 3 +- .../swagger-msw/src/OperationGenerator.tsx | 12 +- .../swagger-msw/src/components/Handlers.tsx | 56 +- packages/swagger-msw/src/components/Mock.tsx | 4 +- packages/swagger-msw/src/plugin.ts | 7 +- .../swagger-swr/src/OperationGenerator.tsx | 8 +- .../swagger-swr/src/components/Mutation.tsx | 3 +- packages/swagger-swr/src/components/Query.tsx | 5 +- .../src/components/QueryOptions.tsx | 7 +- packages/swagger-swr/src/plugin.ts | 11 +- packages/swagger-tanstack-query/package.json | 3 +- .../src/OperationGenerator.tsx | 8 +- .../src/components/Mutation.tsx | 14 +- .../src/components/Query.tsx | 18 +- .../src/components/QueryKey.tsx | 16 +- .../src/components/QueryOptions.tsx | 22 +- packages/swagger-tanstack-query/src/plugin.ts | 13 +- packages/swagger-tanstack-query/src/types.ts | 4 +- packages/swagger-ts/package.json | 12 +- .../OperationGenerator.test.ts | 21 +- .../swagger-ts/src/OperationGenerator.tsx | 50 + packages/swagger-ts/src/TypeBuilder.ts | 58 + .../{generators => }/TypeGenerator.test.ts | 57 +- .../src/{generators => }/TypeGenerator.ts | 116 +- .../OperationGenerator.test.ts.snap | 3 - .../__snapshots__/TypeGenerator.test.ts.snap | 60 +- .../swagger-ts/src/builders/TypeBuilder.ts | 94 -- packages/swagger-ts/src/builders/index.ts | 1 - .../swagger-ts/src/components/Mutation.tsx | 137 ++ packages/swagger-ts/src/components/Query.tsx | 137 ++ packages/swagger-ts/src/components/index.ts | 2 + .../src/generators/OperationGenerator.ts | 213 --- packages/swagger-ts/src/generators/index.ts | 2 - packages/swagger-ts/src/plugin.ts | 99 +- packages/swagger-ts/src/types.ts | 14 +- packages/swagger-ts/tsup.config.ts | 12 + packages/swagger-zod/package.json | 14 +- .../swagger-zod/src/OperationGenerator.tsx | 50 + packages/swagger-zod/src/ZodBuilder.ts | 56 + .../src/{generators => }/ZodGenerator.ts | 81 +- .../swagger-zod/src/builders/ZodBuilder.ts | 81 -- packages/swagger-zod/src/builders/index.ts | 1 - .../swagger-zod/src/components/Mutation.tsx | 63 + packages/swagger-zod/src/components/Query.tsx | 62 + packages/swagger-zod/src/components/index.ts | 2 + .../src/generators/OperationGenerator.ts | 125 -- packages/swagger-zod/src/generators/index.ts | 2 - packages/swagger-zod/src/parsers/index.ts | 1 - packages/swagger-zod/src/plugin.ts | 80 +- packages/swagger-zod/src/types.ts | 12 +- .../src/{parsers => }/zodParser.test.ts | 0 .../src/{parsers => }/zodParser.ts | 5 +- packages/swagger-zod/tsup.config.ts | 12 +- packages/swagger-zodios/package.json | 14 +- .../swagger-zodios/src/OperationGenerator.ts | 398 ------ .../swagger-zodios/src/OperationGenerator.tsx | 41 + .../src/components/Definitions.tsx | 333 +++++ .../swagger-zodios/src/components/index.ts | 1 + packages/swagger-zodios/src/plugin.ts | 17 +- packages/swagger-zodios/src/types.ts | 10 +- packages/swagger-zodios/tsup.config.ts | 12 +- packages/swagger/package.json | 1 - packages/swagger/src/ImportsGenerator.test.ts | 28 - packages/swagger/src/ImportsGenerator.ts | 68 - packages/swagger/src/OasBuilder.ts | 16 +- .../swagger/src/OperationGenerator.test.ts | 12 + packages/swagger/src/OperationGenerator.ts | 59 +- packages/swagger/src/hooks/index.ts | 2 +- packages/swagger/src/hooks/useOas.ts | 9 + packages/swagger/src/index.ts | 3 - packages/swagger/src/resolve.ts | 66 - packages/swagger/src/types.ts | 8 +- packages/swagger/src/utils/getComments.ts | 3 +- .../swagger/src/utils/getGroupedByTagFiles.ts | 25 +- packages/swagger/src/utils/getParams.ts | 5 +- pnpm-lock.yaml | 1159 +++++++++-------- tsconfig.json | 3 + 794 files changed, 3689 insertions(+), 4684 deletions(-) create mode 100644 .changeset/bright-needles-move.md create mode 100644 .changeset/khaki-crews-act.md create mode 100644 .changeset/large-melons-try.md create mode 100644 .changeset/lucky-moles-travel.md create mode 100644 .changeset/swift-eagles-raise.md create mode 100644 examples/faker/src/gen/customMocks/createAddress.ts create mode 100644 examples/faker/src/gen/customMocks/createApiResponse.ts create mode 100644 examples/faker/src/gen/customMocks/createCategory.ts create mode 100644 examples/faker/src/gen/customMocks/createCustomer.ts create mode 100644 examples/faker/src/gen/customMocks/createOrder.ts create mode 100644 examples/faker/src/gen/customMocks/createPet.ts create mode 100644 examples/faker/src/gen/customMocks/createTag.ts rename examples/faker/src/gen/{mocks/petMocks => customMocks}/createUpdatePet.ts (68%) rename examples/faker/src/gen/{mocks/petMocks => customMocks}/createUpdatePetWithForm.ts (54%) create mode 100644 examples/faker/src/gen/customMocks/createUser.ts rename examples/faker/src/gen/{mocks => customMocks}/createUserArray.ts (79%) rename examples/faker/src/gen/{mocks => customMocks}/index.ts (66%) delete mode 100644 examples/faker/src/gen/mocks/createAddress.ts delete mode 100644 examples/faker/src/gen/mocks/createApiResponse.ts delete mode 100644 examples/faker/src/gen/mocks/createCategory.ts delete mode 100644 examples/faker/src/gen/mocks/createCustomer.ts delete mode 100644 examples/faker/src/gen/mocks/createOrder.ts delete mode 100644 examples/faker/src/gen/mocks/createPet.ts delete mode 100644 examples/faker/src/gen/mocks/createTag.ts delete mode 100644 examples/faker/src/gen/mocks/createUser.ts delete mode 100644 examples/faker/src/gen/mocks/petMocks/createAddPet.ts delete mode 100644 examples/faker/src/gen/mocks/petMocks/createDeletePet.ts delete mode 100644 examples/faker/src/gen/mocks/petMocks/createFindPetsByStatus.ts delete mode 100644 examples/faker/src/gen/mocks/petMocks/createFindPetsByTags.ts delete mode 100644 examples/faker/src/gen/mocks/petMocks/createGetPetById.ts delete mode 100644 examples/faker/src/gen/mocks/petMocks/createUploadFile.ts delete mode 100644 examples/faker/src/gen/mocks/petMocks/index.ts delete mode 100644 examples/faker/src/gen/mocks/storeMocks/createDeleteOrder.ts delete mode 100644 examples/faker/src/gen/mocks/storeMocks/createGetInventory.ts delete mode 100644 examples/faker/src/gen/mocks/storeMocks/createGetOrderById.ts delete mode 100644 examples/faker/src/gen/mocks/storeMocks/createPlaceOrder.ts delete mode 100644 examples/faker/src/gen/mocks/storeMocks/index.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/createCreateUser.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/createDeleteUser.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/createGetUserByName.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/createLoginUser.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/createLogoutUser.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/createUpdateUser.ts delete mode 100644 examples/faker/src/gen/mocks/userMocks/index.ts delete mode 100644 packages/core/src/SchemaGenerator.ts create mode 100644 packages/core/src/transformers/casing.ts rename packages/core/src/{utils => }/transformers/combineCodes.ts (100%) rename packages/core/src/{utils => }/transformers/createJSDocBlockText.test.ts (52%) create mode 100644 packages/core/src/transformers/createJSDocBlockText.ts rename packages/core/src/{utils => }/transformers/escape.test.ts (100%) rename packages/core/src/{utils => }/transformers/escape.ts (100%) rename packages/core/src/{utils => }/transformers/indent.ts (100%) create mode 100644 packages/core/src/transformers/index.ts rename packages/core/src/{utils => }/transformers/nameSorter.ts (100%) rename packages/core/src/{utils => }/transformers/searchAndReplace.ts (100%) rename packages/core/src/{utils => }/transformers/transformReservedWord.test.ts (100%) rename packages/core/src/{utils => }/transformers/transformReservedWord.ts (100%) create mode 100644 packages/core/src/transformers/trim.ts delete mode 100644 packages/core/src/utils/transformers/createJSDocBlockText.ts delete mode 100644 packages/core/src/utils/transformers/index.ts delete mode 100644 packages/core/src/utils/transformers/trim.ts rename packages/{swagger => react}/src/hooks/useResolveName.ts (54%) create mode 100644 packages/react/src/hooks/useResolvePath.ts create mode 100644 packages/swagger-faker/src/FakerBuilder.ts rename packages/swagger-faker/src/{generators => }/FakerGenerator.ts (74%) create mode 100644 packages/swagger-faker/src/OperationGenerator.tsx delete mode 100644 packages/swagger-faker/src/builders/FakerBuilder.ts delete mode 100644 packages/swagger-faker/src/builders/index.ts create mode 100644 packages/swagger-faker/src/components/Mutation.tsx create mode 100644 packages/swagger-faker/src/components/Query.tsx create mode 100644 packages/swagger-faker/src/components/index.ts rename packages/swagger-faker/src/{parsers => }/fakerParser.test.ts (100%) rename packages/swagger-faker/src/{parsers => }/fakerParser.ts (98%) delete mode 100644 packages/swagger-faker/src/generators/OperationGenerator.ts delete mode 100644 packages/swagger-faker/src/generators/index.ts delete mode 100644 packages/swagger-faker/src/parsers/index.ts delete mode 100644 packages/swagger-faker/src/resolve.ts rename packages/swagger-ts/src/{generators => }/OperationGenerator.test.ts (76%) create mode 100644 packages/swagger-ts/src/OperationGenerator.tsx create mode 100644 packages/swagger-ts/src/TypeBuilder.ts rename packages/swagger-ts/src/{generators => }/TypeGenerator.test.ts (77%) rename packages/swagger-ts/src/{generators => }/TypeGenerator.ts (73%) rename packages/swagger-ts/src/{generators => }/__snapshots__/OperationGenerator.test.ts.snap (99%) rename packages/swagger-ts/src/{generators => }/__snapshots__/TypeGenerator.test.ts.snap (65%) delete mode 100644 packages/swagger-ts/src/builders/TypeBuilder.ts delete mode 100644 packages/swagger-ts/src/builders/index.ts create mode 100644 packages/swagger-ts/src/components/Mutation.tsx create mode 100644 packages/swagger-ts/src/components/Query.tsx create mode 100644 packages/swagger-ts/src/components/index.ts delete mode 100644 packages/swagger-ts/src/generators/OperationGenerator.ts delete mode 100644 packages/swagger-ts/src/generators/index.ts create mode 100644 packages/swagger-zod/src/OperationGenerator.tsx create mode 100644 packages/swagger-zod/src/ZodBuilder.ts rename packages/swagger-zod/src/{generators => }/ZodGenerator.ts (80%) delete mode 100644 packages/swagger-zod/src/builders/ZodBuilder.ts delete mode 100644 packages/swagger-zod/src/builders/index.ts create mode 100644 packages/swagger-zod/src/components/Mutation.tsx create mode 100644 packages/swagger-zod/src/components/Query.tsx create mode 100644 packages/swagger-zod/src/components/index.ts delete mode 100644 packages/swagger-zod/src/generators/OperationGenerator.ts delete mode 100644 packages/swagger-zod/src/generators/index.ts delete mode 100644 packages/swagger-zod/src/parsers/index.ts rename packages/swagger-zod/src/{parsers => }/zodParser.test.ts (100%) rename packages/swagger-zod/src/{parsers => }/zodParser.ts (98%) delete mode 100644 packages/swagger-zodios/src/OperationGenerator.ts create mode 100644 packages/swagger-zodios/src/OperationGenerator.tsx create mode 100644 packages/swagger-zodios/src/components/Definitions.tsx create mode 100644 packages/swagger-zodios/src/components/index.ts delete mode 100644 packages/swagger/src/ImportsGenerator.test.ts delete mode 100644 packages/swagger/src/ImportsGenerator.ts create mode 100644 packages/swagger/src/hooks/useOas.ts delete mode 100644 packages/swagger/src/resolve.ts diff --git a/.changeset/bright-needles-move.md b/.changeset/bright-needles-move.md new file mode 100644 index 000000000..880bea3f9 --- /dev/null +++ b/.changeset/bright-needles-move.md @@ -0,0 +1,5 @@ +--- +"@kubb/swagger-faker": patch +--- + +feat: use of Query and Mutation omponent for swagger-faker diff --git a/.changeset/khaki-crews-act.md b/.changeset/khaki-crews-act.md new file mode 100644 index 000000000..7acb06e8d --- /dev/null +++ b/.changeset/khaki-crews-act.md @@ -0,0 +1,5 @@ +--- +"@kubb/swagger-faker": patch +--- + +mapper and transformers.schema to override default fakerParser diff --git a/.changeset/large-melons-try.md b/.changeset/large-melons-try.md new file mode 100644 index 000000000..962e1ef50 --- /dev/null +++ b/.changeset/large-melons-try.md @@ -0,0 +1,5 @@ +--- +"@kubb/core": major +--- + +transformers subpackage diff --git a/.changeset/lucky-moles-travel.md b/.changeset/lucky-moles-travel.md new file mode 100644 index 000000000..06d990225 --- /dev/null +++ b/.changeset/lucky-moles-travel.md @@ -0,0 +1,5 @@ +--- +"@kubb/core": patch +--- + +add 'root' to KubbFile.Import diff --git a/.changeset/old-pandas-teach.md b/.changeset/old-pandas-teach.md index 1a3f82f16..09e585325 100644 --- a/.changeset/old-pandas-teach.md +++ b/.changeset/old-pandas-teach.md @@ -1,5 +1,5 @@ --- -"@kubb/core": major +"@kubb/core": patch --- pluginSorter to sort based on pre and post diff --git a/.changeset/swift-eagles-raise.md b/.changeset/swift-eagles-raise.md new file mode 100644 index 000000000..d0ffa825e --- /dev/null +++ b/.changeset/swift-eagles-raise.md @@ -0,0 +1,6 @@ +--- +"@kubb/react": major +"@kubb/parser": major +--- + +jsdoc with tsFactory diff --git a/configs/vitest.config.ts b/configs/vitest.config.ts index ebef352be..447310ed0 100644 --- a/configs/vitest.config.ts +++ b/configs/vitest.config.ts @@ -9,6 +9,7 @@ export default defineConfig({ '@kubb/eslint-config': 'packages/config/eslint/src/index.ts', '@kubb/tsup-config': 'packages/config/tsup/src/index.ts', '@kubb/core/utils': 'packages/core/src/utils/index.ts', + '@kubb/core/transformers': 'packages/core/src/transformers/index.ts', '@kubb/core': 'packages/core/src/index.ts', '@kubb/swagger/utils': 'packages/swagger/src/utils/index.ts', '@kubb/swagger/hooks': 'packages/swagger/src/hooks/index.ts', diff --git a/docs/guide/introduction.md b/docs/guide/introduction.md index 219caad53..262f1f9e0 100644 --- a/docs/guide/introduction.md +++ b/docs/guide/introduction.md @@ -35,7 +35,7 @@ Kubb is trying to resolve that with a plugin system where we already provide you Kubb has the following features: -- **Easy to Configure**: One of the goals of Kubb is to provide out-of-the-box plugins and utils for converting your Swagger/OpenAPI file to generated code.

You want to use a Swagger/OpenAPI file or URL, you want to split up the generated code based on a tag in the file, you want to use multiple Swagger/OpenApi files, we have you covered! +- **Easy to Configure**: One of the goals of Kubb is to provide out-of-the-box plugins and utils for converting your Swagger/OpenAPI file to generated code.

You want to use a Swagger/OpenAPI file or URL, you want to split up the generated code based on a tag in the file, you want to use multiple Swagger/OpenAPI files, we have you covered! - **Generate SDK's**: Convert your Swagger/OpenAPI file to TypeScript, React-Query, Zod, Zodios, Faker.js, MSW and Axios. - **Templates**: Override/change the generated output of a plugin with the help of [JSX templates(React)](/reference/templates). - **Plugin Ecosystem**: Kubb has a [plugin system](/plugins/introdution) that makes it possible to change or add functionalities based on your needs. diff --git a/docs/package.json b/docs/package.json index d6efcaf39..6cc485099 100644 --- a/docs/package.json +++ b/docs/package.json @@ -21,11 +21,11 @@ "dependencies": { "@vercel/analytics": "^1.1.1", "sitemap": "^7.1.1", - "vitepress": "^1.0.0-rc.29", + "vitepress": "^1.0.0-rc.30", "vue": "^3.3.8" }, "devDependencies": { - "@types/node": "^20.9.4" + "@types/node": "^20.10.0" }, "packageManager": "pnpm@8.3.0", "engines": { diff --git a/eslint.config.js b/eslint.config.js index ce16ae18e..1c2193149 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -34,6 +34,7 @@ export default [ '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', 'unused-imports/no-unused-vars': 'off', }, }, diff --git a/examples/advanced/src/gen/clients/axios/petService/addPet.ts b/examples/advanced/src/gen/clients/axios/petService/addPet.ts index ba91fb42f..17a66f0b1 100644 --- a/examples/advanced/src/gen/clients/axios/petService/addPet.ts +++ b/examples/advanced/src/gen/clients/axios/petService/addPet.ts @@ -5,8 +5,7 @@ import type { AddPetMutationRequest, AddPetMutationResponse } from '../../../mod /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export async function addPet( data: AddPetMutationRequest, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/petService/deletePet.ts b/examples/advanced/src/gen/clients/axios/petService/deletePet.ts index 6352a470a..398931abd 100644 --- a/examples/advanced/src/gen/clients/axios/petService/deletePet.ts +++ b/examples/advanced/src/gen/clients/axios/petService/deletePet.ts @@ -5,8 +5,7 @@ import type { DeletePetMutationResponse, DeletePetPathParams, DeletePetHeaderPar /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export async function deletePet( { petId }: DeletePetPathParams, headers?: DeletePetHeaderParams, diff --git a/examples/advanced/src/gen/clients/axios/petService/findPetsByStatus.ts b/examples/advanced/src/gen/clients/axios/petService/findPetsByStatus.ts index 32a4e0d83..c40484bf4 100644 --- a/examples/advanced/src/gen/clients/axios/petService/findPetsByStatus.ts +++ b/examples/advanced/src/gen/clients/axios/petService/findPetsByStatus.ts @@ -5,8 +5,7 @@ import type { FindPetsByStatusQueryResponse, FindPetsByStatusQueryParams } from /** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ + * @link /pet/findByStatus */ export async function findPetsByStatus( params?: FindPetsByStatusQueryParams, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/petService/findPetsByTags.ts b/examples/advanced/src/gen/clients/axios/petService/findPetsByTags.ts index b07e12ab6..53ae09557 100644 --- a/examples/advanced/src/gen/clients/axios/petService/findPetsByTags.ts +++ b/examples/advanced/src/gen/clients/axios/petService/findPetsByTags.ts @@ -5,8 +5,7 @@ import type { FindPetsByTagsQueryResponse, FindPetsByTagsQueryParams, FindPetsBy /** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ + * @link /pet/findByTags */ export async function findPetsByTags( headers: FindPetsByTagsHeaderParams, params?: FindPetsByTagsQueryParams, diff --git a/examples/advanced/src/gen/clients/axios/petService/getPetById.ts b/examples/advanced/src/gen/clients/axios/petService/getPetById.ts index 9f56fe05e..7ff5d21dc 100644 --- a/examples/advanced/src/gen/clients/axios/petService/getPetById.ts +++ b/examples/advanced/src/gen/clients/axios/petService/getPetById.ts @@ -5,8 +5,7 @@ import type { GetPetByIdQueryResponse, GetPetByIdPathParams } from '../../../mod /** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ + * @link /pet/:petId */ export async function getPetById( { petId }: GetPetByIdPathParams, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/petService/updatePet.ts b/examples/advanced/src/gen/clients/axios/petService/updatePet.ts index b9f18baa1..949a6be4c 100644 --- a/examples/advanced/src/gen/clients/axios/petService/updatePet.ts +++ b/examples/advanced/src/gen/clients/axios/petService/updatePet.ts @@ -5,8 +5,7 @@ import type { UpdatePetMutationRequest, UpdatePetMutationResponse } from '../../ /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export async function updatePet( data: UpdatePetMutationRequest, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/petService/updatePetWithForm.ts b/examples/advanced/src/gen/clients/axios/petService/updatePetWithForm.ts index a8370519e..1d5911fd7 100644 --- a/examples/advanced/src/gen/clients/axios/petService/updatePetWithForm.ts +++ b/examples/advanced/src/gen/clients/axios/petService/updatePetWithForm.ts @@ -8,8 +8,7 @@ import type { /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export async function updatePetWithForm( { petId }: UpdatePetWithFormPathParams, params?: UpdatePetWithFormQueryParams, diff --git a/examples/advanced/src/gen/clients/axios/petService/uploadFile.ts b/examples/advanced/src/gen/clients/axios/petService/uploadFile.ts index d9a177645..523691afb 100644 --- a/examples/advanced/src/gen/clients/axios/petService/uploadFile.ts +++ b/examples/advanced/src/gen/clients/axios/petService/uploadFile.ts @@ -9,8 +9,7 @@ import type { /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export async function uploadFile( { petId }: UploadFilePathParams, data?: UploadFileMutationRequest, diff --git a/examples/advanced/src/gen/clients/axios/petsService/createPets.ts b/examples/advanced/src/gen/clients/axios/petsService/createPets.ts index b7099672a..2dd084783 100644 --- a/examples/advanced/src/gen/clients/axios/petsService/createPets.ts +++ b/examples/advanced/src/gen/clients/axios/petsService/createPets.ts @@ -10,8 +10,7 @@ import type { /** * @summary Create a pet - * @link /pets/:uuid - */ + * @link /pets/:uuid */ export async function createPets( { uuid }: CreatePetsPathParams, data: CreatePetsMutationRequest, diff --git a/examples/advanced/src/gen/clients/axios/userService/createUser.ts b/examples/advanced/src/gen/clients/axios/userService/createUser.ts index 49224b561..d3d0c2b6c 100644 --- a/examples/advanced/src/gen/clients/axios/userService/createUser.ts +++ b/examples/advanced/src/gen/clients/axios/userService/createUser.ts @@ -5,8 +5,7 @@ import type { CreateUserMutationRequest, CreateUserMutationResponse } from '../. /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export async function createUser( data?: CreateUserMutationRequest, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/userService/createUsersWithListInput.ts b/examples/advanced/src/gen/clients/axios/userService/createUsersWithListInput.ts index 318b33dc4..85449c649 100644 --- a/examples/advanced/src/gen/clients/axios/userService/createUsersWithListInput.ts +++ b/examples/advanced/src/gen/clients/axios/userService/createUsersWithListInput.ts @@ -8,8 +8,7 @@ import type { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export async function createUsersWithListInput( data?: CreateUsersWithListInputMutationRequest, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/userService/deleteUser.ts b/examples/advanced/src/gen/clients/axios/userService/deleteUser.ts index c10ef3c64..294ab2982 100644 --- a/examples/advanced/src/gen/clients/axios/userService/deleteUser.ts +++ b/examples/advanced/src/gen/clients/axios/userService/deleteUser.ts @@ -5,8 +5,7 @@ import type { DeleteUserMutationResponse, DeleteUserPathParams } from '../../../ /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export async function deleteUser( { username }: DeleteUserPathParams, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/userService/getUserByName.ts b/examples/advanced/src/gen/clients/axios/userService/getUserByName.ts index e9654dd14..de2356d6e 100644 --- a/examples/advanced/src/gen/clients/axios/userService/getUserByName.ts +++ b/examples/advanced/src/gen/clients/axios/userService/getUserByName.ts @@ -4,8 +4,7 @@ import type { GetUserByNameQueryResponse, GetUserByNamePathParams } from '../../ /** * @summary Get user by user name - * @link /user/:username - */ + * @link /user/:username */ export async function getUserByName( { username }: GetUserByNamePathParams, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/userService/loginUser.ts b/examples/advanced/src/gen/clients/axios/userService/loginUser.ts index e2d1cddcf..24089da55 100644 --- a/examples/advanced/src/gen/clients/axios/userService/loginUser.ts +++ b/examples/advanced/src/gen/clients/axios/userService/loginUser.ts @@ -4,8 +4,7 @@ import type { LoginUserQueryResponse, LoginUserQueryParams } from '../../../mode /** * @summary Logs user into the system - * @link /user/login - */ + * @link /user/login */ export async function loginUser( params?: LoginUserQueryParams, options: Partial[0]> = {}, diff --git a/examples/advanced/src/gen/clients/axios/userService/logoutUser.ts b/examples/advanced/src/gen/clients/axios/userService/logoutUser.ts index d92d074ae..3c5771a37 100644 --- a/examples/advanced/src/gen/clients/axios/userService/logoutUser.ts +++ b/examples/advanced/src/gen/clients/axios/userService/logoutUser.ts @@ -4,8 +4,7 @@ import type { LogoutUserQueryResponse } from '../../../models/ts/userController/ /** * @summary Logs out current logged in user session - * @link /user/logout - */ + * @link /user/logout */ export async function logoutUser(options: Partial[0]> = {}): Promise> { return client({ method: 'get', diff --git a/examples/advanced/src/gen/clients/axios/userService/updateUser.ts b/examples/advanced/src/gen/clients/axios/userService/updateUser.ts index 44ed2db99..bcd5b1025 100644 --- a/examples/advanced/src/gen/clients/axios/userService/updateUser.ts +++ b/examples/advanced/src/gen/clients/axios/userService/updateUser.ts @@ -5,8 +5,7 @@ import type { UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserP /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export async function updateUser( { username }: UpdateUserPathParams, data?: UpdateUserMutationRequest, diff --git a/examples/advanced/src/gen/clients/hooks/petController/useAddPet.ts b/examples/advanced/src/gen/clients/hooks/petController/useAddPet.ts index b03c6dc78..23bbe56a9 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useAddPet.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useAddPet.ts @@ -21,8 +21,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPet(options: { mutation?: UseMutationOptions client?: AddPet['client']['paramaters'] diff --git a/examples/advanced/src/gen/clients/hooks/petController/useDeletePet.ts b/examples/advanced/src/gen/clients/hooks/petController/useDeletePet.ts index 72e2259ee..4781d268e 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useDeletePet.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useDeletePet.ts @@ -21,8 +21,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePet( petId: DeletePetPathParams['petId'], headers?: DeletePet['headerParams'], diff --git a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByStatus.ts b/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByStatus.ts index 6ee034eb5..1b594b0eb 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByStatus.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByStatus.ts @@ -41,12 +41,11 @@ export function findPetsByStatusQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatus< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], @@ -71,7 +70,6 @@ export function useFindPetsByStatus< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByStatusInfiniteQueryKey = (params?: FindPetsByStatus['queryParams']) => [{ url: '/pet/findByStatus' }, ...(params ? [params] : [])] as const export type FindPetsByStatusInfiniteQueryKey = ReturnType @@ -100,12 +98,11 @@ export function findPetsByStatusInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatusInfinite< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], diff --git a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTags.ts b/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTags.ts index 746578d00..b0b756330 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTags.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTags.ts @@ -48,12 +48,11 @@ export function findPetsByTagsQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTags< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], @@ -78,7 +77,6 @@ export function useFindPetsByTags< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByTagsInfiniteQueryKey = (params?: FindPetsByTags['queryParams']) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const export type FindPetsByTagsInfiniteQueryKey = ReturnType export function findPetsByTagsInfiniteQueryOptions< @@ -108,12 +106,11 @@ export function findPetsByTagsInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTagsInfinite< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], diff --git a/examples/advanced/src/gen/clients/hooks/petController/useGetPetById.ts b/examples/advanced/src/gen/clients/hooks/petController/useGetPetById.ts index a05343229..536009411 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useGetPetById.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useGetPetById.ts @@ -40,12 +40,11 @@ export function getPetByIdQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetById< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], @@ -70,7 +69,6 @@ export function useGetPetById< query.queryKey = queryKey as TQueryKey return query } - export const getPetByIdInfiniteQueryKey = (petId: GetPetByIdPathParams['petId']) => [{ url: '/pet/:petId', params: { petId: petId } }] as const export type GetPetByIdInfiniteQueryKey = ReturnType export function getPetByIdInfiniteQueryOptions< @@ -93,12 +91,11 @@ export function getPetByIdInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetByIdInfinite< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], diff --git a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePet.ts b/examples/advanced/src/gen/clients/hooks/petController/useUpdatePet.ts index f3be14ea6..180910885 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePet.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useUpdatePet.ts @@ -21,8 +21,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePet(options: { mutation?: UseMutationOptions client?: UpdatePet['client']['paramaters'] diff --git a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePetWithForm.ts b/examples/advanced/src/gen/clients/hooks/petController/useUpdatePetWithForm.ts index 2c52242ba..3a30914c1 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePetWithForm.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useUpdatePetWithForm.ts @@ -25,8 +25,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithForm( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithForm['queryParams'], diff --git a/examples/advanced/src/gen/clients/hooks/petController/useUploadFile.ts b/examples/advanced/src/gen/clients/hooks/petController/useUploadFile.ts index 01987e458..9f0e94e95 100644 --- a/examples/advanced/src/gen/clients/hooks/petController/useUploadFile.ts +++ b/examples/advanced/src/gen/clients/hooks/petController/useUploadFile.ts @@ -25,8 +25,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFile( petId: UploadFilePathParams['petId'], params?: UploadFile['queryParams'], diff --git a/examples/advanced/src/gen/clients/hooks/petsController/useCreatePets.ts b/examples/advanced/src/gen/clients/hooks/petsController/useCreatePets.ts index dc6b6e09c..7f1e1a84c 100644 --- a/examples/advanced/src/gen/clients/hooks/petsController/useCreatePets.ts +++ b/examples/advanced/src/gen/clients/hooks/petsController/useCreatePets.ts @@ -28,8 +28,7 @@ type CreatePets = { } /** * @summary Create a pet - * @link /pets/:uuid - */ + * @link /pets/:uuid */ export function useCreatePets( uuid: CreatePetsPathParams['uuid'], headers: CreatePets['headerParams'], diff --git a/examples/advanced/src/gen/clients/hooks/userController/useCreateUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useCreateUser.ts index cec9711c2..d1bcb5a9e 100644 --- a/examples/advanced/src/gen/clients/hooks/userController/useCreateUser.ts +++ b/examples/advanced/src/gen/clients/hooks/userController/useCreateUser.ts @@ -21,8 +21,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUser(options: { mutation?: UseMutationOptions client?: CreateUser['client']['paramaters'] diff --git a/examples/advanced/src/gen/clients/hooks/userController/useCreateUsersWithListInput.ts b/examples/advanced/src/gen/clients/hooks/userController/useCreateUsersWithListInput.ts index 3880dd025..a0937e060 100644 --- a/examples/advanced/src/gen/clients/hooks/userController/useCreateUsersWithListInput.ts +++ b/examples/advanced/src/gen/clients/hooks/userController/useCreateUsersWithListInput.ts @@ -29,8 +29,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInput(options: { mutation?: UseMutationOptions client?: CreateUsersWithListInput['client']['paramaters'] diff --git a/examples/advanced/src/gen/clients/hooks/userController/useDeleteUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useDeleteUser.ts index e0a884f34..90937e18e 100644 --- a/examples/advanced/src/gen/clients/hooks/userController/useDeleteUser.ts +++ b/examples/advanced/src/gen/clients/hooks/userController/useDeleteUser.ts @@ -21,8 +21,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUser(username: DeleteUserPathParams['username'], options: { mutation?: UseMutationOptions client?: DeleteUser['client']['paramaters'] diff --git a/examples/advanced/src/gen/clients/hooks/userController/useGetUserByName.ts b/examples/advanced/src/gen/clients/hooks/userController/useGetUserByName.ts index 8f2e46486..96bdcb221 100644 --- a/examples/advanced/src/gen/clients/hooks/userController/useGetUserByName.ts +++ b/examples/advanced/src/gen/clients/hooks/userController/useGetUserByName.ts @@ -40,11 +40,10 @@ export function getUserByNameQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByName< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], @@ -69,7 +68,6 @@ export function useGetUserByName< query.queryKey = queryKey as TQueryKey return query } - export const getUserByNameInfiniteQueryKey = (username: GetUserByNamePathParams['username']) => [{ url: '/user/:username', params: { username: username } }] as const export type GetUserByNameInfiniteQueryKey = ReturnType @@ -93,11 +91,10 @@ export function getUserByNameInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByNameInfinite< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], diff --git a/examples/advanced/src/gen/clients/hooks/userController/useLoginUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useLoginUser.ts index 956aa9cb0..ea0b6f1f0 100644 --- a/examples/advanced/src/gen/clients/hooks/userController/useLoginUser.ts +++ b/examples/advanced/src/gen/clients/hooks/userController/useLoginUser.ts @@ -41,11 +41,10 @@ export function loginUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUser< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], @@ -70,7 +69,6 @@ export function useLoginUser< query.queryKey = queryKey as TQueryKey return query } - export const loginUserInfiniteQueryKey = (params?: LoginUser['queryParams']) => [{ url: '/user/login' }, ...(params ? [params] : [])] as const export type LoginUserInfiniteQueryKey = ReturnType export function loginUserInfiniteQueryOptions< @@ -98,11 +96,10 @@ export function loginUserInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUserInfinite< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], diff --git a/examples/advanced/src/gen/clients/hooks/userController/useLogoutUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useLogoutUser.ts index 0144d2a20..a76ea0e24 100644 --- a/examples/advanced/src/gen/clients/hooks/userController/useLogoutUser.ts +++ b/examples/advanced/src/gen/clients/hooks/userController/useLogoutUser.ts @@ -37,11 +37,10 @@ export function logoutUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUser< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], @@ -66,7 +65,6 @@ export function useLogoutUser< query.queryKey = queryKey as TQueryKey return query } - export const logoutUserInfiniteQueryKey = () => [{ url: '/user/logout' }] as const export type LogoutUserInfiniteQueryKey = ReturnType export function logoutUserInfiniteQueryOptions< @@ -88,11 +86,10 @@ export function logoutUserInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUserInfinite< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], diff --git a/examples/advanced/src/gen/clients/hooks/userController/useUpdateUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useUpdateUser.ts index d28541571..e9e29a02a 100644 --- a/examples/advanced/src/gen/clients/hooks/userController/useUpdateUser.ts +++ b/examples/advanced/src/gen/clients/hooks/userController/useUpdateUser.ts @@ -21,8 +21,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUser(username: UpdateUserPathParams['username'], options: { mutation?: UseMutationOptions client?: UpdateUser['client']['paramaters'] diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useAddPet.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useAddPet.ts index 4d182bb61..32828326d 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useAddPet.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useAddPet.ts @@ -7,8 +7,7 @@ import type { AddPetMutationRequest, AddPetMutationResponse, AddPet405 } from '. /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPet(options?: { mutation?: SWRMutationConfiguration, TError, string | null, TVariables> client?: Partial>[0]> diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useDeletePet.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useDeletePet.ts index db3444c3e..03f88a071 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useDeletePet.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useDeletePet.ts @@ -7,8 +7,7 @@ import type { DeletePetMutationResponse, DeletePetPathParams, DeletePetHeaderPar /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePet( petId: DeletePetPathParams['petId'], headers?: DeletePetHeaderParams, diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByStatus.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByStatus.ts index 1eb803083..df4ad5ba5 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByStatus.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByStatus.ts @@ -18,12 +18,11 @@ export function findPetsByStatusQueryOptions res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatus(params?: FindPetsByStatusQueryParams, options?: { query?: SWRConfiguration, TError> client?: Partial>[0]> diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByTags.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByTags.ts index a6a0ec59a..b6e189533 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByTags.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useFindPetsByTags.ts @@ -25,12 +25,11 @@ export function findPetsByTagsQueryOptions res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTags( params?: FindPetsByTagsQueryParams, headers?: FindPetsByTagsHeaderParams, diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useGetPetById.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useGetPetById.ts index 93482f6ec..c6acf11ad 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useGetPetById.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useGetPetById.ts @@ -17,12 +17,11 @@ export function getPetByIdQueryOptions res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetById(petId: GetPetByIdPathParams['petId'], options?: { query?: SWRConfiguration, TError> client?: Partial>[0]> diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePet.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePet.ts index 410d8988e..7e9d8777a 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePet.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePet.ts @@ -7,8 +7,7 @@ import type { UpdatePetMutationRequest, UpdatePetMutationResponse, UpdatePet400, /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePet( options?: { mutation?: SWRMutationConfiguration, TError, string | null, TVariables> diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePetWithForm.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePetWithForm.ts index f558155cc..c5940b529 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePetWithForm.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useUpdatePetWithForm.ts @@ -11,8 +11,7 @@ import type { /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithForm( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithFormQueryParams, diff --git a/examples/advanced/src/gen/clients/swr/petSWRController/useUploadFile.ts b/examples/advanced/src/gen/clients/swr/petSWRController/useUploadFile.ts index b366d4789..4546c800d 100644 --- a/examples/advanced/src/gen/clients/swr/petSWRController/useUploadFile.ts +++ b/examples/advanced/src/gen/clients/swr/petSWRController/useUploadFile.ts @@ -11,8 +11,7 @@ import type { /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFile( petId: UploadFilePathParams['petId'], params?: UploadFileQueryParams, diff --git a/examples/advanced/src/gen/clients/swr/petsSWRController/useCreatePets.ts b/examples/advanced/src/gen/clients/swr/petsSWRController/useCreatePets.ts index f5a9dfacd..9c819e9d0 100644 --- a/examples/advanced/src/gen/clients/swr/petsSWRController/useCreatePets.ts +++ b/examples/advanced/src/gen/clients/swr/petsSWRController/useCreatePets.ts @@ -14,8 +14,7 @@ import type { /** * @summary Create a pet - * @link /pets/:uuid - */ + * @link /pets/:uuid */ export function useCreatePets( uuid: CreatePetsPathParams['uuid'], params?: CreatePetsQueryParams, diff --git a/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUser.ts b/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUser.ts index b4648bce2..85af62d18 100644 --- a/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUser.ts +++ b/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUser.ts @@ -7,8 +7,7 @@ import type { CreateUserMutationRequest, CreateUserMutationResponse, CreateUserE /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUser(options?: { mutation?: SWRMutationConfiguration, TError, string | null, TVariables> client?: Partial>[0]> diff --git a/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUsersWithListInput.ts b/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUsersWithListInput.ts index c932f203a..e5bb07e16 100644 --- a/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUsersWithListInput.ts +++ b/examples/advanced/src/gen/clients/swr/userSWRController/useCreateUsersWithListInput.ts @@ -11,8 +11,7 @@ import type { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInput< TData = CreateUsersWithListInputMutationResponse, TError = CreateUsersWithListInputError, diff --git a/examples/advanced/src/gen/clients/swr/userSWRController/useDeleteUser.ts b/examples/advanced/src/gen/clients/swr/userSWRController/useDeleteUser.ts index 7043e0822..6f9d121a9 100644 --- a/examples/advanced/src/gen/clients/swr/userSWRController/useDeleteUser.ts +++ b/examples/advanced/src/gen/clients/swr/userSWRController/useDeleteUser.ts @@ -7,8 +7,7 @@ import type { DeleteUserMutationResponse, DeleteUserPathParams, DeleteUser400, D /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUser( username: DeleteUserPathParams['username'], options?: { diff --git a/examples/advanced/src/gen/clients/swr/userSWRController/useGetUserByName.ts b/examples/advanced/src/gen/clients/swr/userSWRController/useGetUserByName.ts index 94de3448b..b6a140982 100644 --- a/examples/advanced/src/gen/clients/swr/userSWRController/useGetUserByName.ts +++ b/examples/advanced/src/gen/clients/swr/userSWRController/useGetUserByName.ts @@ -17,11 +17,10 @@ export function getUserByNameQueryOptions res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByName( username: GetUserByNamePathParams['username'], options?: { diff --git a/examples/advanced/src/gen/clients/swr/userSWRController/useLoginUser.ts b/examples/advanced/src/gen/clients/swr/userSWRController/useLoginUser.ts index d9408b194..925c91a4a 100644 --- a/examples/advanced/src/gen/clients/swr/userSWRController/useLoginUser.ts +++ b/examples/advanced/src/gen/clients/swr/userSWRController/useLoginUser.ts @@ -18,11 +18,10 @@ export function loginUserQueryOptions res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUser(params?: LoginUserQueryParams, options?: { query?: SWRConfiguration, TError> client?: Partial>[0]> diff --git a/examples/advanced/src/gen/clients/swr/userSWRController/useLogoutUser.ts b/examples/advanced/src/gen/clients/swr/userSWRController/useLogoutUser.ts index bc2a248e2..aa1a967c7 100644 --- a/examples/advanced/src/gen/clients/swr/userSWRController/useLogoutUser.ts +++ b/examples/advanced/src/gen/clients/swr/userSWRController/useLogoutUser.ts @@ -16,11 +16,10 @@ export function logoutUserQueryOptions res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUser(options?: { query?: SWRConfiguration, TError> client?: Partial>[0]> diff --git a/examples/advanced/src/gen/clients/swr/userSWRController/useUpdateUser.ts b/examples/advanced/src/gen/clients/swr/userSWRController/useUpdateUser.ts index 467cf2554..2b6c6a8b3 100644 --- a/examples/advanced/src/gen/clients/swr/userSWRController/useUpdateUser.ts +++ b/examples/advanced/src/gen/clients/swr/userSWRController/useUpdateUser.ts @@ -7,8 +7,7 @@ import type { UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserP /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUser( username: UpdateUserPathParams['username'], options?: { diff --git a/examples/advanced/src/gen/mocks/createAddPetRequest.ts b/examples/advanced/src/gen/mocks/createAddPetRequest.ts index b0516ef06..b6155abe1 100644 --- a/examples/advanced/src/gen/mocks/createAddPetRequest.ts +++ b/examples/advanced/src/gen/mocks/createAddPetRequest.ts @@ -1,8 +1,7 @@ -import { faker } from '@faker-js/faker' - import { createCategory } from './createCategory' import { createTag } from './createTag' -import { AddPetRequest } from '../models/ts/AddPetRequest' +import { faker } from '@faker-js/faker' +import type { AddPetRequest } from '../models/ts/AddPetRequest' export function createAddPetRequest(): NonNullable { return { diff --git a/examples/advanced/src/gen/mocks/createAddress.ts b/examples/advanced/src/gen/mocks/createAddress.ts index 3082714e2..23d006514 100644 --- a/examples/advanced/src/gen/mocks/createAddress.ts +++ b/examples/advanced/src/gen/mocks/createAddress.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Address } from '../models/ts/Address' +import type { Address } from '../models/ts/Address' export function createAddress(): NonNullable
{ return { 'street': faker.string.alpha(), 'city': faker.string.alpha(), 'state': faker.string.alpha(), 'zip': faker.string.alpha() } diff --git a/examples/advanced/src/gen/mocks/createApiResponse.ts b/examples/advanced/src/gen/mocks/createApiResponse.ts index 76a0ac701..6edd90ad1 100644 --- a/examples/advanced/src/gen/mocks/createApiResponse.ts +++ b/examples/advanced/src/gen/mocks/createApiResponse.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { ApiResponse } from '../models/ts/ApiResponse' +import type { ApiResponse } from '../models/ts/ApiResponse' export function createApiResponse(): NonNullable { return { 'code': faker.number.float({}), 'type': faker.string.alpha(), 'message': faker.string.alpha() } diff --git a/examples/advanced/src/gen/mocks/createCategory.ts b/examples/advanced/src/gen/mocks/createCategory.ts index 884d6053a..bed185b32 100644 --- a/examples/advanced/src/gen/mocks/createCategory.ts +++ b/examples/advanced/src/gen/mocks/createCategory.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Category } from '../models/ts/Category' +import type { Category } from '../models/ts/Category' export function createCategory(): NonNullable { return { 'id': faker.number.float({}), 'name': faker.string.alpha() } diff --git a/examples/advanced/src/gen/mocks/createCustomer.ts b/examples/advanced/src/gen/mocks/createCustomer.ts index cae3ff224..c31896353 100644 --- a/examples/advanced/src/gen/mocks/createCustomer.ts +++ b/examples/advanced/src/gen/mocks/createCustomer.ts @@ -1,7 +1,6 @@ -import { faker } from '@faker-js/faker' - import { createAddress } from './createAddress' -import { Customer } from '../models/ts/Customer' +import { faker } from '@faker-js/faker' +import type { Customer } from '../models/ts/Customer' export function createCustomer(): NonNullable { return { 'id': faker.number.float({}), 'username': faker.string.alpha(), 'address': faker.helpers.arrayElements([createAddress()]) as any } diff --git a/examples/advanced/src/gen/mocks/createOrder.ts b/examples/advanced/src/gen/mocks/createOrder.ts index 36318ee4a..40f29795b 100644 --- a/examples/advanced/src/gen/mocks/createOrder.ts +++ b/examples/advanced/src/gen/mocks/createOrder.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Order } from '../models/ts/Order' +import type { Order } from '../models/ts/Order' export function createOrder(): NonNullable { return { diff --git a/examples/advanced/src/gen/mocks/createPet.ts b/examples/advanced/src/gen/mocks/createPet.ts index 8da05fd26..7aeee5d29 100644 --- a/examples/advanced/src/gen/mocks/createPet.ts +++ b/examples/advanced/src/gen/mocks/createPet.ts @@ -1,8 +1,7 @@ -import { faker } from '@faker-js/faker' - import { createCategory } from './createCategory' import { createTag } from './createTag' -import { Pet } from '../models/ts/Pet' +import { faker } from '@faker-js/faker' +import type { Pet } from '../models/ts/Pet' export function createPet(): NonNullable { return { diff --git a/examples/advanced/src/gen/mocks/createPetNotFound.ts b/examples/advanced/src/gen/mocks/createPetNotFound.ts index 7a936b40c..0c51aab09 100644 --- a/examples/advanced/src/gen/mocks/createPetNotFound.ts +++ b/examples/advanced/src/gen/mocks/createPetNotFound.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { PetNotFound } from '../models/ts/PetNotFound' +import type { PetNotFound } from '../models/ts/PetNotFound' export function createPetNotFound(): NonNullable { return { 'code': faker.number.float({}), 'message': faker.string.alpha() } diff --git a/examples/advanced/src/gen/mocks/createTag.ts b/examples/advanced/src/gen/mocks/createTag.ts index d21f7832d..d5d5736d9 100644 --- a/examples/advanced/src/gen/mocks/createTag.ts +++ b/examples/advanced/src/gen/mocks/createTag.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Tag } from '../models/ts/Tag' +import type { Tag } from '../models/ts/Tag' export function createTag(): NonNullable { return { 'id': faker.number.float({}), 'name': faker.string.alpha() } diff --git a/examples/advanced/src/gen/mocks/createUser.ts b/examples/advanced/src/gen/mocks/createUser.ts index 947093771..8f3c653ec 100644 --- a/examples/advanced/src/gen/mocks/createUser.ts +++ b/examples/advanced/src/gen/mocks/createUser.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { User } from '../models/ts/User' +import type { User } from '../models/ts/User' export function createUser(): NonNullable { return { diff --git a/examples/advanced/src/gen/mocks/createUserArray.ts b/examples/advanced/src/gen/mocks/createUserArray.ts index d1c89a413..7c90d46f2 100644 --- a/examples/advanced/src/gen/mocks/createUserArray.ts +++ b/examples/advanced/src/gen/mocks/createUserArray.ts @@ -1,7 +1,6 @@ -import { faker } from '@faker-js/faker' - import { createUser } from './createUser' -import { UserArray } from '../models/ts/UserArray' +import { faker } from '@faker-js/faker' +import type { UserArray } from '../models/ts/UserArray' export function createUserArray(): NonNullable { return faker.helpers.arrayElements([createUser()]) as any diff --git a/examples/advanced/src/gen/mocks/petController/createAddPet.ts b/examples/advanced/src/gen/mocks/petController/createAddPet.ts index 489c23997..4b9eac00a 100644 --- a/examples/advanced/src/gen/mocks/petController/createAddPet.ts +++ b/examples/advanced/src/gen/mocks/petController/createAddPet.ts @@ -1,15 +1,11 @@ import { faker } from '@faker-js/faker' - import { createAddPetRequest } from '../createAddPetRequest' import { createPet } from '../createPet' -import { AddPet405 } from '../../models/ts/petController/AddPet' -import { AddPetMutationRequest } from '../../models/ts/petController/AddPet' -import { AddPetMutationResponse } from '../../models/ts/petController/AddPet' +import type { AddPet405, AddPetMutationRequest, AddPetMutationResponse } from '../../models/ts/petController/AddPet' export function createAddPet405(): NonNullable { return { 'code': faker.number.float({}), 'message': faker.string.alpha() } } - /** * @description Create a new pet in the store */ @@ -17,7 +13,6 @@ export function createAddPet405(): NonNullable { export function createAddPetMutationRequest(): NonNullable { return createAddPetRequest() } - /** * @description Successful operation */ diff --git a/examples/advanced/src/gen/mocks/petController/createDeletePet.ts b/examples/advanced/src/gen/mocks/petController/createDeletePet.ts index 3832a434a..56efe91c5 100644 --- a/examples/advanced/src/gen/mocks/petController/createDeletePet.ts +++ b/examples/advanced/src/gen/mocks/petController/createDeletePet.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeletePet400 } from '../../models/ts/petController/DeletePet' -import { DeletePetHeaderParams } from '../../models/ts/petController/DeletePet' -import { DeletePetMutationResponse } from '../../models/ts/petController/DeletePet' -import { DeletePetPathParams } from '../../models/ts/petController/DeletePet' +import type { DeletePet400, DeletePetHeaderParams, DeletePetMutationResponse, DeletePetPathParams } from '../../models/ts/petController/DeletePet' /** * @description Invalid pet value diff --git a/examples/advanced/src/gen/mocks/petController/createFindPetsByStatus.ts b/examples/advanced/src/gen/mocks/petController/createFindPetsByStatus.ts index f8eb4fe18..7810d9700 100644 --- a/examples/advanced/src/gen/mocks/petController/createFindPetsByStatus.ts +++ b/examples/advanced/src/gen/mocks/petController/createFindPetsByStatus.ts @@ -1,9 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { FindPetsByStatus400 } from '../../models/ts/petController/FindPetsByStatus' -import { FindPetsByStatusQueryParams } from '../../models/ts/petController/FindPetsByStatus' -import { FindPetsByStatusQueryResponse } from '../../models/ts/petController/FindPetsByStatus' +import type { FindPetsByStatus400, FindPetsByStatusQueryParams, FindPetsByStatusQueryResponse } from '../../models/ts/petController/FindPetsByStatus' /** * @description Invalid status value @@ -16,7 +13,6 @@ export function createFindPetsByStatus400(): NonNullable { export function createFindPetsByStatusQueryParams(): NonNullable { return { 'status': faker.helpers.arrayElement([`available`, `pending`, `sold`]) } } - /** * @description successful operation */ diff --git a/examples/advanced/src/gen/mocks/petController/createFindPetsByTags.ts b/examples/advanced/src/gen/mocks/petController/createFindPetsByTags.ts index 734adc7b2..65f7715ff 100644 --- a/examples/advanced/src/gen/mocks/petController/createFindPetsByTags.ts +++ b/examples/advanced/src/gen/mocks/petController/createFindPetsByTags.ts @@ -1,10 +1,11 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { FindPetsByTags400 } from '../../models/ts/petController/FindPetsByTags' -import { FindPetsByTagsHeaderParams } from '../../models/ts/petController/FindPetsByTags' -import { FindPetsByTagsQueryParams } from '../../models/ts/petController/FindPetsByTags' -import { FindPetsByTagsQueryResponse } from '../../models/ts/petController/FindPetsByTags' +import type { + FindPetsByTags400, + FindPetsByTagsHeaderParams, + FindPetsByTagsQueryParams, + FindPetsByTagsQueryResponse, +} from '../../models/ts/petController/FindPetsByTags' /** * @description Invalid tag value @@ -21,7 +22,6 @@ export function createFindPetsByTagsHeaderParams(): NonNullable { return { 'tags': faker.helpers.arrayElements([faker.string.alpha()]) as any, 'page': faker.string.alpha(), 'pageSize': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/advanced/src/gen/mocks/petController/createGetPetById.ts b/examples/advanced/src/gen/mocks/petController/createGetPetById.ts index b26a4fadd..292d4d1b8 100644 --- a/examples/advanced/src/gen/mocks/petController/createGetPetById.ts +++ b/examples/advanced/src/gen/mocks/petController/createGetPetById.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { GetPetById400 } from '../../models/ts/petController/GetPetById' -import { GetPetById404 } from '../../models/ts/petController/GetPetById' -import { GetPetByIdPathParams } from '../../models/ts/petController/GetPetById' -import { GetPetByIdQueryResponse } from '../../models/ts/petController/GetPetById' +import type { GetPetById400, GetPetById404, GetPetByIdPathParams, GetPetByIdQueryResponse } from '../../models/ts/petController/GetPetById' /** * @description Invalid ID supplied @@ -13,7 +9,6 @@ import { GetPetByIdQueryResponse } from '../../models/ts/petController/GetPetByI export function createGetPetById400(): NonNullable { return undefined } - /** * @description Pet not found */ @@ -25,7 +20,6 @@ export function createGetPetById404(): NonNullable { export function createGetPetByIdPathParams(): NonNullable { return { 'petId': faker.number.float({}) } } - /** * @description successful operation */ diff --git a/examples/advanced/src/gen/mocks/petController/createUpdatePet.ts b/examples/advanced/src/gen/mocks/petController/createUpdatePet.ts index 3fbc25841..c2333365e 100644 --- a/examples/advanced/src/gen/mocks/petController/createUpdatePet.ts +++ b/examples/advanced/src/gen/mocks/petController/createUpdatePet.ts @@ -1,9 +1,5 @@ import { createPet } from '../createPet' -import { UpdatePet400 } from '../../models/ts/petController/UpdatePet' -import { UpdatePet404 } from '../../models/ts/petController/UpdatePet' -import { UpdatePet405 } from '../../models/ts/petController/UpdatePet' -import { UpdatePetMutationRequest } from '../../models/ts/petController/UpdatePet' -import { UpdatePetMutationResponse } from '../../models/ts/petController/UpdatePet' +import type { UpdatePet400, UpdatePet404, UpdatePet405, UpdatePetMutationRequest, UpdatePetMutationResponse } from '../../models/ts/petController/UpdatePet' /** * @description Invalid ID supplied @@ -12,7 +8,6 @@ import { UpdatePetMutationResponse } from '../../models/ts/petController/UpdateP export function createUpdatePet400(): NonNullable { return undefined } - /** * @description Pet not found */ @@ -20,7 +15,6 @@ export function createUpdatePet400(): NonNullable { export function createUpdatePet404(): NonNullable { return undefined } - /** * @description Validation exception */ @@ -28,7 +22,6 @@ export function createUpdatePet404(): NonNullable { export function createUpdatePet405(): NonNullable { return undefined } - /** * @description Update an existent pet in the store */ @@ -36,7 +29,6 @@ export function createUpdatePet405(): NonNullable { export function createUpdatePetMutationRequest(): NonNullable { return createPet() } - /** * @description Successful operation */ diff --git a/examples/advanced/src/gen/mocks/petController/createUpdatePetWithForm.ts b/examples/advanced/src/gen/mocks/petController/createUpdatePetWithForm.ts index dcf15f730..9ecbf96ee 100644 --- a/examples/advanced/src/gen/mocks/petController/createUpdatePetWithForm.ts +++ b/examples/advanced/src/gen/mocks/petController/createUpdatePetWithForm.ts @@ -1,9 +1,10 @@ import { faker } from '@faker-js/faker' - -import { UpdatePetWithForm405 } from '../../models/ts/petController/UpdatePetWithForm' -import { UpdatePetWithFormMutationResponse } from '../../models/ts/petController/UpdatePetWithForm' -import { UpdatePetWithFormPathParams } from '../../models/ts/petController/UpdatePetWithForm' -import { UpdatePetWithFormQueryParams } from '../../models/ts/petController/UpdatePetWithForm' +import type { + UpdatePetWithForm405, + UpdatePetWithFormMutationResponse, + UpdatePetWithFormPathParams, + UpdatePetWithFormQueryParams, +} from '../../models/ts/petController/UpdatePetWithForm' /** * @description Invalid input diff --git a/examples/advanced/src/gen/mocks/petController/createUploadFile.ts b/examples/advanced/src/gen/mocks/petController/createUploadFile.ts index 89664944e..c532dae15 100644 --- a/examples/advanced/src/gen/mocks/petController/createUploadFile.ts +++ b/examples/advanced/src/gen/mocks/petController/createUploadFile.ts @@ -1,10 +1,11 @@ import { faker } from '@faker-js/faker' - import { createApiResponse } from '../createApiResponse' -import { UploadFileMutationRequest } from '../../models/ts/petController/UploadFile' -import { UploadFilePathParams } from '../../models/ts/petController/UploadFile' -import { UploadFileQueryParams } from '../../models/ts/petController/UploadFile' -import { UploadFileMutationResponse } from '../../models/ts/petController/UploadFile' +import type { + UploadFileMutationRequest, + UploadFileMutationResponse, + UploadFilePathParams, + UploadFileQueryParams, +} from '../../models/ts/petController/UploadFile' export function createUploadFileMutationRequest(): NonNullable { return faker.string.alpha() @@ -17,7 +18,6 @@ export function createUploadFilePathParams(): NonNullable export function createUploadFileQueryParams(): NonNullable { return { 'additionalMetadata': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/advanced/src/gen/mocks/petsController/createCreatePets.ts b/examples/advanced/src/gen/mocks/petsController/createCreatePets.ts index b40d39c7e..737a59fe3 100644 --- a/examples/advanced/src/gen/mocks/petsController/createCreatePets.ts +++ b/examples/advanced/src/gen/mocks/petsController/createCreatePets.ts @@ -1,13 +1,14 @@ import { faker } from '@faker-js/faker' - import { createPetNotFound } from '../createPetNotFound' -import { CreatePets201 } from '../../models/ts/petsController/CreatePets' -import { CreatePetsHeaderParams } from '../../models/ts/petsController/CreatePets' -import { CreatePetsMutationRequest } from '../../models/ts/petsController/CreatePets' -import { CreatePetsMutationResponse } from '../../models/ts/petsController/CreatePets' -import { CreatePetsPathParams } from '../../models/ts/petsController/CreatePets' -import { CreatePetsQueryParams } from '../../models/ts/petsController/CreatePets' -import { CreatePetsError } from '../../models/ts/petsController/CreatePets' +import type { + CreatePets201, + CreatePetsError, + CreatePetsHeaderParams, + CreatePetsMutationRequest, + CreatePetsMutationResponse, + CreatePetsPathParams, + CreatePetsQueryParams, +} from '../../models/ts/petsController/CreatePets' /** * @description Null response @@ -36,7 +37,6 @@ export function createCreatePetsPathParams(): NonNullable export function createCreatePetsQueryParams(): NonNullable { return { 'offset': faker.number.float({}) } } - /** * @description unexpected error */ diff --git a/examples/advanced/src/gen/mocks/userController/createCreateUser.ts b/examples/advanced/src/gen/mocks/userController/createCreateUser.ts index 07e7921a4..26ebf25cd 100644 --- a/examples/advanced/src/gen/mocks/userController/createCreateUser.ts +++ b/examples/advanced/src/gen/mocks/userController/createCreateUser.ts @@ -1,12 +1,9 @@ import { createUser } from '../createUser' -import { CreateUserMutationResponse } from '../../models/ts/userController/CreateUser' -import { CreateUserError } from '../../models/ts/userController/CreateUser' -import { CreateUserMutationRequest } from '../../models/ts/userController/CreateUser' +import type { CreateUserError, CreateUserMutationRequest, CreateUserMutationResponse } from '../../models/ts/userController/CreateUser' export function createCreateUserMutationResponse(): NonNullable { return undefined } - /** * @description successful operation */ @@ -14,7 +11,6 @@ export function createCreateUserMutationResponse(): NonNullable { return createUser() } - /** * @description Created user object */ diff --git a/examples/advanced/src/gen/mocks/userController/createCreateUsersWithListInput.ts b/examples/advanced/src/gen/mocks/userController/createCreateUsersWithListInput.ts index 0a5e9f452..b05087188 100644 --- a/examples/advanced/src/gen/mocks/userController/createCreateUsersWithListInput.ts +++ b/examples/advanced/src/gen/mocks/userController/createCreateUsersWithListInput.ts @@ -1,9 +1,10 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { CreateUsersWithListInputError } from '../../models/ts/userController/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationRequest } from '../../models/ts/userController/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationResponse } from '../../models/ts/userController/CreateUsersWithListInput' +import type { + CreateUsersWithListInputError, + CreateUsersWithListInputMutationRequest, + CreateUsersWithListInputMutationResponse, +} from '../../models/ts/userController/CreateUsersWithListInput' /** * @description successful operation @@ -16,7 +17,6 @@ export function createCreateUsersWithListInputError(): NonNullable { return faker.helpers.arrayElements([createUser()]) as any } - /** * @description Successful operation */ diff --git a/examples/advanced/src/gen/mocks/userController/createDeleteUser.ts b/examples/advanced/src/gen/mocks/userController/createDeleteUser.ts index 643e2bc13..677eb740c 100644 --- a/examples/advanced/src/gen/mocks/userController/createDeleteUser.ts +++ b/examples/advanced/src/gen/mocks/userController/createDeleteUser.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeleteUser400 } from '../../models/ts/userController/DeleteUser' -import { DeleteUser404 } from '../../models/ts/userController/DeleteUser' -import { DeleteUserMutationResponse } from '../../models/ts/userController/DeleteUser' -import { DeleteUserPathParams } from '../../models/ts/userController/DeleteUser' +import type { DeleteUser400, DeleteUser404, DeleteUserMutationResponse, DeleteUserPathParams } from '../../models/ts/userController/DeleteUser' /** * @description Invalid username supplied @@ -12,7 +8,6 @@ import { DeleteUserPathParams } from '../../models/ts/userController/DeleteUser' export function createDeleteUser400(): NonNullable { return undefined } - /** * @description User not found */ diff --git a/examples/advanced/src/gen/mocks/userController/createGetUserByName.ts b/examples/advanced/src/gen/mocks/userController/createGetUserByName.ts index b5336dad5..9a7a086b8 100644 --- a/examples/advanced/src/gen/mocks/userController/createGetUserByName.ts +++ b/examples/advanced/src/gen/mocks/userController/createGetUserByName.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { GetUserByName400 } from '../../models/ts/userController/GetUserByName' -import { GetUserByName404 } from '../../models/ts/userController/GetUserByName' -import { GetUserByNamePathParams } from '../../models/ts/userController/GetUserByName' -import { GetUserByNameQueryResponse } from '../../models/ts/userController/GetUserByName' +import type { GetUserByName400, GetUserByName404, GetUserByNamePathParams, GetUserByNameQueryResponse } from '../../models/ts/userController/GetUserByName' /** * @description Invalid username supplied @@ -13,7 +9,6 @@ import { GetUserByNameQueryResponse } from '../../models/ts/userController/GetUs export function createGetUserByName400(): NonNullable { return undefined } - /** * @description User not found */ @@ -25,7 +20,6 @@ export function createGetUserByName404(): NonNullable { export function createGetUserByNamePathParams(): NonNullable { return { 'username': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/advanced/src/gen/mocks/userController/createLoginUser.ts b/examples/advanced/src/gen/mocks/userController/createLoginUser.ts index 24d722060..fefe8719e 100644 --- a/examples/advanced/src/gen/mocks/userController/createLoginUser.ts +++ b/examples/advanced/src/gen/mocks/userController/createLoginUser.ts @@ -1,8 +1,5 @@ import { faker } from '@faker-js/faker' - -import { LoginUser400 } from '../../models/ts/userController/LoginUser' -import { LoginUserQueryParams } from '../../models/ts/userController/LoginUser' -import { LoginUserQueryResponse } from '../../models/ts/userController/LoginUser' +import type { LoginUser400, LoginUserQueryParams, LoginUserQueryResponse } from '../../models/ts/userController/LoginUser' /** * @description Invalid username/password supplied @@ -15,7 +12,6 @@ export function createLoginUser400(): NonNullable { export function createLoginUserQueryParams(): NonNullable { return { 'username': faker.string.alpha(), 'password': faker.internet.password() } } - /** * @description successful operation */ diff --git a/examples/advanced/src/gen/mocks/userController/createLogoutUser.ts b/examples/advanced/src/gen/mocks/userController/createLogoutUser.ts index f7a8d4e36..9a028a56d 100644 --- a/examples/advanced/src/gen/mocks/userController/createLogoutUser.ts +++ b/examples/advanced/src/gen/mocks/userController/createLogoutUser.ts @@ -1,5 +1,4 @@ -import { LogoutUserError } from '../../models/ts/userController/LogoutUser' -import { LogoutUserQueryResponse } from '../../models/ts/userController/LogoutUser' +import type { LogoutUserError, LogoutUserQueryResponse } from '../../models/ts/userController/LogoutUser' /** * @description successful operation diff --git a/examples/advanced/src/gen/mocks/userController/createUpdateUser.ts b/examples/advanced/src/gen/mocks/userController/createUpdateUser.ts index 03b1ca4c7..6c00c9ac7 100644 --- a/examples/advanced/src/gen/mocks/userController/createUpdateUser.ts +++ b/examples/advanced/src/gen/mocks/userController/createUpdateUser.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { UpdateUserError } from '../../models/ts/userController/UpdateUser' -import { UpdateUserMutationResponse } from '../../models/ts/userController/UpdateUser' -import { UpdateUserPathParams } from '../../models/ts/userController/UpdateUser' -import { UpdateUserMutationRequest } from '../../models/ts/userController/UpdateUser' +import type { UpdateUserError, UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserPathParams } from '../../models/ts/userController/UpdateUser' /** * @description successful operation @@ -21,7 +17,6 @@ export function createUpdateUserMutationResponse(): NonNullable { return { 'username': faker.string.alpha() } } - /** * @description Update an existent user in the store */ diff --git a/examples/advanced/src/gen/models/ts/petController/AddPet.ts b/examples/advanced/src/gen/models/ts/petController/AddPet.ts index d5d6a56ce..24964f592 100644 --- a/examples/advanced/src/gen/models/ts/petController/AddPet.ts +++ b/examples/advanced/src/gen/models/ts/petController/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Omit, 'name'> - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/advanced/src/gen/models/ts/petController/DeletePet.ts b/examples/advanced/src/gen/models/ts/petController/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/advanced/src/gen/models/ts/petController/DeletePet.ts +++ b/examples/advanced/src/gen/models/ts/petController/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/advanced/src/gen/models/ts/petController/FindPetsByStatus.ts b/examples/advanced/src/gen/models/ts/petController/FindPetsByStatus.ts index c45058f7e..ff9733596 100644 --- a/examples/advanced/src/gen/models/ts/petController/FindPetsByStatus.ts +++ b/examples/advanced/src/gen/models/ts/petController/FindPetsByStatus.ts @@ -23,7 +23,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/advanced/src/gen/models/ts/petController/FindPetsByTags.ts b/examples/advanced/src/gen/models/ts/petController/FindPetsByTags.ts index 6b432d2b3..1eb7a2682 100644 --- a/examples/advanced/src/gen/models/ts/petController/FindPetsByTags.ts +++ b/examples/advanced/src/gen/models/ts/petController/FindPetsByTags.ts @@ -41,7 +41,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/advanced/src/gen/models/ts/petController/GetPetById.ts b/examples/advanced/src/gen/models/ts/petController/GetPetById.ts index ece6bf3f2..06ef903d3 100644 --- a/examples/advanced/src/gen/models/ts/petController/GetPetById.ts +++ b/examples/advanced/src/gen/models/ts/petController/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Omit, 'name'> - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/advanced/src/gen/models/ts/petController/UpdatePet.ts b/examples/advanced/src/gen/models/ts/petController/UpdatePet.ts index 55a678741..a00563e96 100644 --- a/examples/advanced/src/gen/models/ts/petController/UpdatePet.ts +++ b/examples/advanced/src/gen/models/ts/petController/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Omit, 'id'> * @description Successful operation */ export type UpdatePetMutationResponse = Omit, 'name'> - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/advanced/src/gen/models/ts/petController/UpdatePetWithForm.ts b/examples/advanced/src/gen/models/ts/petController/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/advanced/src/gen/models/ts/petController/UpdatePetWithForm.ts +++ b/examples/advanced/src/gen/models/ts/petController/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/advanced/src/gen/models/ts/petController/UploadFile.ts b/examples/advanced/src/gen/models/ts/petController/UploadFile.ts index 70847577b..91de3ce6c 100644 --- a/examples/advanced/src/gen/models/ts/petController/UploadFile.ts +++ b/examples/advanced/src/gen/models/ts/petController/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/advanced/src/gen/models/ts/petsController/CreatePets.ts b/examples/advanced/src/gen/models/ts/petsController/CreatePets.ts index ff30d2be8..e61497690 100644 --- a/examples/advanced/src/gen/models/ts/petsController/CreatePets.ts +++ b/examples/advanced/src/gen/models/ts/petsController/CreatePets.ts @@ -52,7 +52,6 @@ export type CreatePetsQueryParams = { * @description unexpected error */ export type CreatePetsError = PetNotFound - export namespace CreatePetsMutation { export type Response = CreatePetsMutationResponse export type Request = CreatePetsMutationRequest diff --git a/examples/advanced/src/gen/models/ts/storeController/DeleteOrder.ts b/examples/advanced/src/gen/models/ts/storeController/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/advanced/src/gen/models/ts/storeController/DeleteOrder.ts +++ b/examples/advanced/src/gen/models/ts/storeController/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/advanced/src/gen/models/ts/storeController/GetInventory.ts b/examples/advanced/src/gen/models/ts/storeController/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/advanced/src/gen/models/ts/storeController/GetInventory.ts +++ b/examples/advanced/src/gen/models/ts/storeController/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/advanced/src/gen/models/ts/storeController/GetOrderById.ts b/examples/advanced/src/gen/models/ts/storeController/GetOrderById.ts index 1c492043b..38942cc18 100644 --- a/examples/advanced/src/gen/models/ts/storeController/GetOrderById.ts +++ b/examples/advanced/src/gen/models/ts/storeController/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/advanced/src/gen/models/ts/storeController/PlaceOrder.ts b/examples/advanced/src/gen/models/ts/storeController/PlaceOrder.ts index 2cb0aa9e5..48f26b0c6 100644 --- a/examples/advanced/src/gen/models/ts/storeController/PlaceOrder.ts +++ b/examples/advanced/src/gen/models/ts/storeController/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/advanced/src/gen/models/ts/storeController/PlaceOrderPatch.ts b/examples/advanced/src/gen/models/ts/storeController/PlaceOrderPatch.ts index fcf49f738..447419d6c 100644 --- a/examples/advanced/src/gen/models/ts/storeController/PlaceOrderPatch.ts +++ b/examples/advanced/src/gen/models/ts/storeController/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/advanced/src/gen/models/ts/userController/CreateUser.ts b/examples/advanced/src/gen/models/ts/userController/CreateUser.ts index 8e7a501c8..cbabb94f4 100644 --- a/examples/advanced/src/gen/models/ts/userController/CreateUser.ts +++ b/examples/advanced/src/gen/models/ts/userController/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/advanced/src/gen/models/ts/userController/CreateUsersWithListInput.ts b/examples/advanced/src/gen/models/ts/userController/CreateUsersWithListInput.ts index 495536e75..da5293091 100644 --- a/examples/advanced/src/gen/models/ts/userController/CreateUsersWithListInput.ts +++ b/examples/advanced/src/gen/models/ts/userController/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/advanced/src/gen/models/ts/userController/DeleteUser.ts b/examples/advanced/src/gen/models/ts/userController/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/advanced/src/gen/models/ts/userController/DeleteUser.ts +++ b/examples/advanced/src/gen/models/ts/userController/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/advanced/src/gen/models/ts/userController/GetUserByName.ts b/examples/advanced/src/gen/models/ts/userController/GetUserByName.ts index 06acd254c..c987d400f 100644 --- a/examples/advanced/src/gen/models/ts/userController/GetUserByName.ts +++ b/examples/advanced/src/gen/models/ts/userController/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/advanced/src/gen/models/ts/userController/LoginUser.ts b/examples/advanced/src/gen/models/ts/userController/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/advanced/src/gen/models/ts/userController/LoginUser.ts +++ b/examples/advanced/src/gen/models/ts/userController/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/advanced/src/gen/models/ts/userController/LogoutUser.ts b/examples/advanced/src/gen/models/ts/userController/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/advanced/src/gen/models/ts/userController/LogoutUser.ts +++ b/examples/advanced/src/gen/models/ts/userController/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/advanced/src/gen/models/ts/userController/UpdateUser.ts b/examples/advanced/src/gen/models/ts/userController/UpdateUser.ts index ab6e942f2..85a8f3aef 100644 --- a/examples/advanced/src/gen/models/ts/userController/UpdateUser.ts +++ b/examples/advanced/src/gen/models/ts/userController/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/advanced/src/gen/zod/addPetRequestSchema.ts b/examples/advanced/src/gen/zod/addPetRequestSchema.ts index 5254e62c9..7496930b8 100644 --- a/examples/advanced/src/gen/zod/addPetRequestSchema.ts +++ b/examples/advanced/src/gen/zod/addPetRequestSchema.ts @@ -1,7 +1,6 @@ -import { z } from 'zod' - import { categorySchema } from './categorySchema' import { tagSchema } from './tagSchema' +import { z } from 'zod' export const addPetRequestSchema = z.object({ 'id': z.number().optional(), diff --git a/examples/advanced/src/gen/zod/customerSchema.ts b/examples/advanced/src/gen/zod/customerSchema.ts index 419ef38bc..acf1326d0 100644 --- a/examples/advanced/src/gen/zod/customerSchema.ts +++ b/examples/advanced/src/gen/zod/customerSchema.ts @@ -1,6 +1,5 @@ -import { z } from 'zod' - import { addressSchema } from './addressSchema' +import { z } from 'zod' export const customerSchema = z.object({ 'id': z.number().optional(), diff --git a/examples/advanced/src/gen/zod/petController/addPetSchema.ts b/examples/advanced/src/gen/zod/petController/addPetSchema.ts index 82316470c..30e71bae7 100644 --- a/examples/advanced/src/gen/zod/petController/addPetSchema.ts +++ b/examples/advanced/src/gen/zod/petController/addPetSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { addPetRequestSchema } from '../addPetRequestSchema' import { petSchema } from '../petSchema' diff --git a/examples/advanced/src/gen/zod/petController/findPetsByStatusSchema.ts b/examples/advanced/src/gen/zod/petController/findPetsByStatusSchema.ts index a25ef7eb7..a674be24a 100644 --- a/examples/advanced/src/gen/zod/petController/findPetsByStatusSchema.ts +++ b/examples/advanced/src/gen/zod/petController/findPetsByStatusSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from '../petSchema' /** diff --git a/examples/advanced/src/gen/zod/petController/findPetsByTagsSchema.ts b/examples/advanced/src/gen/zod/petController/findPetsByTagsSchema.ts index 7a9e52c3b..9fe3a7bb2 100644 --- a/examples/advanced/src/gen/zod/petController/findPetsByTagsSchema.ts +++ b/examples/advanced/src/gen/zod/petController/findPetsByTagsSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from '../petSchema' /** diff --git a/examples/advanced/src/gen/zod/petController/getPetByIdSchema.ts b/examples/advanced/src/gen/zod/petController/getPetByIdSchema.ts index fcf66b049..b36f32616 100644 --- a/examples/advanced/src/gen/zod/petController/getPetByIdSchema.ts +++ b/examples/advanced/src/gen/zod/petController/getPetByIdSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from '../petSchema' /** diff --git a/examples/advanced/src/gen/zod/petController/updatePetSchema.ts b/examples/advanced/src/gen/zod/petController/updatePetSchema.ts index 1422275c0..26d06c3f9 100644 --- a/examples/advanced/src/gen/zod/petController/updatePetSchema.ts +++ b/examples/advanced/src/gen/zod/petController/updatePetSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from '../petSchema' /** diff --git a/examples/advanced/src/gen/zod/petController/uploadFileSchema.ts b/examples/advanced/src/gen/zod/petController/uploadFileSchema.ts index acb7556f5..33e516dc9 100644 --- a/examples/advanced/src/gen/zod/petController/uploadFileSchema.ts +++ b/examples/advanced/src/gen/zod/petController/uploadFileSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { apiResponseSchema } from '../apiResponseSchema' export const uploadFileMutationRequestSchema = z.string() diff --git a/examples/advanced/src/gen/zod/petSchema.ts b/examples/advanced/src/gen/zod/petSchema.ts index dc445a802..d7524ad96 100644 --- a/examples/advanced/src/gen/zod/petSchema.ts +++ b/examples/advanced/src/gen/zod/petSchema.ts @@ -1,7 +1,6 @@ -import { z } from 'zod' - import { categorySchema } from './categorySchema' import { tagSchema } from './tagSchema' +import { z } from 'zod' export const petSchema = z.object({ 'id': z.number().readonly().optional(), diff --git a/examples/advanced/src/gen/zod/petsController/createPetsSchema.ts b/examples/advanced/src/gen/zod/petsController/createPetsSchema.ts index f44cec03a..c9adc37a1 100644 --- a/examples/advanced/src/gen/zod/petsController/createPetsSchema.ts +++ b/examples/advanced/src/gen/zod/petsController/createPetsSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petNotFoundSchema } from '../petNotFoundSchema' /** diff --git a/examples/advanced/src/gen/zod/userArraySchema.ts b/examples/advanced/src/gen/zod/userArraySchema.ts index df207eb22..9c642aea8 100644 --- a/examples/advanced/src/gen/zod/userArraySchema.ts +++ b/examples/advanced/src/gen/zod/userArraySchema.ts @@ -1,5 +1,4 @@ -import { z } from 'zod' - import { userSchema } from './userSchema' +import { z } from 'zod' export const userArraySchema = z.array(z.lazy(() => userSchema).schema) diff --git a/examples/advanced/src/gen/zod/userController/createUserSchema.ts b/examples/advanced/src/gen/zod/userController/createUserSchema.ts index e152d9218..927040a07 100644 --- a/examples/advanced/src/gen/zod/userController/createUserSchema.ts +++ b/examples/advanced/src/gen/zod/userController/createUserSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from '../userSchema' export const createUserMutationResponseSchema = z.any() diff --git a/examples/advanced/src/gen/zod/userController/createUsersWithListInputSchema.ts b/examples/advanced/src/gen/zod/userController/createUsersWithListInputSchema.ts index 3390b86dc..67e6c0baa 100644 --- a/examples/advanced/src/gen/zod/userController/createUsersWithListInputSchema.ts +++ b/examples/advanced/src/gen/zod/userController/createUsersWithListInputSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from '../userSchema' /** diff --git a/examples/advanced/src/gen/zod/userController/getUserByNameSchema.ts b/examples/advanced/src/gen/zod/userController/getUserByNameSchema.ts index 618f46110..68fc836ee 100644 --- a/examples/advanced/src/gen/zod/userController/getUserByNameSchema.ts +++ b/examples/advanced/src/gen/zod/userController/getUserByNameSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from '../userSchema' /** diff --git a/examples/advanced/src/gen/zod/userController/updateUserSchema.ts b/examples/advanced/src/gen/zod/userController/updateUserSchema.ts index 44a73ee01..3c2d7a10e 100644 --- a/examples/advanced/src/gen/zod/userController/updateUserSchema.ts +++ b/examples/advanced/src/gen/zod/userController/updateUserSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from '../userSchema' /** diff --git a/examples/advanced/src/gen/zodios.ts b/examples/advanced/src/gen/zodios.ts index 8b560a4e1..ef7fd2e4c 100644 --- a/examples/advanced/src/gen/zodios.ts +++ b/examples/advanced/src/gen/zodios.ts @@ -3,8 +3,8 @@ import { createPetsMutationResponseSchema, createPetsPathParamsSchema, createPetsQueryParamsSchema, - createPetsMutationRequestSchema, createPetsHeaderParamsSchema, + createPetsMutationRequestSchema, createPets201Schema, } from './zod/petsController/createPetsSchema' import { addPetMutationResponseSchema, addPetMutationRequestSchema, addPet405Schema } from './zod/petController/addPetSchema' @@ -76,18 +76,18 @@ const endpoints = makeApi([ type: 'Query', schema: createPetsQueryParamsSchema.shape['offset'], }, - { - name: 'CreatePetsMutationRequest', - description: ``, - type: 'Body', - schema: createPetsMutationRequestSchema, - }, { name: 'X-EXAMPLE', description: `Header parameters`, type: 'Header', schema: createPetsHeaderParamsSchema.shape['X-EXAMPLE'], }, + { + name: 'CreatePetsMutationRequest', + description: ``, + type: 'Body', + schema: createPetsMutationRequestSchema, + }, ], response: createPetsMutationResponseSchema, errors: [ @@ -477,7 +477,5 @@ const endpoints = makeApi([ ], }, ]) - export const api = new Zodios('https://petstore3.swagger.io/api/v3', endpoints) - export default api diff --git a/examples/client/src/gen/clients/axios/petService/addPet.ts b/examples/client/src/gen/clients/axios/petService/addPet.ts index b7895f1f5..2a54bd87b 100644 --- a/examples/client/src/gen/clients/axios/petService/addPet.ts +++ b/examples/client/src/gen/clients/axios/petService/addPet.ts @@ -5,8 +5,7 @@ import type { AddPetMutationRequest, AddPetMutationResponse } from '../../../mod /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export async function addPet( data: AddPetMutationRequest, options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/petService/deletePet.ts b/examples/client/src/gen/clients/axios/petService/deletePet.ts index 159294f41..f0a1df6d8 100644 --- a/examples/client/src/gen/clients/axios/petService/deletePet.ts +++ b/examples/client/src/gen/clients/axios/petService/deletePet.ts @@ -5,8 +5,7 @@ import type { DeletePetMutationResponse, DeletePetPathParams, DeletePetHeaderPar /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export async function deletePet( petId: DeletePetPathParams['petId'], headers?: DeletePetHeaderParams, diff --git a/examples/client/src/gen/clients/axios/petService/findPetsByStatus.ts b/examples/client/src/gen/clients/axios/petService/findPetsByStatus.ts index 66fba1627..c5e6ef8d9 100644 --- a/examples/client/src/gen/clients/axios/petService/findPetsByStatus.ts +++ b/examples/client/src/gen/clients/axios/petService/findPetsByStatus.ts @@ -5,8 +5,7 @@ import type { FindPetsByStatusQueryResponse, FindPetsByStatusQueryParams } from /** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ + * @link /pet/findByStatus */ export async function findPetsByStatus( params?: FindPetsByStatusQueryParams, options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/petService/findPetsByTags.ts b/examples/client/src/gen/clients/axios/petService/findPetsByTags.ts index 0884a8fd5..4ac24555f 100644 --- a/examples/client/src/gen/clients/axios/petService/findPetsByTags.ts +++ b/examples/client/src/gen/clients/axios/petService/findPetsByTags.ts @@ -5,8 +5,7 @@ import type { FindPetsByTagsQueryResponse, FindPetsByTagsQueryParams, FindPetsBy /** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ + * @link /pet/findByTags */ export async function findPetsByTags( headers: FindPetsByTagsHeaderParams, params?: FindPetsByTagsQueryParams, diff --git a/examples/client/src/gen/clients/axios/petService/getPetById.ts b/examples/client/src/gen/clients/axios/petService/getPetById.ts index 7f57eb01f..9325b9d31 100644 --- a/examples/client/src/gen/clients/axios/petService/getPetById.ts +++ b/examples/client/src/gen/clients/axios/petService/getPetById.ts @@ -5,8 +5,7 @@ import type { GetPetByIdQueryResponse, GetPetByIdPathParams } from '../../../mod /** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ + * @link /pet/:petId */ export async function getPetById( petId: GetPetByIdPathParams['petId'], options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/petService/updatePet.ts b/examples/client/src/gen/clients/axios/petService/updatePet.ts index 10e747a71..b70ea8d85 100644 --- a/examples/client/src/gen/clients/axios/petService/updatePet.ts +++ b/examples/client/src/gen/clients/axios/petService/updatePet.ts @@ -5,8 +5,7 @@ import type { UpdatePetMutationRequest, UpdatePetMutationResponse } from '../../ /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export async function updatePet( data: UpdatePetMutationRequest, options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/petService/updatePetWithForm.ts b/examples/client/src/gen/clients/axios/petService/updatePetWithForm.ts index 224b9a426..197ddd1d7 100644 --- a/examples/client/src/gen/clients/axios/petService/updatePetWithForm.ts +++ b/examples/client/src/gen/clients/axios/petService/updatePetWithForm.ts @@ -8,8 +8,7 @@ import type { /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export async function updatePetWithForm( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithFormQueryParams, diff --git a/examples/client/src/gen/clients/axios/petService/uploadFile.ts b/examples/client/src/gen/clients/axios/petService/uploadFile.ts index 75429aa5c..5f14d2c9b 100644 --- a/examples/client/src/gen/clients/axios/petService/uploadFile.ts +++ b/examples/client/src/gen/clients/axios/petService/uploadFile.ts @@ -9,8 +9,7 @@ import type { /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export async function uploadFile( petId: UploadFilePathParams['petId'], data?: UploadFileMutationRequest, diff --git a/examples/client/src/gen/clients/axios/petsService/createPets.ts b/examples/client/src/gen/clients/axios/petsService/createPets.ts index 4cf91d097..ab0510261 100644 --- a/examples/client/src/gen/clients/axios/petsService/createPets.ts +++ b/examples/client/src/gen/clients/axios/petsService/createPets.ts @@ -10,8 +10,7 @@ import type { /** * @summary Create a pet - * @link /pets/:uuid - */ + * @link /pets/:uuid */ export async function createPets( uuid: CreatePetsPathParams['uuid'], data: CreatePetsMutationRequest, diff --git a/examples/client/src/gen/clients/axios/userService/createUser.ts b/examples/client/src/gen/clients/axios/userService/createUser.ts index a0c7c41a6..f53551bef 100644 --- a/examples/client/src/gen/clients/axios/userService/createUser.ts +++ b/examples/client/src/gen/clients/axios/userService/createUser.ts @@ -6,8 +6,7 @@ import type { CreateUserMutationRequest, CreateUserMutationResponse } from '../. /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export async function createUser( data?: CreateUserMutationRequest, options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/userService/createUsersWithListInput.ts b/examples/client/src/gen/clients/axios/userService/createUsersWithListInput.ts index 9bf4c9f04..ee41dac67 100644 --- a/examples/client/src/gen/clients/axios/userService/createUsersWithListInput.ts +++ b/examples/client/src/gen/clients/axios/userService/createUsersWithListInput.ts @@ -9,8 +9,7 @@ import type { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export async function createUsersWithListInput( data?: CreateUsersWithListInputMutationRequest, options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/userService/deleteUser.ts b/examples/client/src/gen/clients/axios/userService/deleteUser.ts index 08830f233..7499ab4d1 100644 --- a/examples/client/src/gen/clients/axios/userService/deleteUser.ts +++ b/examples/client/src/gen/clients/axios/userService/deleteUser.ts @@ -6,8 +6,7 @@ import type { DeleteUserMutationResponse, DeleteUserPathParams } from '../../../ /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export async function deleteUser( username: DeleteUserPathParams['username'], options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/userService/getUserByName.ts b/examples/client/src/gen/clients/axios/userService/getUserByName.ts index ac8510e5c..0d767ea11 100644 --- a/examples/client/src/gen/clients/axios/userService/getUserByName.ts +++ b/examples/client/src/gen/clients/axios/userService/getUserByName.ts @@ -5,8 +5,7 @@ import type { GetUserByNameQueryResponse, GetUserByNamePathParams } from '../../ /** * @summary Get user by user name - * @link /user/:username - */ + * @link /user/:username */ export async function getUserByName( username: GetUserByNamePathParams['username'], options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/userService/loginUser.ts b/examples/client/src/gen/clients/axios/userService/loginUser.ts index 979aa0cbd..c2f4f1024 100644 --- a/examples/client/src/gen/clients/axios/userService/loginUser.ts +++ b/examples/client/src/gen/clients/axios/userService/loginUser.ts @@ -5,8 +5,7 @@ import type { LoginUserQueryResponse, LoginUserQueryParams } from '../../../mode /** * @summary Logs user into the system - * @link /user/login - */ + * @link /user/login */ export async function loginUser( params?: LoginUserQueryParams, options: Partial[0]> = {}, diff --git a/examples/client/src/gen/clients/axios/userService/logoutUser.ts b/examples/client/src/gen/clients/axios/userService/logoutUser.ts index d92c8c8a7..c650d036c 100644 --- a/examples/client/src/gen/clients/axios/userService/logoutUser.ts +++ b/examples/client/src/gen/clients/axios/userService/logoutUser.ts @@ -5,8 +5,7 @@ import type { LogoutUserQueryResponse } from '../../../models/ts/userController/ /** * @summary Logs out current logged in user session - * @link /user/logout - */ + * @link /user/logout */ export async function logoutUser(options: Partial[0]> = {}): Promise['data']> { return axios.get(`/user/logout`, options) } diff --git a/examples/client/src/gen/clients/axios/userService/updateUser.ts b/examples/client/src/gen/clients/axios/userService/updateUser.ts index b0db7e9a0..7f344dfa0 100644 --- a/examples/client/src/gen/clients/axios/userService/updateUser.ts +++ b/examples/client/src/gen/clients/axios/userService/updateUser.ts @@ -6,8 +6,7 @@ import type { UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserP /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export async function updateUser( username: UpdateUserPathParams['username'], data?: UpdateUserMutationRequest, diff --git a/examples/client/src/gen/models/ts/petController/AddPet.ts b/examples/client/src/gen/models/ts/petController/AddPet.ts index c3bb5cca1..7a6cdc84d 100644 --- a/examples/client/src/gen/models/ts/petController/AddPet.ts +++ b/examples/client/src/gen/models/ts/petController/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/client/src/gen/models/ts/petController/DeletePet.ts b/examples/client/src/gen/models/ts/petController/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/client/src/gen/models/ts/petController/DeletePet.ts +++ b/examples/client/src/gen/models/ts/petController/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/client/src/gen/models/ts/petController/FindPetsByStatus.ts b/examples/client/src/gen/models/ts/petController/FindPetsByStatus.ts index 697817ca3..4eb2836f5 100644 --- a/examples/client/src/gen/models/ts/petController/FindPetsByStatus.ts +++ b/examples/client/src/gen/models/ts/petController/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/client/src/gen/models/ts/petController/FindPetsByTags.ts b/examples/client/src/gen/models/ts/petController/FindPetsByTags.ts index 6b432d2b3..1eb7a2682 100644 --- a/examples/client/src/gen/models/ts/petController/FindPetsByTags.ts +++ b/examples/client/src/gen/models/ts/petController/FindPetsByTags.ts @@ -41,7 +41,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/client/src/gen/models/ts/petController/GetPetById.ts b/examples/client/src/gen/models/ts/petController/GetPetById.ts index f0df043c2..27624d9dd 100644 --- a/examples/client/src/gen/models/ts/petController/GetPetById.ts +++ b/examples/client/src/gen/models/ts/petController/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/client/src/gen/models/ts/petController/UpdatePet.ts b/examples/client/src/gen/models/ts/petController/UpdatePet.ts index 049ef6a31..602376f6e 100644 --- a/examples/client/src/gen/models/ts/petController/UpdatePet.ts +++ b/examples/client/src/gen/models/ts/petController/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/client/src/gen/models/ts/petController/UpdatePetWithForm.ts b/examples/client/src/gen/models/ts/petController/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/client/src/gen/models/ts/petController/UpdatePetWithForm.ts +++ b/examples/client/src/gen/models/ts/petController/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/client/src/gen/models/ts/petController/UploadFile.ts b/examples/client/src/gen/models/ts/petController/UploadFile.ts index 70847577b..91de3ce6c 100644 --- a/examples/client/src/gen/models/ts/petController/UploadFile.ts +++ b/examples/client/src/gen/models/ts/petController/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/client/src/gen/models/ts/petsController/CreatePets.ts b/examples/client/src/gen/models/ts/petsController/CreatePets.ts index ff30d2be8..e61497690 100644 --- a/examples/client/src/gen/models/ts/petsController/CreatePets.ts +++ b/examples/client/src/gen/models/ts/petsController/CreatePets.ts @@ -52,7 +52,6 @@ export type CreatePetsQueryParams = { * @description unexpected error */ export type CreatePetsError = PetNotFound - export namespace CreatePetsMutation { export type Response = CreatePetsMutationResponse export type Request = CreatePetsMutationRequest diff --git a/examples/client/src/gen/models/ts/storeController/DeleteOrder.ts b/examples/client/src/gen/models/ts/storeController/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/client/src/gen/models/ts/storeController/DeleteOrder.ts +++ b/examples/client/src/gen/models/ts/storeController/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/client/src/gen/models/ts/storeController/GetInventory.ts b/examples/client/src/gen/models/ts/storeController/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/client/src/gen/models/ts/storeController/GetInventory.ts +++ b/examples/client/src/gen/models/ts/storeController/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/client/src/gen/models/ts/storeController/GetOrderById.ts b/examples/client/src/gen/models/ts/storeController/GetOrderById.ts index 1c492043b..38942cc18 100644 --- a/examples/client/src/gen/models/ts/storeController/GetOrderById.ts +++ b/examples/client/src/gen/models/ts/storeController/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/client/src/gen/models/ts/storeController/PlaceOrder.ts b/examples/client/src/gen/models/ts/storeController/PlaceOrder.ts index 2cb0aa9e5..48f26b0c6 100644 --- a/examples/client/src/gen/models/ts/storeController/PlaceOrder.ts +++ b/examples/client/src/gen/models/ts/storeController/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/client/src/gen/models/ts/storeController/PlaceOrderPatch.ts b/examples/client/src/gen/models/ts/storeController/PlaceOrderPatch.ts index fcf49f738..447419d6c 100644 --- a/examples/client/src/gen/models/ts/storeController/PlaceOrderPatch.ts +++ b/examples/client/src/gen/models/ts/storeController/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/client/src/gen/models/ts/userController/CreateUser.ts b/examples/client/src/gen/models/ts/userController/CreateUser.ts index 8e7a501c8..cbabb94f4 100644 --- a/examples/client/src/gen/models/ts/userController/CreateUser.ts +++ b/examples/client/src/gen/models/ts/userController/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/client/src/gen/models/ts/userController/CreateUsersWithListInput.ts b/examples/client/src/gen/models/ts/userController/CreateUsersWithListInput.ts index 495536e75..da5293091 100644 --- a/examples/client/src/gen/models/ts/userController/CreateUsersWithListInput.ts +++ b/examples/client/src/gen/models/ts/userController/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/client/src/gen/models/ts/userController/DeleteUser.ts b/examples/client/src/gen/models/ts/userController/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/client/src/gen/models/ts/userController/DeleteUser.ts +++ b/examples/client/src/gen/models/ts/userController/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/client/src/gen/models/ts/userController/GetUserByName.ts b/examples/client/src/gen/models/ts/userController/GetUserByName.ts index 06acd254c..c987d400f 100644 --- a/examples/client/src/gen/models/ts/userController/GetUserByName.ts +++ b/examples/client/src/gen/models/ts/userController/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/client/src/gen/models/ts/userController/LoginUser.ts b/examples/client/src/gen/models/ts/userController/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/client/src/gen/models/ts/userController/LoginUser.ts +++ b/examples/client/src/gen/models/ts/userController/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/client/src/gen/models/ts/userController/LogoutUser.ts b/examples/client/src/gen/models/ts/userController/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/client/src/gen/models/ts/userController/LogoutUser.ts +++ b/examples/client/src/gen/models/ts/userController/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/client/src/gen/models/ts/userController/UpdateUser.ts b/examples/client/src/gen/models/ts/userController/UpdateUser.ts index ab6e942f2..85a8f3aef 100644 --- a/examples/client/src/gen/models/ts/userController/UpdateUser.ts +++ b/examples/client/src/gen/models/ts/userController/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/faker/kubb.config.js b/examples/faker/kubb.config.js index 77523a9a1..91d92e385 100644 --- a/examples/faker/kubb.config.js +++ b/examples/faker/kubb.config.js @@ -1,5 +1,9 @@ import { defineConfig } from '@kubb/core' +import createSwagger from '@kubb/swagger' +import createSwaggerFaker from '@kubb/swagger-faker' +import createSwaggerTS from '@kubb/swagger-ts' + export default defineConfig(async () => { await setTimeout(() => { // wait for 1s, async behaviour @@ -15,19 +19,42 @@ export default defineConfig(async () => { clean: true, }, hooks: { - done: ['prettier --write "**/*.{ts,tsx}"', 'eslint --fix ./src/gen'], + // done: ['prettier --write "**/*.{ts,tsx}"', 'eslint --fix ./src/gen'], }, plugins: [ - ['@kubb/swagger', { - output: false, - }], - ['@kubb/swagger-ts', { - output: 'models', - }], - ['@kubb/swagger-faker', { - output: './mocks', - group: { type: 'tag', output: './mocks/{{tag}}Mocks' }, - }], + createSwagger({ output: false }), + createSwaggerTS({ output: 'models' }), + // createSwaggerFaker({ + // output: './mocks', + // group: { type: 'tag', output: './mocks/{{tag}}Mocks' }, + // }), + createSwaggerFaker({ + output: './customMocks', + transformers: { + schema: (_schema, baseName) => { + /* override a property with name 'name' + name: + type: string + example: doggie + */ + if (baseName === 'name') { + // see mapper where we map `productionName` to `faker.commerce.productName` + return [{ keyword: 'productName' }] + } + return undefined + }, + }, + mapper: { + 'productName': 'faker.commerce.productName', + }, + include: [ + { + type: 'operationId', + pattern: 'updatePet', + }, + ], + exclude: [], + }), ], } }) diff --git a/examples/faker/src/gen/customMocks/createAddress.ts b/examples/faker/src/gen/customMocks/createAddress.ts new file mode 100644 index 000000000..da6d3fef5 --- /dev/null +++ b/examples/faker/src/gen/customMocks/createAddress.ts @@ -0,0 +1,12 @@ +import { faker } from '@faker-js/faker' +import type { Address } from '../models/Address' + +export function createAddress(): NonNullable
{ + return { + 'street': faker.string.alpha(), + 'city': faker.string.alpha(), + 'state': faker.string.alpha(), + 'zip': faker.string.alpha(), + 'identifier': faker.helpers.arrayElements([faker.number.float({}), faker.string.alpha(), faker.helpers.arrayElement([`NW`, `NE`, `SW`, `SE`])]) as any, + } +} diff --git a/examples/faker/src/gen/customMocks/createApiResponse.ts b/examples/faker/src/gen/customMocks/createApiResponse.ts new file mode 100644 index 000000000..f739b0c70 --- /dev/null +++ b/examples/faker/src/gen/customMocks/createApiResponse.ts @@ -0,0 +1,6 @@ +import { faker } from '@faker-js/faker' +import type { ApiResponse } from '../models/ApiResponse' + +export function createApiResponse(): NonNullable { + return { 'code': faker.number.float({}), 'type': faker.string.alpha(), 'message': faker.string.alpha() } +} diff --git a/examples/faker/src/gen/customMocks/createCategory.ts b/examples/faker/src/gen/customMocks/createCategory.ts new file mode 100644 index 000000000..31a954824 --- /dev/null +++ b/examples/faker/src/gen/customMocks/createCategory.ts @@ -0,0 +1,6 @@ +import { faker } from '@faker-js/faker' +import type { Category } from '../models/Category' + +export function createCategory(): NonNullable { + return { 'id': faker.number.float({}), 'name': faker.commerce.productName() } +} diff --git a/examples/faker/src/gen/customMocks/createCustomer.ts b/examples/faker/src/gen/customMocks/createCustomer.ts new file mode 100644 index 000000000..4e5b78d5e --- /dev/null +++ b/examples/faker/src/gen/customMocks/createCustomer.ts @@ -0,0 +1,7 @@ +import { createAddress } from './createAddress' +import { faker } from '@faker-js/faker' +import type { Customer } from '../models/Customer' + +export function createCustomer(): NonNullable { + return { 'id': faker.number.float({}), 'username': faker.string.alpha(), 'address': faker.helpers.arrayElements([createAddress()]) as any } +} diff --git a/examples/faker/src/gen/customMocks/createOrder.ts b/examples/faker/src/gen/customMocks/createOrder.ts new file mode 100644 index 000000000..c86da8eae --- /dev/null +++ b/examples/faker/src/gen/customMocks/createOrder.ts @@ -0,0 +1,13 @@ +import { faker } from '@faker-js/faker' +import type { Order } from '../models/Order' + +export function createOrder(): NonNullable { + return { + 'id': faker.number.float({}), + 'petId': faker.number.float({}), + 'quantity': faker.number.float({}), + 'shipDate': faker.string.alpha(), + 'status': faker.helpers.arrayElement([`placed`, `approved`, `delivered`]), + 'complete': faker.datatype.boolean(), + } +} diff --git a/examples/faker/src/gen/customMocks/createPet.ts b/examples/faker/src/gen/customMocks/createPet.ts new file mode 100644 index 000000000..9409db17d --- /dev/null +++ b/examples/faker/src/gen/customMocks/createPet.ts @@ -0,0 +1,15 @@ +import { createCategory } from './createCategory' +import { createTag } from './createTag' +import { faker } from '@faker-js/faker' +import type { Pet } from '../models/Pet' + +export function createPet(): NonNullable { + return { + 'id': faker.number.float({}), + 'name': faker.commerce.productName(), + 'category': createCategory(), + 'photoUrls': faker.helpers.arrayElements([faker.string.alpha()]) as any, + 'tags': faker.helpers.arrayElements([createTag()]) as any, + 'status': faker.helpers.arrayElement([`available`, `pending`, `sold`]), + } +} diff --git a/examples/faker/src/gen/customMocks/createTag.ts b/examples/faker/src/gen/customMocks/createTag.ts new file mode 100644 index 000000000..b2d9cd5ad --- /dev/null +++ b/examples/faker/src/gen/customMocks/createTag.ts @@ -0,0 +1,6 @@ +import { faker } from '@faker-js/faker' +import type { Tag } from '../models/Tag' + +export function createTag(): NonNullable { + return { 'id': faker.number.float({}), 'name': faker.commerce.productName() } +} diff --git a/examples/faker/src/gen/mocks/petMocks/createUpdatePet.ts b/examples/faker/src/gen/customMocks/createUpdatePet.ts similarity index 68% rename from examples/faker/src/gen/mocks/petMocks/createUpdatePet.ts rename to examples/faker/src/gen/customMocks/createUpdatePet.ts index a10f01538..c5db5c311 100644 --- a/examples/faker/src/gen/mocks/petMocks/createUpdatePet.ts +++ b/examples/faker/src/gen/customMocks/createUpdatePet.ts @@ -1,9 +1,5 @@ -import { createPet } from '../createPet' -import { UpdatePet400 } from '../../models/UpdatePet' -import { UpdatePet404 } from '../../models/UpdatePet' -import { UpdatePet405 } from '../../models/UpdatePet' -import { UpdatePetMutationRequest } from '../../models/UpdatePet' -import { UpdatePetMutationResponse } from '../../models/UpdatePet' +import { createPet } from './createPet' +import type { UpdatePet400, UpdatePet404, UpdatePet405, UpdatePetMutationRequest, UpdatePetMutationResponse } from '../models/UpdatePet' /** * @description Invalid ID supplied @@ -12,7 +8,6 @@ import { UpdatePetMutationResponse } from '../../models/UpdatePet' export function createUpdatePet400(): NonNullable { return undefined } - /** * @description Pet not found */ @@ -20,7 +15,6 @@ export function createUpdatePet400(): NonNullable { export function createUpdatePet404(): NonNullable { return undefined } - /** * @description Validation exception */ @@ -28,7 +22,6 @@ export function createUpdatePet404(): NonNullable { export function createUpdatePet405(): NonNullable { return undefined } - /** * @description Update an existent pet in the store */ @@ -36,7 +29,6 @@ export function createUpdatePet405(): NonNullable { export function createUpdatePetMutationRequest(): NonNullable { return createPet() } - /** * @description Successful operation */ diff --git a/examples/faker/src/gen/mocks/petMocks/createUpdatePetWithForm.ts b/examples/faker/src/gen/customMocks/createUpdatePetWithForm.ts similarity index 54% rename from examples/faker/src/gen/mocks/petMocks/createUpdatePetWithForm.ts rename to examples/faker/src/gen/customMocks/createUpdatePetWithForm.ts index 0a0ece2fa..ef23cb8e2 100644 --- a/examples/faker/src/gen/mocks/petMocks/createUpdatePetWithForm.ts +++ b/examples/faker/src/gen/customMocks/createUpdatePetWithForm.ts @@ -1,9 +1,10 @@ import { faker } from '@faker-js/faker' - -import { UpdatePetWithForm405 } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormMutationResponse } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormPathParams } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormQueryParams } from '../../models/UpdatePetWithForm' +import type { + UpdatePetWithForm405, + UpdatePetWithFormMutationResponse, + UpdatePetWithFormPathParams, + UpdatePetWithFormQueryParams, +} from '../models/UpdatePetWithForm' /** * @description Invalid input @@ -18,9 +19,9 @@ export function createUpdatePetWithFormMutationResponse(): NonNullable { - return { petId: faker.number.float({}) } + return { 'petId': faker.number.float({}) } } export function createUpdatePetWithFormQueryParams(): NonNullable { - return { name: faker.string.alpha(), status: faker.string.alpha() } + return { 'name': faker.commerce.productName(), 'status': faker.string.alpha() } } diff --git a/examples/faker/src/gen/customMocks/createUser.ts b/examples/faker/src/gen/customMocks/createUser.ts new file mode 100644 index 000000000..9d4312e9e --- /dev/null +++ b/examples/faker/src/gen/customMocks/createUser.ts @@ -0,0 +1,15 @@ +import { faker } from '@faker-js/faker' +import type { User } from '../models/User' + +export function createUser(): NonNullable { + return { + 'id': faker.number.float({}), + 'username': faker.string.alpha(), + 'firstName': faker.person.firstName(), + 'lastName': faker.person.lastName(), + 'email': faker.internet.email(), + 'password': faker.internet.password(), + 'phone': faker.phone.number(), + 'userStatus': faker.number.float({}), + } +} diff --git a/examples/faker/src/gen/mocks/createUserArray.ts b/examples/faker/src/gen/customMocks/createUserArray.ts similarity index 79% rename from examples/faker/src/gen/mocks/createUserArray.ts rename to examples/faker/src/gen/customMocks/createUserArray.ts index fd4c68c0e..5f9fa6ed0 100644 --- a/examples/faker/src/gen/mocks/createUserArray.ts +++ b/examples/faker/src/gen/customMocks/createUserArray.ts @@ -1,7 +1,6 @@ -import { faker } from '@faker-js/faker' - import { createUser } from './createUser' -import { UserArray } from '../models/UserArray' +import { faker } from '@faker-js/faker' +import type { UserArray } from '../models/UserArray' export function createUserArray(): NonNullable { return faker.helpers.arrayElements([createUser()]) as any diff --git a/examples/faker/src/gen/mocks/index.ts b/examples/faker/src/gen/customMocks/index.ts similarity index 66% rename from examples/faker/src/gen/mocks/index.ts rename to examples/faker/src/gen/customMocks/index.ts index 16f80fd65..b685ceeb8 100644 --- a/examples/faker/src/gen/mocks/index.ts +++ b/examples/faker/src/gen/customMocks/index.ts @@ -5,8 +5,7 @@ export * from './createCustomer' export * from './createOrder' export * from './createPet' export * from './createTag' +export * from './createUpdatePet' +export * from './createUpdatePetWithForm' export * from './createUser' export * from './createUserArray' -export * as petMocks from './petMocks/index' -export * as storeMocks from './storeMocks/index' -export * as userMocks from './userMocks/index' diff --git a/examples/faker/src/gen/index.ts b/examples/faker/src/gen/index.ts index 9c776fc28..b2ee2d10d 100644 --- a/examples/faker/src/gen/index.ts +++ b/examples/faker/src/gen/index.ts @@ -1,2 +1,2 @@ -export * from './mocks/index' +export * from './customMocks/index' export * from './models/index' diff --git a/examples/faker/src/gen/mocks/createAddress.ts b/examples/faker/src/gen/mocks/createAddress.ts deleted file mode 100644 index 71a8f31f7..000000000 --- a/examples/faker/src/gen/mocks/createAddress.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { Address } from '../models/Address' - -export function createAddress(): NonNullable
{ - return { - street: faker.string.alpha(), - city: faker.string.alpha(), - state: faker.string.alpha(), - zip: faker.string.alpha(), - identifier: faker.helpers.arrayElements([faker.number.float({}), faker.string.alpha(), faker.helpers.arrayElement([`NW`, `NE`, `SW`, `SE`])]) as any, - } -} diff --git a/examples/faker/src/gen/mocks/createApiResponse.ts b/examples/faker/src/gen/mocks/createApiResponse.ts deleted file mode 100644 index e49832ab7..000000000 --- a/examples/faker/src/gen/mocks/createApiResponse.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { ApiResponse } from '../models/ApiResponse' - -export function createApiResponse(): NonNullable { - return { code: faker.number.float({}), type: faker.string.alpha(), message: faker.string.alpha() } -} diff --git a/examples/faker/src/gen/mocks/createCategory.ts b/examples/faker/src/gen/mocks/createCategory.ts deleted file mode 100644 index f248f90fd..000000000 --- a/examples/faker/src/gen/mocks/createCategory.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { Category } from '../models/Category' - -export function createCategory(): NonNullable { - return { id: faker.number.float({}), name: faker.string.alpha() } -} diff --git a/examples/faker/src/gen/mocks/createCustomer.ts b/examples/faker/src/gen/mocks/createCustomer.ts deleted file mode 100644 index 7056ecd22..000000000 --- a/examples/faker/src/gen/mocks/createCustomer.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createAddress } from './createAddress' -import { Customer } from '../models/Customer' - -export function createCustomer(): NonNullable { - return { id: faker.number.float({}), username: faker.string.alpha(), address: faker.helpers.arrayElements([createAddress()]) as any } -} diff --git a/examples/faker/src/gen/mocks/createOrder.ts b/examples/faker/src/gen/mocks/createOrder.ts deleted file mode 100644 index 84d6129ec..000000000 --- a/examples/faker/src/gen/mocks/createOrder.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { Order } from '../models/Order' - -export function createOrder(): NonNullable { - return { - id: faker.number.float({}), - petId: faker.number.float({}), - quantity: faker.number.float({}), - shipDate: faker.string.alpha(), - status: faker.helpers.arrayElement([`placed`, `approved`, `delivered`]), - complete: faker.datatype.boolean(), - } -} diff --git a/examples/faker/src/gen/mocks/createPet.ts b/examples/faker/src/gen/mocks/createPet.ts deleted file mode 100644 index 53dae4452..000000000 --- a/examples/faker/src/gen/mocks/createPet.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createCategory } from './createCategory' -import { createTag } from './createTag' -import { Pet } from '../models/Pet' - -export function createPet(): NonNullable { - return { - id: faker.number.float({}), - name: faker.string.alpha(), - category: createCategory(), - photoUrls: faker.helpers.arrayElements([faker.string.alpha()]) as any, - tags: faker.helpers.arrayElements([createTag()]) as any, - status: faker.helpers.arrayElement([`available`, `pending`, `sold`]), - } -} diff --git a/examples/faker/src/gen/mocks/createTag.ts b/examples/faker/src/gen/mocks/createTag.ts deleted file mode 100644 index fdf3e6f25..000000000 --- a/examples/faker/src/gen/mocks/createTag.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { Tag } from '../models/Tag' - -export function createTag(): NonNullable { - return { id: faker.number.float({}), name: faker.string.alpha() } -} diff --git a/examples/faker/src/gen/mocks/createUser.ts b/examples/faker/src/gen/mocks/createUser.ts deleted file mode 100644 index bcbaf481f..000000000 --- a/examples/faker/src/gen/mocks/createUser.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { User } from '../models/User' - -export function createUser(): NonNullable { - return { - id: faker.number.float({}), - username: faker.string.alpha(), - firstName: faker.person.firstName(), - lastName: faker.person.lastName(), - email: faker.internet.email(), - password: faker.internet.password(), - phone: faker.phone.number(), - userStatus: faker.number.float({}), - } -} diff --git a/examples/faker/src/gen/mocks/petMocks/createAddPet.ts b/examples/faker/src/gen/mocks/petMocks/createAddPet.ts deleted file mode 100644 index 999695ee2..000000000 --- a/examples/faker/src/gen/mocks/petMocks/createAddPet.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { createPet } from '../createPet' -import { AddPet405 } from '../../models/AddPet' -import { AddPetMutationRequest } from '../../models/AddPet' -import { AddPetMutationResponse } from '../../models/AddPet' - -/** - * @description Invalid input - */ - -export function createAddPet405(): NonNullable { - return undefined -} - -/** - * @description Create a new pet in the store - */ - -export function createAddPetMutationRequest(): NonNullable { - return createPet() -} - -/** - * @description Successful operation - */ - -export function createAddPetMutationResponse(): NonNullable { - return createPet() -} diff --git a/examples/faker/src/gen/mocks/petMocks/createDeletePet.ts b/examples/faker/src/gen/mocks/petMocks/createDeletePet.ts deleted file mode 100644 index 4639ada6c..000000000 --- a/examples/faker/src/gen/mocks/petMocks/createDeletePet.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { DeletePet400 } from '../../models/DeletePet' -import { DeletePetHeaderParams } from '../../models/DeletePet' -import { DeletePetMutationResponse } from '../../models/DeletePet' -import { DeletePetPathParams } from '../../models/DeletePet' - -/** - * @description Invalid pet value - */ - -export function createDeletePet400(): NonNullable { - return undefined -} - -export function createDeletePetHeaderParams(): NonNullable { - return { api_key: faker.string.alpha() } -} - -export function createDeletePetMutationResponse(): NonNullable { - return undefined -} - -export function createDeletePetPathParams(): NonNullable { - return { petId: faker.number.float({}) } -} diff --git a/examples/faker/src/gen/mocks/petMocks/createFindPetsByStatus.ts b/examples/faker/src/gen/mocks/petMocks/createFindPetsByStatus.ts deleted file mode 100644 index 90552334f..000000000 --- a/examples/faker/src/gen/mocks/petMocks/createFindPetsByStatus.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createPet } from '../createPet' -import { FindPetsByStatus400 } from '../../models/FindPetsByStatus' -import { FindPetsByStatusQueryParams } from '../../models/FindPetsByStatus' -import { FindPetsByStatusQueryResponse } from '../../models/FindPetsByStatus' - -/** - * @description Invalid status value - */ - -export function createFindPetsByStatus400(): NonNullable { - return undefined -} - -export function createFindPetsByStatusQueryParams(): NonNullable { - return { status: faker.helpers.arrayElement([`available`, `pending`, `sold`]) } -} - -/** - * @description successful operation - */ - -export function createFindPetsByStatusQueryResponse(): NonNullable { - return faker.helpers.arrayElements([createPet()]) as any -} diff --git a/examples/faker/src/gen/mocks/petMocks/createFindPetsByTags.ts b/examples/faker/src/gen/mocks/petMocks/createFindPetsByTags.ts deleted file mode 100644 index 39cd47a99..000000000 --- a/examples/faker/src/gen/mocks/petMocks/createFindPetsByTags.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createPet } from '../createPet' -import { FindPetsByTags400 } from '../../models/FindPetsByTags' -import { FindPetsByTagsQueryParams } from '../../models/FindPetsByTags' -import { FindPetsByTagsQueryResponse } from '../../models/FindPetsByTags' - -/** - * @description Invalid tag value - */ - -export function createFindPetsByTags400(): NonNullable { - return undefined -} - -export function createFindPetsByTagsQueryParams(): NonNullable { - return { tags: faker.helpers.arrayElements([faker.string.alpha()]) as any } -} - -/** - * @description successful operation - */ - -export function createFindPetsByTagsQueryResponse(): NonNullable { - return faker.helpers.arrayElements([createPet()]) as any -} diff --git a/examples/faker/src/gen/mocks/petMocks/createGetPetById.ts b/examples/faker/src/gen/mocks/petMocks/createGetPetById.ts deleted file mode 100644 index e1f4234e7..000000000 --- a/examples/faker/src/gen/mocks/petMocks/createGetPetById.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createPet } from '../createPet' -import { GetPetById400 } from '../../models/GetPetById' -import { GetPetById404 } from '../../models/GetPetById' -import { GetPetByIdPathParams } from '../../models/GetPetById' -import { GetPetByIdQueryResponse } from '../../models/GetPetById' - -/** - * @description Invalid ID supplied - */ - -export function createGetPetById400(): NonNullable { - return undefined -} - -/** - * @description Pet not found - */ - -export function createGetPetById404(): NonNullable { - return undefined -} - -export function createGetPetByIdPathParams(): NonNullable { - return { petId: faker.number.float({}) } -} - -/** - * @description successful operation - */ - -export function createGetPetByIdQueryResponse(): NonNullable { - return createPet() -} diff --git a/examples/faker/src/gen/mocks/petMocks/createUploadFile.ts b/examples/faker/src/gen/mocks/petMocks/createUploadFile.ts deleted file mode 100644 index 4db72ebb4..000000000 --- a/examples/faker/src/gen/mocks/petMocks/createUploadFile.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createApiResponse } from '../createApiResponse' -import { UploadFileMutationRequest } from '../../models/UploadFile' -import { UploadFilePathParams } from '../../models/UploadFile' -import { UploadFileQueryParams } from '../../models/UploadFile' -import { UploadFileMutationResponse } from '../../models/UploadFile' - -export function createUploadFileMutationRequest(): NonNullable { - return faker.string.alpha() -} - -export function createUploadFilePathParams(): NonNullable { - return { petId: faker.number.float({}) } -} - -export function createUploadFileQueryParams(): NonNullable { - return { additionalMetadata: faker.string.alpha() } -} - -/** - * @description successful operation - */ - -export function createUploadFileMutationResponse(): NonNullable { - return createApiResponse() -} diff --git a/examples/faker/src/gen/mocks/petMocks/index.ts b/examples/faker/src/gen/mocks/petMocks/index.ts deleted file mode 100644 index 8a70942ad..000000000 --- a/examples/faker/src/gen/mocks/petMocks/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './createAddPet' -export * from './createDeletePet' -export * from './createFindPetsByStatus' -export * from './createFindPetsByTags' -export * from './createGetPetById' -export * from './createUpdatePet' -export * from './createUpdatePetWithForm' -export * from './createUploadFile' diff --git a/examples/faker/src/gen/mocks/storeMocks/createDeleteOrder.ts b/examples/faker/src/gen/mocks/storeMocks/createDeleteOrder.ts deleted file mode 100644 index 9b8e2892d..000000000 --- a/examples/faker/src/gen/mocks/storeMocks/createDeleteOrder.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { DeleteOrder400 } from '../../models/DeleteOrder' -import { DeleteOrder404 } from '../../models/DeleteOrder' -import { DeleteOrderMutationResponse } from '../../models/DeleteOrder' -import { DeleteOrderPathParams } from '../../models/DeleteOrder' - -/** - * @description Invalid ID supplied - */ - -export function createDeleteOrder400(): NonNullable { - return undefined -} - -/** - * @description Order not found - */ - -export function createDeleteOrder404(): NonNullable { - return undefined -} - -export function createDeleteOrderMutationResponse(): NonNullable { - return undefined -} - -export function createDeleteOrderPathParams(): NonNullable { - return { orderId: faker.number.float({}) } -} diff --git a/examples/faker/src/gen/mocks/storeMocks/createGetInventory.ts b/examples/faker/src/gen/mocks/storeMocks/createGetInventory.ts deleted file mode 100644 index 93a77d8c8..000000000 --- a/examples/faker/src/gen/mocks/storeMocks/createGetInventory.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { GetInventoryQueryResponse } from '../../models/GetInventory' - -/** - * @description successful operation - */ - -export function createGetInventoryQueryResponse(): NonNullable { - return {} -} diff --git a/examples/faker/src/gen/mocks/storeMocks/createGetOrderById.ts b/examples/faker/src/gen/mocks/storeMocks/createGetOrderById.ts deleted file mode 100644 index 343ca548b..000000000 --- a/examples/faker/src/gen/mocks/storeMocks/createGetOrderById.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createOrder } from '../createOrder' -import { GetOrderById400 } from '../../models/GetOrderById' -import { GetOrderById404 } from '../../models/GetOrderById' -import { GetOrderByIdPathParams } from '../../models/GetOrderById' -import { GetOrderByIdQueryResponse } from '../../models/GetOrderById' - -/** - * @description Invalid ID supplied - */ - -export function createGetOrderById400(): NonNullable { - return undefined -} - -/** - * @description Order not found - */ - -export function createGetOrderById404(): NonNullable { - return undefined -} - -export function createGetOrderByIdPathParams(): NonNullable { - return { orderId: faker.number.float({}) } -} - -/** - * @description successful operation - */ - -export function createGetOrderByIdQueryResponse(): NonNullable { - return createOrder() -} diff --git a/examples/faker/src/gen/mocks/storeMocks/createPlaceOrder.ts b/examples/faker/src/gen/mocks/storeMocks/createPlaceOrder.ts deleted file mode 100644 index fec7ab24e..000000000 --- a/examples/faker/src/gen/mocks/storeMocks/createPlaceOrder.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { createOrder } from '../createOrder' -import { PlaceOrder405 } from '../../models/PlaceOrder' -import { PlaceOrderMutationRequest } from '../../models/PlaceOrder' -import { PlaceOrderMutationResponse } from '../../models/PlaceOrder' - -/** - * @description Invalid input - */ - -export function createPlaceOrder405(): NonNullable { - return undefined -} - -export function createPlaceOrderMutationRequest(): NonNullable { - return createOrder() -} - -/** - * @description successful operation - */ - -export function createPlaceOrderMutationResponse(): NonNullable { - return createOrder() -} diff --git a/examples/faker/src/gen/mocks/storeMocks/index.ts b/examples/faker/src/gen/mocks/storeMocks/index.ts deleted file mode 100644 index 4caf9d2c8..000000000 --- a/examples/faker/src/gen/mocks/storeMocks/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './createDeleteOrder' -export * from './createGetInventory' -export * from './createGetOrderById' -export * from './createPlaceOrder' diff --git a/examples/faker/src/gen/mocks/userMocks/createCreateUser.ts b/examples/faker/src/gen/mocks/userMocks/createCreateUser.ts deleted file mode 100644 index 0dfe28d74..000000000 --- a/examples/faker/src/gen/mocks/userMocks/createCreateUser.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { createUser } from '../createUser' -import { CreateUserMutationResponse } from '../../models/CreateUser' -import { CreateUserError } from '../../models/CreateUser' -import { CreateUserMutationRequest } from '../../models/CreateUser' - -export function createCreateUserMutationResponse(): NonNullable { - return undefined -} - -/** - * @description successful operation - */ - -export function createCreateUserError(): NonNullable { - return createUser() -} - -/** - * @description Created user object - */ - -export function createCreateUserMutationRequest(): NonNullable { - return createUser() -} diff --git a/examples/faker/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts b/examples/faker/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts deleted file mode 100644 index 49bacdf80..000000000 --- a/examples/faker/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createUser } from '../createUser' -import { CreateUsersWithListInputError } from '../../models/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationRequest } from '../../models/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationResponse } from '../../models/CreateUsersWithListInput' - -/** - * @description successful operation - */ - -export function createCreateUsersWithListInputError(): NonNullable { - return undefined -} - -export function createCreateUsersWithListInputMutationRequest(): NonNullable { - return faker.helpers.arrayElements([createUser()]) as any -} - -/** - * @description Successful operation - */ - -export function createCreateUsersWithListInputMutationResponse(): NonNullable { - return createUser() -} diff --git a/examples/faker/src/gen/mocks/userMocks/createDeleteUser.ts b/examples/faker/src/gen/mocks/userMocks/createDeleteUser.ts deleted file mode 100644 index c9a8b45ca..000000000 --- a/examples/faker/src/gen/mocks/userMocks/createDeleteUser.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { DeleteUser400 } from '../../models/DeleteUser' -import { DeleteUser404 } from '../../models/DeleteUser' -import { DeleteUserMutationResponse } from '../../models/DeleteUser' -import { DeleteUserPathParams } from '../../models/DeleteUser' - -/** - * @description Invalid username supplied - */ - -export function createDeleteUser400(): NonNullable { - return undefined -} - -/** - * @description User not found - */ - -export function createDeleteUser404(): NonNullable { - return undefined -} - -export function createDeleteUserMutationResponse(): NonNullable { - return undefined -} - -export function createDeleteUserPathParams(): NonNullable { - return { username: faker.string.alpha() } -} diff --git a/examples/faker/src/gen/mocks/userMocks/createGetUserByName.ts b/examples/faker/src/gen/mocks/userMocks/createGetUserByName.ts deleted file mode 100644 index 321f1b1aa..000000000 --- a/examples/faker/src/gen/mocks/userMocks/createGetUserByName.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createUser } from '../createUser' -import { GetUserByName400 } from '../../models/GetUserByName' -import { GetUserByName404 } from '../../models/GetUserByName' -import { GetUserByNamePathParams } from '../../models/GetUserByName' -import { GetUserByNameQueryResponse } from '../../models/GetUserByName' - -/** - * @description Invalid username supplied - */ - -export function createGetUserByName400(): NonNullable { - return undefined -} - -/** - * @description User not found - */ - -export function createGetUserByName404(): NonNullable { - return undefined -} - -export function createGetUserByNamePathParams(): NonNullable { - return { username: faker.string.alpha() } -} - -/** - * @description successful operation - */ - -export function createGetUserByNameQueryResponse(): NonNullable { - return createUser() -} diff --git a/examples/faker/src/gen/mocks/userMocks/createLoginUser.ts b/examples/faker/src/gen/mocks/userMocks/createLoginUser.ts deleted file mode 100644 index f9fcafbf1..000000000 --- a/examples/faker/src/gen/mocks/userMocks/createLoginUser.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { LoginUser400 } from '../../models/LoginUser' -import { LoginUserQueryParams } from '../../models/LoginUser' -import { LoginUserQueryResponse } from '../../models/LoginUser' - -/** - * @description Invalid username/password supplied - */ - -export function createLoginUser400(): NonNullable { - return undefined -} - -export function createLoginUserQueryParams(): NonNullable { - return { username: faker.string.alpha(), password: faker.internet.password() } -} - -/** - * @description successful operation - */ - -export function createLoginUserQueryResponse(): NonNullable { - return faker.string.alpha() -} diff --git a/examples/faker/src/gen/mocks/userMocks/createLogoutUser.ts b/examples/faker/src/gen/mocks/userMocks/createLogoutUser.ts deleted file mode 100644 index 296071637..000000000 --- a/examples/faker/src/gen/mocks/userMocks/createLogoutUser.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { LogoutUserError } from '../../models/LogoutUser' -import { LogoutUserQueryResponse } from '../../models/LogoutUser' - -/** - * @description successful operation - */ - -export function createLogoutUserError(): NonNullable { - return undefined -} - -export function createLogoutUserQueryResponse(): NonNullable { - return undefined -} diff --git a/examples/faker/src/gen/mocks/userMocks/createUpdateUser.ts b/examples/faker/src/gen/mocks/userMocks/createUpdateUser.ts deleted file mode 100644 index 68789ea0f..000000000 --- a/examples/faker/src/gen/mocks/userMocks/createUpdateUser.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { faker } from '@faker-js/faker' - -import { createUser } from '../createUser' -import { UpdateUserError } from '../../models/UpdateUser' -import { UpdateUserMutationResponse } from '../../models/UpdateUser' -import { UpdateUserPathParams } from '../../models/UpdateUser' -import { UpdateUserMutationRequest } from '../../models/UpdateUser' - -/** - * @description successful operation - */ - -export function createUpdateUserError(): NonNullable { - return undefined -} - -export function createUpdateUserMutationResponse(): NonNullable { - return undefined -} - -export function createUpdateUserPathParams(): NonNullable { - return { username: faker.string.alpha() } -} - -/** - * @description Update an existent user in the store - */ - -export function createUpdateUserMutationRequest(): NonNullable { - return createUser() -} diff --git a/examples/faker/src/gen/mocks/userMocks/index.ts b/examples/faker/src/gen/mocks/userMocks/index.ts deleted file mode 100644 index 00cb84b9a..000000000 --- a/examples/faker/src/gen/mocks/userMocks/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './createCreateUser' -export * from './createCreateUsersWithListInput' -export * from './createDeleteUser' -export * from './createGetUserByName' -export * from './createLoginUser' -export * from './createLogoutUser' -export * from './createUpdateUser' diff --git a/examples/faker/src/gen/models/AddPet.ts b/examples/faker/src/gen/models/AddPet.ts index 707cee2a6..b2539b4bc 100644 --- a/examples/faker/src/gen/models/AddPet.ts +++ b/examples/faker/src/gen/models/AddPet.ts @@ -14,7 +14,6 @@ export type AddPetMutationRequest = Pet * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/faker/src/gen/models/Address.ts b/examples/faker/src/gen/models/Address.ts index ac07478d9..a6547ed5b 100644 --- a/examples/faker/src/gen/models/Address.ts +++ b/examples/faker/src/gen/models/Address.ts @@ -22,5 +22,9 @@ export type Address = { /** * @type array | undefined */ - identifier?: [number, string, 'NW' | 'NE' | 'SW' | 'SE'] + identifier?: [ + number, + string, + 'NW' | 'NE' | 'SW' | 'SE', + ] } diff --git a/examples/faker/src/gen/models/CreateUser.ts b/examples/faker/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/faker/src/gen/models/CreateUser.ts +++ b/examples/faker/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/faker/src/gen/models/CreateUsersWithListInput.ts b/examples/faker/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/faker/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/faker/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/faker/src/gen/models/DeleteOrder.ts b/examples/faker/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/faker/src/gen/models/DeleteOrder.ts +++ b/examples/faker/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/faker/src/gen/models/DeletePet.ts b/examples/faker/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/faker/src/gen/models/DeletePet.ts +++ b/examples/faker/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/faker/src/gen/models/DeleteUser.ts b/examples/faker/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/faker/src/gen/models/DeleteUser.ts +++ b/examples/faker/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/faker/src/gen/models/FindPetsByStatus.ts b/examples/faker/src/gen/models/FindPetsByStatus.ts index b0fe4373d..ee89e038f 100644 --- a/examples/faker/src/gen/models/FindPetsByStatus.ts +++ b/examples/faker/src/gen/models/FindPetsByStatus.ts @@ -6,9 +6,9 @@ import type { Pet } from './Pet' export type FindPetsByStatus400 = any | null export const findPetsByStatusQueryParamsStatus = { - available: 'available', - pending: 'pending', - sold: 'sold', + 'available': 'available', + 'pending': 'pending', + 'sold': 'sold', } as const export type FindPetsByStatusQueryParamsStatus = (typeof findPetsByStatusQueryParamsStatus)[keyof typeof findPetsByStatusQueryParamsStatus] export type FindPetsByStatusQueryParams = { @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/faker/src/gen/models/FindPetsByTags.ts b/examples/faker/src/gen/models/FindPetsByTags.ts index 322509ccc..0cb8dcce6 100644 --- a/examples/faker/src/gen/models/FindPetsByTags.ts +++ b/examples/faker/src/gen/models/FindPetsByTags.ts @@ -17,7 +17,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/faker/src/gen/models/GetInventory.ts b/examples/faker/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/faker/src/gen/models/GetInventory.ts +++ b/examples/faker/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/faker/src/gen/models/GetOrderById.ts b/examples/faker/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/faker/src/gen/models/GetOrderById.ts +++ b/examples/faker/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/faker/src/gen/models/GetPetById.ts b/examples/faker/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/faker/src/gen/models/GetPetById.ts +++ b/examples/faker/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/faker/src/gen/models/GetUserByName.ts b/examples/faker/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/faker/src/gen/models/GetUserByName.ts +++ b/examples/faker/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/faker/src/gen/models/LoginUser.ts b/examples/faker/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/faker/src/gen/models/LoginUser.ts +++ b/examples/faker/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/faker/src/gen/models/LogoutUser.ts b/examples/faker/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/faker/src/gen/models/LogoutUser.ts +++ b/examples/faker/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/faker/src/gen/models/Order.ts b/examples/faker/src/gen/models/Order.ts index 5fde35d45..1c685ff06 100644 --- a/examples/faker/src/gen/models/Order.ts +++ b/examples/faker/src/gen/models/Order.ts @@ -1,7 +1,7 @@ export const orderStatus = { - placed: 'placed', - approved: 'approved', - delivered: 'delivered', + 'placed': 'placed', + 'approved': 'approved', + 'delivered': 'delivered', } as const export type OrderStatus = (typeof orderStatus)[keyof typeof orderStatus] export type Order = { diff --git a/examples/faker/src/gen/models/Pet.ts b/examples/faker/src/gen/models/Pet.ts index afc67d382..2655333aa 100644 --- a/examples/faker/src/gen/models/Pet.ts +++ b/examples/faker/src/gen/models/Pet.ts @@ -2,9 +2,9 @@ import type { Category } from './Category' import type { Tag } from './Tag' export const petStatus = { - available: 'available', - pending: 'pending', - sold: 'sold', + 'available': 'available', + 'pending': 'pending', + 'sold': 'sold', } as const export type PetStatus = (typeof petStatus)[keyof typeof petStatus] export type Pet = { diff --git a/examples/faker/src/gen/models/PlaceOrder.ts b/examples/faker/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/faker/src/gen/models/PlaceOrder.ts +++ b/examples/faker/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/faker/src/gen/models/UpdatePet.ts b/examples/faker/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/faker/src/gen/models/UpdatePet.ts +++ b/examples/faker/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/faker/src/gen/models/UpdatePetWithForm.ts b/examples/faker/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/faker/src/gen/models/UpdatePetWithForm.ts +++ b/examples/faker/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/faker/src/gen/models/UpdateUser.ts b/examples/faker/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/faker/src/gen/models/UpdateUser.ts +++ b/examples/faker/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/faker/src/gen/models/UploadFile.ts b/examples/faker/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/faker/src/gen/models/UploadFile.ts +++ b/examples/faker/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/msw-v2/src/gen/mocks/createAddPetRequest.ts b/examples/msw-v2/src/gen/mocks/createAddPetRequest.ts index dba5de469..b281aafae 100644 --- a/examples/msw-v2/src/gen/mocks/createAddPetRequest.ts +++ b/examples/msw-v2/src/gen/mocks/createAddPetRequest.ts @@ -1,8 +1,7 @@ -import { faker } from '@faker-js/faker' - import { createCategory } from './createCategory' import { createTag } from './createTag' -import { AddPetRequest } from '../models/AddPetRequest' +import { faker } from '@faker-js/faker' +import type { AddPetRequest } from '../models/AddPetRequest' export function createAddPetRequest(): NonNullable { return { diff --git a/examples/msw-v2/src/gen/mocks/createAddress.ts b/examples/msw-v2/src/gen/mocks/createAddress.ts index 054912102..5591f4737 100644 --- a/examples/msw-v2/src/gen/mocks/createAddress.ts +++ b/examples/msw-v2/src/gen/mocks/createAddress.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Address } from '../models/Address' +import type { Address } from '../models/Address' export function createAddress(): NonNullable
{ return { 'street': faker.string.alpha(), 'city': faker.string.alpha(), 'state': faker.string.alpha(), 'zip': faker.string.alpha() } diff --git a/examples/msw-v2/src/gen/mocks/createApiResponse.ts b/examples/msw-v2/src/gen/mocks/createApiResponse.ts index 7c6f50c75..f739b0c70 100644 --- a/examples/msw-v2/src/gen/mocks/createApiResponse.ts +++ b/examples/msw-v2/src/gen/mocks/createApiResponse.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { ApiResponse } from '../models/ApiResponse' +import type { ApiResponse } from '../models/ApiResponse' export function createApiResponse(): NonNullable { return { 'code': faker.number.float({}), 'type': faker.string.alpha(), 'message': faker.string.alpha() } diff --git a/examples/msw-v2/src/gen/mocks/createCategory.ts b/examples/msw-v2/src/gen/mocks/createCategory.ts index d6aa47b03..1d196ca87 100644 --- a/examples/msw-v2/src/gen/mocks/createCategory.ts +++ b/examples/msw-v2/src/gen/mocks/createCategory.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Category } from '../models/Category' +import type { Category } from '../models/Category' export function createCategory(): NonNullable { return { 'id': faker.number.float({}), 'name': faker.string.alpha() } diff --git a/examples/msw-v2/src/gen/mocks/createCustomer.ts b/examples/msw-v2/src/gen/mocks/createCustomer.ts index 194820579..4e5b78d5e 100644 --- a/examples/msw-v2/src/gen/mocks/createCustomer.ts +++ b/examples/msw-v2/src/gen/mocks/createCustomer.ts @@ -1,7 +1,6 @@ -import { faker } from '@faker-js/faker' - import { createAddress } from './createAddress' -import { Customer } from '../models/Customer' +import { faker } from '@faker-js/faker' +import type { Customer } from '../models/Customer' export function createCustomer(): NonNullable { return { 'id': faker.number.float({}), 'username': faker.string.alpha(), 'address': faker.helpers.arrayElements([createAddress()]) as any } diff --git a/examples/msw-v2/src/gen/mocks/createOrder.ts b/examples/msw-v2/src/gen/mocks/createOrder.ts index 06a54accc..fd1334224 100644 --- a/examples/msw-v2/src/gen/mocks/createOrder.ts +++ b/examples/msw-v2/src/gen/mocks/createOrder.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Order } from '../models/Order' +import type { Order } from '../models/Order' export function createOrder(): NonNullable { return { diff --git a/examples/msw-v2/src/gen/mocks/createPet.ts b/examples/msw-v2/src/gen/mocks/createPet.ts index da82af1fc..1491d0b69 100644 --- a/examples/msw-v2/src/gen/mocks/createPet.ts +++ b/examples/msw-v2/src/gen/mocks/createPet.ts @@ -1,8 +1,7 @@ -import { faker } from '@faker-js/faker' - import { createCategory } from './createCategory' import { createTag } from './createTag' -import { Pet } from '../models/Pet' +import { faker } from '@faker-js/faker' +import type { Pet } from '../models/Pet' export function createPet(): NonNullable { return { diff --git a/examples/msw-v2/src/gen/mocks/createPetNotFound.ts b/examples/msw-v2/src/gen/mocks/createPetNotFound.ts index 95ec3f712..1a626c363 100644 --- a/examples/msw-v2/src/gen/mocks/createPetNotFound.ts +++ b/examples/msw-v2/src/gen/mocks/createPetNotFound.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { PetNotFound } from '../models/PetNotFound' +import type { PetNotFound } from '../models/PetNotFound' export function createPetNotFound(): NonNullable { return { 'code': faker.number.float({}), 'message': faker.string.alpha() } diff --git a/examples/msw-v2/src/gen/mocks/createTag.ts b/examples/msw-v2/src/gen/mocks/createTag.ts index dc0fb66f2..cc0fd6af3 100644 --- a/examples/msw-v2/src/gen/mocks/createTag.ts +++ b/examples/msw-v2/src/gen/mocks/createTag.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Tag } from '../models/Tag' +import type { Tag } from '../models/Tag' export function createTag(): NonNullable { return { 'id': faker.number.float({}), 'name': faker.string.alpha() } diff --git a/examples/msw-v2/src/gen/mocks/createUser.ts b/examples/msw-v2/src/gen/mocks/createUser.ts index 4ea9389be..9d4312e9e 100644 --- a/examples/msw-v2/src/gen/mocks/createUser.ts +++ b/examples/msw-v2/src/gen/mocks/createUser.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { User } from '../models/User' +import type { User } from '../models/User' export function createUser(): NonNullable { return { diff --git a/examples/msw-v2/src/gen/mocks/createUserArray.ts b/examples/msw-v2/src/gen/mocks/createUserArray.ts index fd4c68c0e..5f9fa6ed0 100644 --- a/examples/msw-v2/src/gen/mocks/createUserArray.ts +++ b/examples/msw-v2/src/gen/mocks/createUserArray.ts @@ -1,7 +1,6 @@ -import { faker } from '@faker-js/faker' - import { createUser } from './createUser' -import { UserArray } from '../models/UserArray' +import { faker } from '@faker-js/faker' +import type { UserArray } from '../models/UserArray' export function createUserArray(): NonNullable { return faker.helpers.arrayElements([createUser()]) as any diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createAddPet.ts b/examples/msw-v2/src/gen/mocks/petMocks/createAddPet.ts index e4bdc18e1..c3e975f3f 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createAddPet.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createAddPet.ts @@ -1,15 +1,11 @@ import { faker } from '@faker-js/faker' - import { createAddPetRequest } from '../createAddPetRequest' import { createPet } from '../createPet' -import { AddPet405 } from '../../models/AddPet' -import { AddPetMutationRequest } from '../../models/AddPet' -import { AddPetMutationResponse } from '../../models/AddPet' +import type { AddPet405, AddPetMutationRequest, AddPetMutationResponse } from '../../models/AddPet' export function createAddPet405(): NonNullable { return { 'code': faker.number.float({}), 'message': faker.string.alpha() } } - /** * @description Create a new pet in the store */ @@ -17,7 +13,6 @@ export function createAddPet405(): NonNullable { export function createAddPetMutationRequest(): NonNullable { return createAddPetRequest() } - /** * @description Successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createDeletePet.ts b/examples/msw-v2/src/gen/mocks/petMocks/createDeletePet.ts index 4d73ac13c..b58898f6a 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createDeletePet.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createDeletePet.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeletePet400 } from '../../models/DeletePet' -import { DeletePetHeaderParams } from '../../models/DeletePet' -import { DeletePetMutationResponse } from '../../models/DeletePet' -import { DeletePetPathParams } from '../../models/DeletePet' +import type { DeletePet400, DeletePetHeaderParams, DeletePetMutationResponse, DeletePetPathParams } from '../../models/DeletePet' /** * @description Invalid pet value diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByStatus.ts b/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByStatus.ts index 87bced921..e66c85c34 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByStatus.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByStatus.ts @@ -1,9 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { FindPetsByStatus400 } from '../../models/FindPetsByStatus' -import { FindPetsByStatusQueryParams } from '../../models/FindPetsByStatus' -import { FindPetsByStatusQueryResponse } from '../../models/FindPetsByStatus' +import type { FindPetsByStatus400, FindPetsByStatusQueryParams, FindPetsByStatusQueryResponse } from '../../models/FindPetsByStatus' /** * @description Invalid status value @@ -16,7 +13,6 @@ export function createFindPetsByStatus400(): NonNullable { export function createFindPetsByStatusQueryParams(): NonNullable { return { 'status': faker.helpers.arrayElement([`available`, `pending`, `sold`]) } } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByTags.ts b/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByTags.ts index 991158fe2..b0b96d245 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByTags.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createFindPetsByTags.ts @@ -1,9 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { FindPetsByTags400 } from '../../models/FindPetsByTags' -import { FindPetsByTagsQueryParams } from '../../models/FindPetsByTags' -import { FindPetsByTagsQueryResponse } from '../../models/FindPetsByTags' +import type { FindPetsByTags400, FindPetsByTagsQueryParams, FindPetsByTagsQueryResponse } from '../../models/FindPetsByTags' /** * @description Invalid tag value @@ -16,7 +13,6 @@ export function createFindPetsByTags400(): NonNullable { export function createFindPetsByTagsQueryParams(): NonNullable { return { 'tags': faker.helpers.arrayElements([faker.string.alpha()]) as any, 'page': faker.string.alpha(), 'pageSize': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createGetPetById.ts b/examples/msw-v2/src/gen/mocks/petMocks/createGetPetById.ts index e489b5098..d65b80ad0 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createGetPetById.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createGetPetById.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { GetPetById400 } from '../../models/GetPetById' -import { GetPetById404 } from '../../models/GetPetById' -import { GetPetByIdPathParams } from '../../models/GetPetById' -import { GetPetByIdQueryResponse } from '../../models/GetPetById' +import type { GetPetById400, GetPetById404, GetPetByIdPathParams, GetPetByIdQueryResponse } from '../../models/GetPetById' /** * @description Invalid ID supplied @@ -13,7 +9,6 @@ import { GetPetByIdQueryResponse } from '../../models/GetPetById' export function createGetPetById400(): NonNullable { return undefined } - /** * @description Pet not found */ @@ -25,7 +20,6 @@ export function createGetPetById404(): NonNullable { export function createGetPetByIdPathParams(): NonNullable { return { 'petId': faker.number.float({}) } } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePet.ts b/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePet.ts index a10f01538..884ed58aa 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePet.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePet.ts @@ -1,9 +1,5 @@ import { createPet } from '../createPet' -import { UpdatePet400 } from '../../models/UpdatePet' -import { UpdatePet404 } from '../../models/UpdatePet' -import { UpdatePet405 } from '../../models/UpdatePet' -import { UpdatePetMutationRequest } from '../../models/UpdatePet' -import { UpdatePetMutationResponse } from '../../models/UpdatePet' +import type { UpdatePet400, UpdatePet404, UpdatePet405, UpdatePetMutationRequest, UpdatePetMutationResponse } from '../../models/UpdatePet' /** * @description Invalid ID supplied @@ -12,7 +8,6 @@ import { UpdatePetMutationResponse } from '../../models/UpdatePet' export function createUpdatePet400(): NonNullable { return undefined } - /** * @description Pet not found */ @@ -20,7 +15,6 @@ export function createUpdatePet400(): NonNullable { export function createUpdatePet404(): NonNullable { return undefined } - /** * @description Validation exception */ @@ -28,7 +22,6 @@ export function createUpdatePet404(): NonNullable { export function createUpdatePet405(): NonNullable { return undefined } - /** * @description Update an existent pet in the store */ @@ -36,7 +29,6 @@ export function createUpdatePet405(): NonNullable { export function createUpdatePetMutationRequest(): NonNullable { return createPet() } - /** * @description Successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePetWithForm.ts b/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePetWithForm.ts index f82860169..65349e823 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePetWithForm.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createUpdatePetWithForm.ts @@ -1,9 +1,10 @@ import { faker } from '@faker-js/faker' - -import { UpdatePetWithForm405 } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormMutationResponse } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormPathParams } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormQueryParams } from '../../models/UpdatePetWithForm' +import type { + UpdatePetWithForm405, + UpdatePetWithFormMutationResponse, + UpdatePetWithFormPathParams, + UpdatePetWithFormQueryParams, +} from '../../models/UpdatePetWithForm' /** * @description Invalid input diff --git a/examples/msw-v2/src/gen/mocks/petMocks/createUploadFile.ts b/examples/msw-v2/src/gen/mocks/petMocks/createUploadFile.ts index 1bbbea5a2..1ad5f27dc 100644 --- a/examples/msw-v2/src/gen/mocks/petMocks/createUploadFile.ts +++ b/examples/msw-v2/src/gen/mocks/petMocks/createUploadFile.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createApiResponse } from '../createApiResponse' -import { UploadFileMutationRequest } from '../../models/UploadFile' -import { UploadFilePathParams } from '../../models/UploadFile' -import { UploadFileQueryParams } from '../../models/UploadFile' -import { UploadFileMutationResponse } from '../../models/UploadFile' +import type { UploadFileMutationRequest, UploadFileMutationResponse, UploadFilePathParams, UploadFileQueryParams } from '../../models/UploadFile' export function createUploadFileMutationRequest(): NonNullable { return faker.string.alpha() @@ -17,7 +13,6 @@ export function createUploadFilePathParams(): NonNullable export function createUploadFileQueryParams(): NonNullable { return { 'additionalMetadata': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/storeMocks/createDeleteOrder.ts b/examples/msw-v2/src/gen/mocks/storeMocks/createDeleteOrder.ts index c77ec757c..306c6f6f4 100644 --- a/examples/msw-v2/src/gen/mocks/storeMocks/createDeleteOrder.ts +++ b/examples/msw-v2/src/gen/mocks/storeMocks/createDeleteOrder.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeleteOrder400 } from '../../models/DeleteOrder' -import { DeleteOrder404 } from '../../models/DeleteOrder' -import { DeleteOrderMutationResponse } from '../../models/DeleteOrder' -import { DeleteOrderPathParams } from '../../models/DeleteOrder' +import type { DeleteOrder400, DeleteOrder404, DeleteOrderMutationResponse, DeleteOrderPathParams } from '../../models/DeleteOrder' /** * @description Invalid ID supplied @@ -12,7 +8,6 @@ import { DeleteOrderPathParams } from '../../models/DeleteOrder' export function createDeleteOrder400(): NonNullable { return undefined } - /** * @description Order not found */ diff --git a/examples/msw-v2/src/gen/mocks/storeMocks/createGetInventory.ts b/examples/msw-v2/src/gen/mocks/storeMocks/createGetInventory.ts index 93a77d8c8..dcc95bca3 100644 --- a/examples/msw-v2/src/gen/mocks/storeMocks/createGetInventory.ts +++ b/examples/msw-v2/src/gen/mocks/storeMocks/createGetInventory.ts @@ -1,4 +1,4 @@ -import { GetInventoryQueryResponse } from '../../models/GetInventory' +import type { GetInventoryQueryResponse } from '../../models/GetInventory' /** * @description successful operation diff --git a/examples/msw-v2/src/gen/mocks/storeMocks/createGetOrderById.ts b/examples/msw-v2/src/gen/mocks/storeMocks/createGetOrderById.ts index b3975f2c8..919e6c0ca 100644 --- a/examples/msw-v2/src/gen/mocks/storeMocks/createGetOrderById.ts +++ b/examples/msw-v2/src/gen/mocks/storeMocks/createGetOrderById.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createOrder } from '../createOrder' -import { GetOrderById400 } from '../../models/GetOrderById' -import { GetOrderById404 } from '../../models/GetOrderById' -import { GetOrderByIdPathParams } from '../../models/GetOrderById' -import { GetOrderByIdQueryResponse } from '../../models/GetOrderById' +import type { GetOrderById400, GetOrderById404, GetOrderByIdPathParams, GetOrderByIdQueryResponse } from '../../models/GetOrderById' /** * @description Invalid ID supplied @@ -13,7 +9,6 @@ import { GetOrderByIdQueryResponse } from '../../models/GetOrderById' export function createGetOrderById400(): NonNullable { return undefined } - /** * @description Order not found */ @@ -25,7 +20,6 @@ export function createGetOrderById404(): NonNullable { export function createGetOrderByIdPathParams(): NonNullable { return { 'orderId': faker.number.float({}) } } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrder.ts b/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrder.ts index fec7ab24e..063ae3d3d 100644 --- a/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrder.ts +++ b/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrder.ts @@ -1,7 +1,5 @@ import { createOrder } from '../createOrder' -import { PlaceOrder405 } from '../../models/PlaceOrder' -import { PlaceOrderMutationRequest } from '../../models/PlaceOrder' -import { PlaceOrderMutationResponse } from '../../models/PlaceOrder' +import type { PlaceOrder405, PlaceOrderMutationRequest, PlaceOrderMutationResponse } from '../../models/PlaceOrder' /** * @description Invalid input @@ -14,7 +12,6 @@ export function createPlaceOrder405(): NonNullable { export function createPlaceOrderMutationRequest(): NonNullable { return createOrder() } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts b/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts index 13eb8eb34..8bc7aaf06 100644 --- a/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts +++ b/examples/msw-v2/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts @@ -1,7 +1,5 @@ import { createOrder } from '../createOrder' -import { PlaceOrderPatch405 } from '../../models/PlaceOrderPatch' -import { PlaceOrderPatchMutationRequest } from '../../models/PlaceOrderPatch' -import { PlaceOrderPatchMutationResponse } from '../../models/PlaceOrderPatch' +import type { PlaceOrderPatch405, PlaceOrderPatchMutationRequest, PlaceOrderPatchMutationResponse } from '../../models/PlaceOrderPatch' /** * @description Invalid input @@ -14,7 +12,6 @@ export function createPlaceOrderPatch405(): NonNullable { export function createPlaceOrderPatchMutationRequest(): NonNullable { return createOrder() } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/userMocks/createCreateUser.ts b/examples/msw-v2/src/gen/mocks/userMocks/createCreateUser.ts index 0dfe28d74..d414a9fdb 100644 --- a/examples/msw-v2/src/gen/mocks/userMocks/createCreateUser.ts +++ b/examples/msw-v2/src/gen/mocks/userMocks/createCreateUser.ts @@ -1,12 +1,9 @@ import { createUser } from '../createUser' -import { CreateUserMutationResponse } from '../../models/CreateUser' -import { CreateUserError } from '../../models/CreateUser' -import { CreateUserMutationRequest } from '../../models/CreateUser' +import type { CreateUserError, CreateUserMutationRequest, CreateUserMutationResponse } from '../../models/CreateUser' export function createCreateUserMutationResponse(): NonNullable { return undefined } - /** * @description successful operation */ @@ -14,7 +11,6 @@ export function createCreateUserMutationResponse(): NonNullable { return createUser() } - /** * @description Created user object */ diff --git a/examples/msw-v2/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts b/examples/msw-v2/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts index 49bacdf80..8c486eafd 100644 --- a/examples/msw-v2/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts +++ b/examples/msw-v2/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts @@ -1,9 +1,10 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { CreateUsersWithListInputError } from '../../models/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationRequest } from '../../models/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationResponse } from '../../models/CreateUsersWithListInput' +import type { + CreateUsersWithListInputError, + CreateUsersWithListInputMutationRequest, + CreateUsersWithListInputMutationResponse, +} from '../../models/CreateUsersWithListInput' /** * @description successful operation @@ -16,7 +17,6 @@ export function createCreateUsersWithListInputError(): NonNullable { return faker.helpers.arrayElements([createUser()]) as any } - /** * @description Successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/userMocks/createDeleteUser.ts b/examples/msw-v2/src/gen/mocks/userMocks/createDeleteUser.ts index a651db977..bd39c28e5 100644 --- a/examples/msw-v2/src/gen/mocks/userMocks/createDeleteUser.ts +++ b/examples/msw-v2/src/gen/mocks/userMocks/createDeleteUser.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeleteUser400 } from '../../models/DeleteUser' -import { DeleteUser404 } from '../../models/DeleteUser' -import { DeleteUserMutationResponse } from '../../models/DeleteUser' -import { DeleteUserPathParams } from '../../models/DeleteUser' +import type { DeleteUser400, DeleteUser404, DeleteUserMutationResponse, DeleteUserPathParams } from '../../models/DeleteUser' /** * @description Invalid username supplied @@ -12,7 +8,6 @@ import { DeleteUserPathParams } from '../../models/DeleteUser' export function createDeleteUser400(): NonNullable { return undefined } - /** * @description User not found */ diff --git a/examples/msw-v2/src/gen/mocks/userMocks/createGetUserByName.ts b/examples/msw-v2/src/gen/mocks/userMocks/createGetUserByName.ts index ba0b01bc1..7502fa709 100644 --- a/examples/msw-v2/src/gen/mocks/userMocks/createGetUserByName.ts +++ b/examples/msw-v2/src/gen/mocks/userMocks/createGetUserByName.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { GetUserByName400 } from '../../models/GetUserByName' -import { GetUserByName404 } from '../../models/GetUserByName' -import { GetUserByNamePathParams } from '../../models/GetUserByName' -import { GetUserByNameQueryResponse } from '../../models/GetUserByName' +import type { GetUserByName400, GetUserByName404, GetUserByNamePathParams, GetUserByNameQueryResponse } from '../../models/GetUserByName' /** * @description Invalid username supplied @@ -13,7 +9,6 @@ import { GetUserByNameQueryResponse } from '../../models/GetUserByName' export function createGetUserByName400(): NonNullable { return undefined } - /** * @description User not found */ @@ -25,7 +20,6 @@ export function createGetUserByName404(): NonNullable { export function createGetUserByNamePathParams(): NonNullable { return { 'username': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/userMocks/createLoginUser.ts b/examples/msw-v2/src/gen/mocks/userMocks/createLoginUser.ts index 999836ad2..ef90514c9 100644 --- a/examples/msw-v2/src/gen/mocks/userMocks/createLoginUser.ts +++ b/examples/msw-v2/src/gen/mocks/userMocks/createLoginUser.ts @@ -1,8 +1,5 @@ import { faker } from '@faker-js/faker' - -import { LoginUser400 } from '../../models/LoginUser' -import { LoginUserQueryParams } from '../../models/LoginUser' -import { LoginUserQueryResponse } from '../../models/LoginUser' +import type { LoginUser400, LoginUserQueryParams, LoginUserQueryResponse } from '../../models/LoginUser' /** * @description Invalid username/password supplied @@ -15,7 +12,6 @@ export function createLoginUser400(): NonNullable { export function createLoginUserQueryParams(): NonNullable { return { 'username': faker.string.alpha(), 'password': faker.internet.password() } } - /** * @description successful operation */ diff --git a/examples/msw-v2/src/gen/mocks/userMocks/createLogoutUser.ts b/examples/msw-v2/src/gen/mocks/userMocks/createLogoutUser.ts index 296071637..2a019abdf 100644 --- a/examples/msw-v2/src/gen/mocks/userMocks/createLogoutUser.ts +++ b/examples/msw-v2/src/gen/mocks/userMocks/createLogoutUser.ts @@ -1,5 +1,4 @@ -import { LogoutUserError } from '../../models/LogoutUser' -import { LogoutUserQueryResponse } from '../../models/LogoutUser' +import type { LogoutUserError, LogoutUserQueryResponse } from '../../models/LogoutUser' /** * @description successful operation diff --git a/examples/msw-v2/src/gen/mocks/userMocks/createUpdateUser.ts b/examples/msw-v2/src/gen/mocks/userMocks/createUpdateUser.ts index 73144e8bf..48c876939 100644 --- a/examples/msw-v2/src/gen/mocks/userMocks/createUpdateUser.ts +++ b/examples/msw-v2/src/gen/mocks/userMocks/createUpdateUser.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { UpdateUserError } from '../../models/UpdateUser' -import { UpdateUserMutationResponse } from '../../models/UpdateUser' -import { UpdateUserPathParams } from '../../models/UpdateUser' -import { UpdateUserMutationRequest } from '../../models/UpdateUser' +import type { UpdateUserError, UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserPathParams } from '../../models/UpdateUser' /** * @description successful operation @@ -21,7 +17,6 @@ export function createUpdateUserMutationResponse(): NonNullable { return { 'username': faker.string.alpha() } } - /** * @description Update an existent user in the store */ diff --git a/examples/msw-v2/src/gen/models/AddPet.ts b/examples/msw-v2/src/gen/models/AddPet.ts index 0c7911b45..c8349c827 100644 --- a/examples/msw-v2/src/gen/models/AddPet.ts +++ b/examples/msw-v2/src/gen/models/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/msw-v2/src/gen/models/CreateUser.ts b/examples/msw-v2/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/msw-v2/src/gen/models/CreateUser.ts +++ b/examples/msw-v2/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/msw-v2/src/gen/models/CreateUsersWithListInput.ts b/examples/msw-v2/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/msw-v2/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/msw-v2/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/msw-v2/src/gen/models/DeleteOrder.ts b/examples/msw-v2/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/msw-v2/src/gen/models/DeleteOrder.ts +++ b/examples/msw-v2/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/msw-v2/src/gen/models/DeletePet.ts b/examples/msw-v2/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/msw-v2/src/gen/models/DeletePet.ts +++ b/examples/msw-v2/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/msw-v2/src/gen/models/DeleteUser.ts b/examples/msw-v2/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/msw-v2/src/gen/models/DeleteUser.ts +++ b/examples/msw-v2/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/msw-v2/src/gen/models/FindPetsByStatus.ts b/examples/msw-v2/src/gen/models/FindPetsByStatus.ts index f84d6b225..ee89e038f 100644 --- a/examples/msw-v2/src/gen/models/FindPetsByStatus.ts +++ b/examples/msw-v2/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/msw-v2/src/gen/models/FindPetsByTags.ts b/examples/msw-v2/src/gen/models/FindPetsByTags.ts index 0f74ac3cb..135a247e5 100644 --- a/examples/msw-v2/src/gen/models/FindPetsByTags.ts +++ b/examples/msw-v2/src/gen/models/FindPetsByTags.ts @@ -27,7 +27,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/msw-v2/src/gen/models/GetInventory.ts b/examples/msw-v2/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/msw-v2/src/gen/models/GetInventory.ts +++ b/examples/msw-v2/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/msw-v2/src/gen/models/GetOrderById.ts b/examples/msw-v2/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/msw-v2/src/gen/models/GetOrderById.ts +++ b/examples/msw-v2/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/msw-v2/src/gen/models/GetPetById.ts b/examples/msw-v2/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/msw-v2/src/gen/models/GetPetById.ts +++ b/examples/msw-v2/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/msw-v2/src/gen/models/GetUserByName.ts b/examples/msw-v2/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/msw-v2/src/gen/models/GetUserByName.ts +++ b/examples/msw-v2/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/msw-v2/src/gen/models/LoginUser.ts b/examples/msw-v2/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/msw-v2/src/gen/models/LoginUser.ts +++ b/examples/msw-v2/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/msw-v2/src/gen/models/LogoutUser.ts b/examples/msw-v2/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/msw-v2/src/gen/models/LogoutUser.ts +++ b/examples/msw-v2/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/msw-v2/src/gen/models/PlaceOrder.ts b/examples/msw-v2/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/msw-v2/src/gen/models/PlaceOrder.ts +++ b/examples/msw-v2/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/msw-v2/src/gen/models/PlaceOrderPatch.ts b/examples/msw-v2/src/gen/models/PlaceOrderPatch.ts index 12340d275..b6a277f61 100644 --- a/examples/msw-v2/src/gen/models/PlaceOrderPatch.ts +++ b/examples/msw-v2/src/gen/models/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/msw-v2/src/gen/models/UpdatePet.ts b/examples/msw-v2/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/msw-v2/src/gen/models/UpdatePet.ts +++ b/examples/msw-v2/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/msw-v2/src/gen/models/UpdatePetWithForm.ts b/examples/msw-v2/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/msw-v2/src/gen/models/UpdatePetWithForm.ts +++ b/examples/msw-v2/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/msw-v2/src/gen/models/UpdateUser.ts b/examples/msw-v2/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/msw-v2/src/gen/models/UpdateUser.ts +++ b/examples/msw-v2/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/msw-v2/src/gen/models/UploadFile.ts b/examples/msw-v2/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/msw-v2/src/gen/models/UploadFile.ts +++ b/examples/msw-v2/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/msw/src/gen/mocks/createAddPetRequest.ts b/examples/msw/src/gen/mocks/createAddPetRequest.ts index dba5de469..b281aafae 100644 --- a/examples/msw/src/gen/mocks/createAddPetRequest.ts +++ b/examples/msw/src/gen/mocks/createAddPetRequest.ts @@ -1,8 +1,7 @@ -import { faker } from '@faker-js/faker' - import { createCategory } from './createCategory' import { createTag } from './createTag' -import { AddPetRequest } from '../models/AddPetRequest' +import { faker } from '@faker-js/faker' +import type { AddPetRequest } from '../models/AddPetRequest' export function createAddPetRequest(): NonNullable { return { diff --git a/examples/msw/src/gen/mocks/createAddress.ts b/examples/msw/src/gen/mocks/createAddress.ts index 054912102..5591f4737 100644 --- a/examples/msw/src/gen/mocks/createAddress.ts +++ b/examples/msw/src/gen/mocks/createAddress.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Address } from '../models/Address' +import type { Address } from '../models/Address' export function createAddress(): NonNullable
{ return { 'street': faker.string.alpha(), 'city': faker.string.alpha(), 'state': faker.string.alpha(), 'zip': faker.string.alpha() } diff --git a/examples/msw/src/gen/mocks/createApiResponse.ts b/examples/msw/src/gen/mocks/createApiResponse.ts index 7c6f50c75..f739b0c70 100644 --- a/examples/msw/src/gen/mocks/createApiResponse.ts +++ b/examples/msw/src/gen/mocks/createApiResponse.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { ApiResponse } from '../models/ApiResponse' +import type { ApiResponse } from '../models/ApiResponse' export function createApiResponse(): NonNullable { return { 'code': faker.number.float({}), 'type': faker.string.alpha(), 'message': faker.string.alpha() } diff --git a/examples/msw/src/gen/mocks/createCategory.ts b/examples/msw/src/gen/mocks/createCategory.ts index d6aa47b03..1d196ca87 100644 --- a/examples/msw/src/gen/mocks/createCategory.ts +++ b/examples/msw/src/gen/mocks/createCategory.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Category } from '../models/Category' +import type { Category } from '../models/Category' export function createCategory(): NonNullable { return { 'id': faker.number.float({}), 'name': faker.string.alpha() } diff --git a/examples/msw/src/gen/mocks/createCustomer.ts b/examples/msw/src/gen/mocks/createCustomer.ts index 194820579..4e5b78d5e 100644 --- a/examples/msw/src/gen/mocks/createCustomer.ts +++ b/examples/msw/src/gen/mocks/createCustomer.ts @@ -1,7 +1,6 @@ -import { faker } from '@faker-js/faker' - import { createAddress } from './createAddress' -import { Customer } from '../models/Customer' +import { faker } from '@faker-js/faker' +import type { Customer } from '../models/Customer' export function createCustomer(): NonNullable { return { 'id': faker.number.float({}), 'username': faker.string.alpha(), 'address': faker.helpers.arrayElements([createAddress()]) as any } diff --git a/examples/msw/src/gen/mocks/createOrder.ts b/examples/msw/src/gen/mocks/createOrder.ts index 06a54accc..fd1334224 100644 --- a/examples/msw/src/gen/mocks/createOrder.ts +++ b/examples/msw/src/gen/mocks/createOrder.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Order } from '../models/Order' +import type { Order } from '../models/Order' export function createOrder(): NonNullable { return { diff --git a/examples/msw/src/gen/mocks/createPet.ts b/examples/msw/src/gen/mocks/createPet.ts index da82af1fc..1491d0b69 100644 --- a/examples/msw/src/gen/mocks/createPet.ts +++ b/examples/msw/src/gen/mocks/createPet.ts @@ -1,8 +1,7 @@ -import { faker } from '@faker-js/faker' - import { createCategory } from './createCategory' import { createTag } from './createTag' -import { Pet } from '../models/Pet' +import { faker } from '@faker-js/faker' +import type { Pet } from '../models/Pet' export function createPet(): NonNullable { return { diff --git a/examples/msw/src/gen/mocks/createPetNotFound.ts b/examples/msw/src/gen/mocks/createPetNotFound.ts index 95ec3f712..1a626c363 100644 --- a/examples/msw/src/gen/mocks/createPetNotFound.ts +++ b/examples/msw/src/gen/mocks/createPetNotFound.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { PetNotFound } from '../models/PetNotFound' +import type { PetNotFound } from '../models/PetNotFound' export function createPetNotFound(): NonNullable { return { 'code': faker.number.float({}), 'message': faker.string.alpha() } diff --git a/examples/msw/src/gen/mocks/createTag.ts b/examples/msw/src/gen/mocks/createTag.ts index dc0fb66f2..cc0fd6af3 100644 --- a/examples/msw/src/gen/mocks/createTag.ts +++ b/examples/msw/src/gen/mocks/createTag.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { Tag } from '../models/Tag' +import type { Tag } from '../models/Tag' export function createTag(): NonNullable { return { 'id': faker.number.float({}), 'name': faker.string.alpha() } diff --git a/examples/msw/src/gen/mocks/createUser.ts b/examples/msw/src/gen/mocks/createUser.ts index 4ea9389be..9d4312e9e 100644 --- a/examples/msw/src/gen/mocks/createUser.ts +++ b/examples/msw/src/gen/mocks/createUser.ts @@ -1,6 +1,5 @@ import { faker } from '@faker-js/faker' - -import { User } from '../models/User' +import type { User } from '../models/User' export function createUser(): NonNullable { return { diff --git a/examples/msw/src/gen/mocks/createUserArray.ts b/examples/msw/src/gen/mocks/createUserArray.ts index fd4c68c0e..5f9fa6ed0 100644 --- a/examples/msw/src/gen/mocks/createUserArray.ts +++ b/examples/msw/src/gen/mocks/createUserArray.ts @@ -1,7 +1,6 @@ -import { faker } from '@faker-js/faker' - import { createUser } from './createUser' -import { UserArray } from '../models/UserArray' +import { faker } from '@faker-js/faker' +import type { UserArray } from '../models/UserArray' export function createUserArray(): NonNullable { return faker.helpers.arrayElements([createUser()]) as any diff --git a/examples/msw/src/gen/mocks/petMocks/createAddPet.ts b/examples/msw/src/gen/mocks/petMocks/createAddPet.ts index e4bdc18e1..c3e975f3f 100644 --- a/examples/msw/src/gen/mocks/petMocks/createAddPet.ts +++ b/examples/msw/src/gen/mocks/petMocks/createAddPet.ts @@ -1,15 +1,11 @@ import { faker } from '@faker-js/faker' - import { createAddPetRequest } from '../createAddPetRequest' import { createPet } from '../createPet' -import { AddPet405 } from '../../models/AddPet' -import { AddPetMutationRequest } from '../../models/AddPet' -import { AddPetMutationResponse } from '../../models/AddPet' +import type { AddPet405, AddPetMutationRequest, AddPetMutationResponse } from '../../models/AddPet' export function createAddPet405(): NonNullable { return { 'code': faker.number.float({}), 'message': faker.string.alpha() } } - /** * @description Create a new pet in the store */ @@ -17,7 +13,6 @@ export function createAddPet405(): NonNullable { export function createAddPetMutationRequest(): NonNullable { return createAddPetRequest() } - /** * @description Successful operation */ diff --git a/examples/msw/src/gen/mocks/petMocks/createDeletePet.ts b/examples/msw/src/gen/mocks/petMocks/createDeletePet.ts index 4d73ac13c..b58898f6a 100644 --- a/examples/msw/src/gen/mocks/petMocks/createDeletePet.ts +++ b/examples/msw/src/gen/mocks/petMocks/createDeletePet.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeletePet400 } from '../../models/DeletePet' -import { DeletePetHeaderParams } from '../../models/DeletePet' -import { DeletePetMutationResponse } from '../../models/DeletePet' -import { DeletePetPathParams } from '../../models/DeletePet' +import type { DeletePet400, DeletePetHeaderParams, DeletePetMutationResponse, DeletePetPathParams } from '../../models/DeletePet' /** * @description Invalid pet value diff --git a/examples/msw/src/gen/mocks/petMocks/createFindPetsByStatus.ts b/examples/msw/src/gen/mocks/petMocks/createFindPetsByStatus.ts index 87bced921..e66c85c34 100644 --- a/examples/msw/src/gen/mocks/petMocks/createFindPetsByStatus.ts +++ b/examples/msw/src/gen/mocks/petMocks/createFindPetsByStatus.ts @@ -1,9 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { FindPetsByStatus400 } from '../../models/FindPetsByStatus' -import { FindPetsByStatusQueryParams } from '../../models/FindPetsByStatus' -import { FindPetsByStatusQueryResponse } from '../../models/FindPetsByStatus' +import type { FindPetsByStatus400, FindPetsByStatusQueryParams, FindPetsByStatusQueryResponse } from '../../models/FindPetsByStatus' /** * @description Invalid status value @@ -16,7 +13,6 @@ export function createFindPetsByStatus400(): NonNullable { export function createFindPetsByStatusQueryParams(): NonNullable { return { 'status': faker.helpers.arrayElement([`available`, `pending`, `sold`]) } } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/petMocks/createFindPetsByTags.ts b/examples/msw/src/gen/mocks/petMocks/createFindPetsByTags.ts index 991158fe2..b0b96d245 100644 --- a/examples/msw/src/gen/mocks/petMocks/createFindPetsByTags.ts +++ b/examples/msw/src/gen/mocks/petMocks/createFindPetsByTags.ts @@ -1,9 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { FindPetsByTags400 } from '../../models/FindPetsByTags' -import { FindPetsByTagsQueryParams } from '../../models/FindPetsByTags' -import { FindPetsByTagsQueryResponse } from '../../models/FindPetsByTags' +import type { FindPetsByTags400, FindPetsByTagsQueryParams, FindPetsByTagsQueryResponse } from '../../models/FindPetsByTags' /** * @description Invalid tag value @@ -16,7 +13,6 @@ export function createFindPetsByTags400(): NonNullable { export function createFindPetsByTagsQueryParams(): NonNullable { return { 'tags': faker.helpers.arrayElements([faker.string.alpha()]) as any, 'page': faker.string.alpha(), 'pageSize': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/petMocks/createGetPetById.ts b/examples/msw/src/gen/mocks/petMocks/createGetPetById.ts index e489b5098..d65b80ad0 100644 --- a/examples/msw/src/gen/mocks/petMocks/createGetPetById.ts +++ b/examples/msw/src/gen/mocks/petMocks/createGetPetById.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createPet } from '../createPet' -import { GetPetById400 } from '../../models/GetPetById' -import { GetPetById404 } from '../../models/GetPetById' -import { GetPetByIdPathParams } from '../../models/GetPetById' -import { GetPetByIdQueryResponse } from '../../models/GetPetById' +import type { GetPetById400, GetPetById404, GetPetByIdPathParams, GetPetByIdQueryResponse } from '../../models/GetPetById' /** * @description Invalid ID supplied @@ -13,7 +9,6 @@ import { GetPetByIdQueryResponse } from '../../models/GetPetById' export function createGetPetById400(): NonNullable { return undefined } - /** * @description Pet not found */ @@ -25,7 +20,6 @@ export function createGetPetById404(): NonNullable { export function createGetPetByIdPathParams(): NonNullable { return { 'petId': faker.number.float({}) } } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/petMocks/createUpdatePet.ts b/examples/msw/src/gen/mocks/petMocks/createUpdatePet.ts index a10f01538..884ed58aa 100644 --- a/examples/msw/src/gen/mocks/petMocks/createUpdatePet.ts +++ b/examples/msw/src/gen/mocks/petMocks/createUpdatePet.ts @@ -1,9 +1,5 @@ import { createPet } from '../createPet' -import { UpdatePet400 } from '../../models/UpdatePet' -import { UpdatePet404 } from '../../models/UpdatePet' -import { UpdatePet405 } from '../../models/UpdatePet' -import { UpdatePetMutationRequest } from '../../models/UpdatePet' -import { UpdatePetMutationResponse } from '../../models/UpdatePet' +import type { UpdatePet400, UpdatePet404, UpdatePet405, UpdatePetMutationRequest, UpdatePetMutationResponse } from '../../models/UpdatePet' /** * @description Invalid ID supplied @@ -12,7 +8,6 @@ import { UpdatePetMutationResponse } from '../../models/UpdatePet' export function createUpdatePet400(): NonNullable { return undefined } - /** * @description Pet not found */ @@ -20,7 +15,6 @@ export function createUpdatePet400(): NonNullable { export function createUpdatePet404(): NonNullable { return undefined } - /** * @description Validation exception */ @@ -28,7 +22,6 @@ export function createUpdatePet404(): NonNullable { export function createUpdatePet405(): NonNullable { return undefined } - /** * @description Update an existent pet in the store */ @@ -36,7 +29,6 @@ export function createUpdatePet405(): NonNullable { export function createUpdatePetMutationRequest(): NonNullable { return createPet() } - /** * @description Successful operation */ diff --git a/examples/msw/src/gen/mocks/petMocks/createUpdatePetWithForm.ts b/examples/msw/src/gen/mocks/petMocks/createUpdatePetWithForm.ts index f82860169..65349e823 100644 --- a/examples/msw/src/gen/mocks/petMocks/createUpdatePetWithForm.ts +++ b/examples/msw/src/gen/mocks/petMocks/createUpdatePetWithForm.ts @@ -1,9 +1,10 @@ import { faker } from '@faker-js/faker' - -import { UpdatePetWithForm405 } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormMutationResponse } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormPathParams } from '../../models/UpdatePetWithForm' -import { UpdatePetWithFormQueryParams } from '../../models/UpdatePetWithForm' +import type { + UpdatePetWithForm405, + UpdatePetWithFormMutationResponse, + UpdatePetWithFormPathParams, + UpdatePetWithFormQueryParams, +} from '../../models/UpdatePetWithForm' /** * @description Invalid input diff --git a/examples/msw/src/gen/mocks/petMocks/createUploadFile.ts b/examples/msw/src/gen/mocks/petMocks/createUploadFile.ts index 1bbbea5a2..1ad5f27dc 100644 --- a/examples/msw/src/gen/mocks/petMocks/createUploadFile.ts +++ b/examples/msw/src/gen/mocks/petMocks/createUploadFile.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createApiResponse } from '../createApiResponse' -import { UploadFileMutationRequest } from '../../models/UploadFile' -import { UploadFilePathParams } from '../../models/UploadFile' -import { UploadFileQueryParams } from '../../models/UploadFile' -import { UploadFileMutationResponse } from '../../models/UploadFile' +import type { UploadFileMutationRequest, UploadFileMutationResponse, UploadFilePathParams, UploadFileQueryParams } from '../../models/UploadFile' export function createUploadFileMutationRequest(): NonNullable { return faker.string.alpha() @@ -17,7 +13,6 @@ export function createUploadFilePathParams(): NonNullable export function createUploadFileQueryParams(): NonNullable { return { 'additionalMetadata': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/storeMocks/createDeleteOrder.ts b/examples/msw/src/gen/mocks/storeMocks/createDeleteOrder.ts index c77ec757c..306c6f6f4 100644 --- a/examples/msw/src/gen/mocks/storeMocks/createDeleteOrder.ts +++ b/examples/msw/src/gen/mocks/storeMocks/createDeleteOrder.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeleteOrder400 } from '../../models/DeleteOrder' -import { DeleteOrder404 } from '../../models/DeleteOrder' -import { DeleteOrderMutationResponse } from '../../models/DeleteOrder' -import { DeleteOrderPathParams } from '../../models/DeleteOrder' +import type { DeleteOrder400, DeleteOrder404, DeleteOrderMutationResponse, DeleteOrderPathParams } from '../../models/DeleteOrder' /** * @description Invalid ID supplied @@ -12,7 +8,6 @@ import { DeleteOrderPathParams } from '../../models/DeleteOrder' export function createDeleteOrder400(): NonNullable { return undefined } - /** * @description Order not found */ diff --git a/examples/msw/src/gen/mocks/storeMocks/createGetInventory.ts b/examples/msw/src/gen/mocks/storeMocks/createGetInventory.ts index 93a77d8c8..dcc95bca3 100644 --- a/examples/msw/src/gen/mocks/storeMocks/createGetInventory.ts +++ b/examples/msw/src/gen/mocks/storeMocks/createGetInventory.ts @@ -1,4 +1,4 @@ -import { GetInventoryQueryResponse } from '../../models/GetInventory' +import type { GetInventoryQueryResponse } from '../../models/GetInventory' /** * @description successful operation diff --git a/examples/msw/src/gen/mocks/storeMocks/createGetOrderById.ts b/examples/msw/src/gen/mocks/storeMocks/createGetOrderById.ts index b3975f2c8..919e6c0ca 100644 --- a/examples/msw/src/gen/mocks/storeMocks/createGetOrderById.ts +++ b/examples/msw/src/gen/mocks/storeMocks/createGetOrderById.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createOrder } from '../createOrder' -import { GetOrderById400 } from '../../models/GetOrderById' -import { GetOrderById404 } from '../../models/GetOrderById' -import { GetOrderByIdPathParams } from '../../models/GetOrderById' -import { GetOrderByIdQueryResponse } from '../../models/GetOrderById' +import type { GetOrderById400, GetOrderById404, GetOrderByIdPathParams, GetOrderByIdQueryResponse } from '../../models/GetOrderById' /** * @description Invalid ID supplied @@ -13,7 +9,6 @@ import { GetOrderByIdQueryResponse } from '../../models/GetOrderById' export function createGetOrderById400(): NonNullable { return undefined } - /** * @description Order not found */ @@ -25,7 +20,6 @@ export function createGetOrderById404(): NonNullable { export function createGetOrderByIdPathParams(): NonNullable { return { 'orderId': faker.number.float({}) } } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/storeMocks/createPlaceOrder.ts b/examples/msw/src/gen/mocks/storeMocks/createPlaceOrder.ts index fec7ab24e..063ae3d3d 100644 --- a/examples/msw/src/gen/mocks/storeMocks/createPlaceOrder.ts +++ b/examples/msw/src/gen/mocks/storeMocks/createPlaceOrder.ts @@ -1,7 +1,5 @@ import { createOrder } from '../createOrder' -import { PlaceOrder405 } from '../../models/PlaceOrder' -import { PlaceOrderMutationRequest } from '../../models/PlaceOrder' -import { PlaceOrderMutationResponse } from '../../models/PlaceOrder' +import type { PlaceOrder405, PlaceOrderMutationRequest, PlaceOrderMutationResponse } from '../../models/PlaceOrder' /** * @description Invalid input @@ -14,7 +12,6 @@ export function createPlaceOrder405(): NonNullable { export function createPlaceOrderMutationRequest(): NonNullable { return createOrder() } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts b/examples/msw/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts index 13eb8eb34..8bc7aaf06 100644 --- a/examples/msw/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts +++ b/examples/msw/src/gen/mocks/storeMocks/createPlaceOrderPatch.ts @@ -1,7 +1,5 @@ import { createOrder } from '../createOrder' -import { PlaceOrderPatch405 } from '../../models/PlaceOrderPatch' -import { PlaceOrderPatchMutationRequest } from '../../models/PlaceOrderPatch' -import { PlaceOrderPatchMutationResponse } from '../../models/PlaceOrderPatch' +import type { PlaceOrderPatch405, PlaceOrderPatchMutationRequest, PlaceOrderPatchMutationResponse } from '../../models/PlaceOrderPatch' /** * @description Invalid input @@ -14,7 +12,6 @@ export function createPlaceOrderPatch405(): NonNullable { export function createPlaceOrderPatchMutationRequest(): NonNullable { return createOrder() } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/userMocks/createCreateUser.ts b/examples/msw/src/gen/mocks/userMocks/createCreateUser.ts index 0dfe28d74..d414a9fdb 100644 --- a/examples/msw/src/gen/mocks/userMocks/createCreateUser.ts +++ b/examples/msw/src/gen/mocks/userMocks/createCreateUser.ts @@ -1,12 +1,9 @@ import { createUser } from '../createUser' -import { CreateUserMutationResponse } from '../../models/CreateUser' -import { CreateUserError } from '../../models/CreateUser' -import { CreateUserMutationRequest } from '../../models/CreateUser' +import type { CreateUserError, CreateUserMutationRequest, CreateUserMutationResponse } from '../../models/CreateUser' export function createCreateUserMutationResponse(): NonNullable { return undefined } - /** * @description successful operation */ @@ -14,7 +11,6 @@ export function createCreateUserMutationResponse(): NonNullable { return createUser() } - /** * @description Created user object */ diff --git a/examples/msw/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts b/examples/msw/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts index 49bacdf80..8c486eafd 100644 --- a/examples/msw/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts +++ b/examples/msw/src/gen/mocks/userMocks/createCreateUsersWithListInput.ts @@ -1,9 +1,10 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { CreateUsersWithListInputError } from '../../models/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationRequest } from '../../models/CreateUsersWithListInput' -import { CreateUsersWithListInputMutationResponse } from '../../models/CreateUsersWithListInput' +import type { + CreateUsersWithListInputError, + CreateUsersWithListInputMutationRequest, + CreateUsersWithListInputMutationResponse, +} from '../../models/CreateUsersWithListInput' /** * @description successful operation @@ -16,7 +17,6 @@ export function createCreateUsersWithListInputError(): NonNullable { return faker.helpers.arrayElements([createUser()]) as any } - /** * @description Successful operation */ diff --git a/examples/msw/src/gen/mocks/userMocks/createDeleteUser.ts b/examples/msw/src/gen/mocks/userMocks/createDeleteUser.ts index a651db977..bd39c28e5 100644 --- a/examples/msw/src/gen/mocks/userMocks/createDeleteUser.ts +++ b/examples/msw/src/gen/mocks/userMocks/createDeleteUser.ts @@ -1,9 +1,5 @@ import { faker } from '@faker-js/faker' - -import { DeleteUser400 } from '../../models/DeleteUser' -import { DeleteUser404 } from '../../models/DeleteUser' -import { DeleteUserMutationResponse } from '../../models/DeleteUser' -import { DeleteUserPathParams } from '../../models/DeleteUser' +import type { DeleteUser400, DeleteUser404, DeleteUserMutationResponse, DeleteUserPathParams } from '../../models/DeleteUser' /** * @description Invalid username supplied @@ -12,7 +8,6 @@ import { DeleteUserPathParams } from '../../models/DeleteUser' export function createDeleteUser400(): NonNullable { return undefined } - /** * @description User not found */ diff --git a/examples/msw/src/gen/mocks/userMocks/createGetUserByName.ts b/examples/msw/src/gen/mocks/userMocks/createGetUserByName.ts index ba0b01bc1..7502fa709 100644 --- a/examples/msw/src/gen/mocks/userMocks/createGetUserByName.ts +++ b/examples/msw/src/gen/mocks/userMocks/createGetUserByName.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { GetUserByName400 } from '../../models/GetUserByName' -import { GetUserByName404 } from '../../models/GetUserByName' -import { GetUserByNamePathParams } from '../../models/GetUserByName' -import { GetUserByNameQueryResponse } from '../../models/GetUserByName' +import type { GetUserByName400, GetUserByName404, GetUserByNamePathParams, GetUserByNameQueryResponse } from '../../models/GetUserByName' /** * @description Invalid username supplied @@ -13,7 +9,6 @@ import { GetUserByNameQueryResponse } from '../../models/GetUserByName' export function createGetUserByName400(): NonNullable { return undefined } - /** * @description User not found */ @@ -25,7 +20,6 @@ export function createGetUserByName404(): NonNullable { export function createGetUserByNamePathParams(): NonNullable { return { 'username': faker.string.alpha() } } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/userMocks/createLoginUser.ts b/examples/msw/src/gen/mocks/userMocks/createLoginUser.ts index 999836ad2..ef90514c9 100644 --- a/examples/msw/src/gen/mocks/userMocks/createLoginUser.ts +++ b/examples/msw/src/gen/mocks/userMocks/createLoginUser.ts @@ -1,8 +1,5 @@ import { faker } from '@faker-js/faker' - -import { LoginUser400 } from '../../models/LoginUser' -import { LoginUserQueryParams } from '../../models/LoginUser' -import { LoginUserQueryResponse } from '../../models/LoginUser' +import type { LoginUser400, LoginUserQueryParams, LoginUserQueryResponse } from '../../models/LoginUser' /** * @description Invalid username/password supplied @@ -15,7 +12,6 @@ export function createLoginUser400(): NonNullable { export function createLoginUserQueryParams(): NonNullable { return { 'username': faker.string.alpha(), 'password': faker.internet.password() } } - /** * @description successful operation */ diff --git a/examples/msw/src/gen/mocks/userMocks/createLogoutUser.ts b/examples/msw/src/gen/mocks/userMocks/createLogoutUser.ts index 296071637..2a019abdf 100644 --- a/examples/msw/src/gen/mocks/userMocks/createLogoutUser.ts +++ b/examples/msw/src/gen/mocks/userMocks/createLogoutUser.ts @@ -1,5 +1,4 @@ -import { LogoutUserError } from '../../models/LogoutUser' -import { LogoutUserQueryResponse } from '../../models/LogoutUser' +import type { LogoutUserError, LogoutUserQueryResponse } from '../../models/LogoutUser' /** * @description successful operation diff --git a/examples/msw/src/gen/mocks/userMocks/createUpdateUser.ts b/examples/msw/src/gen/mocks/userMocks/createUpdateUser.ts index 73144e8bf..48c876939 100644 --- a/examples/msw/src/gen/mocks/userMocks/createUpdateUser.ts +++ b/examples/msw/src/gen/mocks/userMocks/createUpdateUser.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker' - import { createUser } from '../createUser' -import { UpdateUserError } from '../../models/UpdateUser' -import { UpdateUserMutationResponse } from '../../models/UpdateUser' -import { UpdateUserPathParams } from '../../models/UpdateUser' -import { UpdateUserMutationRequest } from '../../models/UpdateUser' +import type { UpdateUserError, UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserPathParams } from '../../models/UpdateUser' /** * @description successful operation @@ -21,7 +17,6 @@ export function createUpdateUserMutationResponse(): NonNullable { return { 'username': faker.string.alpha() } } - /** * @description Update an existent user in the store */ diff --git a/examples/msw/src/gen/models/AddPet.ts b/examples/msw/src/gen/models/AddPet.ts index 0c7911b45..c8349c827 100644 --- a/examples/msw/src/gen/models/AddPet.ts +++ b/examples/msw/src/gen/models/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/msw/src/gen/models/CreateUser.ts b/examples/msw/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/msw/src/gen/models/CreateUser.ts +++ b/examples/msw/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/msw/src/gen/models/CreateUsersWithListInput.ts b/examples/msw/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/msw/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/msw/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/msw/src/gen/models/DeleteOrder.ts b/examples/msw/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/msw/src/gen/models/DeleteOrder.ts +++ b/examples/msw/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/msw/src/gen/models/DeletePet.ts b/examples/msw/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/msw/src/gen/models/DeletePet.ts +++ b/examples/msw/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/msw/src/gen/models/DeleteUser.ts b/examples/msw/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/msw/src/gen/models/DeleteUser.ts +++ b/examples/msw/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/msw/src/gen/models/FindPetsByStatus.ts b/examples/msw/src/gen/models/FindPetsByStatus.ts index f84d6b225..ee89e038f 100644 --- a/examples/msw/src/gen/models/FindPetsByStatus.ts +++ b/examples/msw/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/msw/src/gen/models/FindPetsByTags.ts b/examples/msw/src/gen/models/FindPetsByTags.ts index 0f74ac3cb..135a247e5 100644 --- a/examples/msw/src/gen/models/FindPetsByTags.ts +++ b/examples/msw/src/gen/models/FindPetsByTags.ts @@ -27,7 +27,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/msw/src/gen/models/GetInventory.ts b/examples/msw/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/msw/src/gen/models/GetInventory.ts +++ b/examples/msw/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/msw/src/gen/models/GetOrderById.ts b/examples/msw/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/msw/src/gen/models/GetOrderById.ts +++ b/examples/msw/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/msw/src/gen/models/GetPetById.ts b/examples/msw/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/msw/src/gen/models/GetPetById.ts +++ b/examples/msw/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/msw/src/gen/models/GetUserByName.ts b/examples/msw/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/msw/src/gen/models/GetUserByName.ts +++ b/examples/msw/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/msw/src/gen/models/LoginUser.ts b/examples/msw/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/msw/src/gen/models/LoginUser.ts +++ b/examples/msw/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/msw/src/gen/models/LogoutUser.ts b/examples/msw/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/msw/src/gen/models/LogoutUser.ts +++ b/examples/msw/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/msw/src/gen/models/PlaceOrder.ts b/examples/msw/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/msw/src/gen/models/PlaceOrder.ts +++ b/examples/msw/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/msw/src/gen/models/PlaceOrderPatch.ts b/examples/msw/src/gen/models/PlaceOrderPatch.ts index 12340d275..b6a277f61 100644 --- a/examples/msw/src/gen/models/PlaceOrderPatch.ts +++ b/examples/msw/src/gen/models/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/msw/src/gen/models/UpdatePet.ts b/examples/msw/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/msw/src/gen/models/UpdatePet.ts +++ b/examples/msw/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/msw/src/gen/models/UpdatePetWithForm.ts b/examples/msw/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/msw/src/gen/models/UpdatePetWithForm.ts +++ b/examples/msw/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/msw/src/gen/models/UpdateUser.ts b/examples/msw/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/msw/src/gen/models/UpdateUser.ts +++ b/examples/msw/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/msw/src/gen/models/UploadFile.ts b/examples/msw/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/msw/src/gen/models/UploadFile.ts +++ b/examples/msw/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/react-query-v5/package.json b/examples/react-query-v5/package.json index 53a615cb2..35243de4b 100644 --- a/examples/react-query-v5/package.json +++ b/examples/react-query-v5/package.json @@ -28,7 +28,7 @@ "@kubb/swagger-client": "workspace:*", "@kubb/swagger-tanstack-query": "workspace:*", "@kubb/swagger-ts": "workspace:*", - "@tanstack/react-query": "^5.8.4", + "@tanstack/react-query": "^5.8.6", "@tanstack/react-query-devtools": "5.0.0", "axios": "^1.6.2", "react": "^18.2.0", diff --git a/examples/react-query-v5/src/gen/hooks/useAddPetHook.ts b/examples/react-query-v5/src/gen/hooks/useAddPetHook.ts index f7f02f435..4c943d301 100644 --- a/examples/react-query-v5/src/gen/hooks/useAddPetHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useAddPetHook.ts @@ -21,8 +21,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPetHook(options: { mutation?: UseMutationOptions client?: AddPet['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useCreateUserHook.ts b/examples/react-query-v5/src/gen/hooks/useCreateUserHook.ts index 5155af054..cfad4c83b 100644 --- a/examples/react-query-v5/src/gen/hooks/useCreateUserHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useCreateUserHook.ts @@ -21,8 +21,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUserHook(options: { mutation?: UseMutationOptions client?: CreateUser['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useCreateUsersWithListInputHook.ts b/examples/react-query-v5/src/gen/hooks/useCreateUsersWithListInputHook.ts index e80ed6b25..d853fdd6e 100644 --- a/examples/react-query-v5/src/gen/hooks/useCreateUsersWithListInputHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useCreateUsersWithListInputHook.ts @@ -29,8 +29,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInputHook(options: { mutation?: UseMutationOptions client?: CreateUsersWithListInput['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useDeleteOrderHook.ts b/examples/react-query-v5/src/gen/hooks/useDeleteOrderHook.ts index 0229928c7..e23f8b576 100644 --- a/examples/react-query-v5/src/gen/hooks/useDeleteOrderHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useDeleteOrderHook.ts @@ -21,8 +21,7 @@ type DeleteOrder = { /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function useDeleteOrderHook(orderId: DeleteOrderPathParams['orderId'], options: { mutation?: UseMutationOptions client?: DeleteOrder['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useDeletePetHook.ts b/examples/react-query-v5/src/gen/hooks/useDeletePetHook.ts index 9b9288c71..e7b8fa230 100644 --- a/examples/react-query-v5/src/gen/hooks/useDeletePetHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useDeletePetHook.ts @@ -21,8 +21,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePetHook( petId: DeletePetPathParams['petId'], headers?: DeletePet['headerParams'], diff --git a/examples/react-query-v5/src/gen/hooks/useDeleteUserHook.ts b/examples/react-query-v5/src/gen/hooks/useDeleteUserHook.ts index 9aa676faa..4e8506c93 100644 --- a/examples/react-query-v5/src/gen/hooks/useDeleteUserHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useDeleteUserHook.ts @@ -21,8 +21,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUserHook(username: DeleteUserPathParams['username'], options: { mutation?: UseMutationOptions client?: DeleteUser['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useFindPetsByStatusHook.ts b/examples/react-query-v5/src/gen/hooks/useFindPetsByStatusHook.ts index 26cd6f978..c416e6a2f 100644 --- a/examples/react-query-v5/src/gen/hooks/useFindPetsByStatusHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useFindPetsByStatusHook.ts @@ -49,12 +49,11 @@ export function findPetsByStatusQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatusHook< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], @@ -79,7 +78,6 @@ export function useFindPetsByStatusHook< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByStatusInfiniteQueryKey = (params?: FindPetsByStatus['queryParams']) => [{ url: '/pet/findByStatus' }, ...(params ? [params] : [])] as const export type FindPetsByStatusInfiniteQueryKey = ReturnType @@ -110,12 +108,11 @@ export function findPetsByStatusInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatusHookInfinite< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], @@ -140,7 +137,6 @@ export function useFindPetsByStatusHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByStatusSuspenseQueryKey = (params?: FindPetsByStatus['queryParams']) => [{ url: '/pet/findByStatus' }, ...(params ? [params] : [])] as const export type FindPetsByStatusSuspenseQueryKey = ReturnType @@ -164,12 +160,11 @@ export function findPetsByStatusSuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatusHookSuspense< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], diff --git a/examples/react-query-v5/src/gen/hooks/useFindPetsByTagsHook.ts b/examples/react-query-v5/src/gen/hooks/useFindPetsByTagsHook.ts index 79e6f2f01..900151b42 100644 --- a/examples/react-query-v5/src/gen/hooks/useFindPetsByTagsHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useFindPetsByTagsHook.ts @@ -49,12 +49,11 @@ export function findPetsByTagsQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTagsHook< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], @@ -79,7 +78,6 @@ export function useFindPetsByTagsHook< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByTagsInfiniteQueryKey = (params?: FindPetsByTags['queryParams']) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const export type FindPetsByTagsInfiniteQueryKey = ReturnType export function findPetsByTagsInfiniteQueryOptions< @@ -109,12 +107,11 @@ export function findPetsByTagsInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTagsHookInfinite< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], @@ -139,7 +136,6 @@ export function useFindPetsByTagsHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByTagsSuspenseQueryKey = (params?: FindPetsByTags['queryParams']) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const export type FindPetsByTagsSuspenseQueryKey = ReturnType export function findPetsByTagsSuspenseQueryOptions< @@ -162,12 +158,11 @@ export function findPetsByTagsSuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTagsHookSuspense< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], diff --git a/examples/react-query-v5/src/gen/hooks/useGetInventoryHook.ts b/examples/react-query-v5/src/gen/hooks/useGetInventoryHook.ts index ac678a701..621c20cc1 100644 --- a/examples/react-query-v5/src/gen/hooks/useGetInventoryHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useGetInventoryHook.ts @@ -45,12 +45,11 @@ export function getInventoryQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventoryHook< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], @@ -75,7 +74,6 @@ export function useGetInventoryHook< query.queryKey = queryKey as TQueryKey return query } - export const getInventoryInfiniteQueryKey = () => [{ url: '/store/inventory' }] as const export type GetInventoryInfiniteQueryKey = ReturnType export function getInventoryInfiniteQueryOptions< @@ -99,12 +97,11 @@ export function getInventoryInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventoryHookInfinite< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], @@ -129,7 +126,6 @@ export function useGetInventoryHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const getInventorySuspenseQueryKey = () => [{ url: '/store/inventory' }] as const export type GetInventorySuspenseQueryKey = ReturnType export function getInventorySuspenseQueryOptions< @@ -148,12 +144,11 @@ export function getInventorySuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventoryHookSuspense< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], diff --git a/examples/react-query-v5/src/gen/hooks/useGetOrderByIdHook.ts b/examples/react-query-v5/src/gen/hooks/useGetOrderByIdHook.ts index 39ac6818f..a8b92104a 100644 --- a/examples/react-query-v5/src/gen/hooks/useGetOrderByIdHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useGetOrderByIdHook.ts @@ -48,12 +48,11 @@ export function getOrderByIdQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderByIdHook< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], @@ -78,7 +77,6 @@ export function useGetOrderByIdHook< query.queryKey = queryKey as TQueryKey return query } - export const getOrderByIdInfiniteQueryKey = (orderId: GetOrderByIdPathParams['orderId']) => [{ url: '/store/order/:orderId', params: { orderId: orderId } }] as const export type GetOrderByIdInfiniteQueryKey = ReturnType @@ -104,12 +102,11 @@ export function getOrderByIdInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderByIdHookInfinite< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], @@ -134,7 +131,6 @@ export function useGetOrderByIdHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const getOrderByIdSuspenseQueryKey = (orderId: GetOrderByIdPathParams['orderId']) => [{ url: '/store/order/:orderId', params: { orderId: orderId } }] as const export type GetOrderByIdSuspenseQueryKey = ReturnType @@ -157,12 +153,11 @@ export function getOrderByIdSuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderByIdHookSuspense< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], diff --git a/examples/react-query-v5/src/gen/hooks/useGetPetByIdHook.ts b/examples/react-query-v5/src/gen/hooks/useGetPetByIdHook.ts index 52b2bfd74..e20faf16b 100644 --- a/examples/react-query-v5/src/gen/hooks/useGetPetByIdHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useGetPetByIdHook.ts @@ -48,12 +48,11 @@ export function getPetByIdQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetByIdHook< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], @@ -78,7 +77,6 @@ export function useGetPetByIdHook< query.queryKey = queryKey as TQueryKey return query } - export const getPetByIdInfiniteQueryKey = (petId: GetPetByIdPathParams['petId']) => [{ url: '/pet/:petId', params: { petId: petId } }] as const export type GetPetByIdInfiniteQueryKey = ReturnType export function getPetByIdInfiniteQueryOptions< @@ -103,12 +101,11 @@ export function getPetByIdInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetByIdHookInfinite< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], @@ -133,7 +130,6 @@ export function useGetPetByIdHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const getPetByIdSuspenseQueryKey = (petId: GetPetByIdPathParams['petId']) => [{ url: '/pet/:petId', params: { petId: petId } }] as const export type GetPetByIdSuspenseQueryKey = ReturnType export function getPetByIdSuspenseQueryOptions< @@ -155,12 +151,11 @@ export function getPetByIdSuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetByIdHookSuspense< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], diff --git a/examples/react-query-v5/src/gen/hooks/useGetUserByNameHook.ts b/examples/react-query-v5/src/gen/hooks/useGetUserByNameHook.ts index 3b093b989..37e8eeab5 100644 --- a/examples/react-query-v5/src/gen/hooks/useGetUserByNameHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useGetUserByNameHook.ts @@ -48,11 +48,10 @@ export function getUserByNameQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByNameHook< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], @@ -77,7 +76,6 @@ export function useGetUserByNameHook< query.queryKey = queryKey as TQueryKey return query } - export const getUserByNameInfiniteQueryKey = (username: GetUserByNamePathParams['username']) => [{ url: '/user/:username', params: { username: username } }] as const export type GetUserByNameInfiniteQueryKey = ReturnType @@ -103,11 +101,10 @@ export function getUserByNameInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByNameHookInfinite< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], @@ -132,7 +129,6 @@ export function useGetUserByNameHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const getUserByNameSuspenseQueryKey = (username: GetUserByNamePathParams['username']) => [{ url: '/user/:username', params: { username: username } }] as const export type GetUserByNameSuspenseQueryKey = ReturnType @@ -155,11 +151,10 @@ export function getUserByNameSuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByNameHookSuspense< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], diff --git a/examples/react-query-v5/src/gen/hooks/useLoginUserHook.ts b/examples/react-query-v5/src/gen/hooks/useLoginUserHook.ts index 0df272664..3fec3529b 100644 --- a/examples/react-query-v5/src/gen/hooks/useLoginUserHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useLoginUserHook.ts @@ -49,11 +49,10 @@ export function loginUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUserHook< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], @@ -78,7 +77,6 @@ export function useLoginUserHook< query.queryKey = queryKey as TQueryKey return query } - export const loginUserInfiniteQueryKey = (params?: LoginUser['queryParams']) => [{ url: '/user/login' }, ...(params ? [params] : [])] as const export type LoginUserInfiniteQueryKey = ReturnType export function loginUserInfiniteQueryOptions< @@ -108,11 +106,10 @@ export function loginUserInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUserHookInfinite< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], @@ -137,7 +134,6 @@ export function useLoginUserHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const loginUserSuspenseQueryKey = (params?: LoginUser['queryParams']) => [{ url: '/user/login' }, ...(params ? [params] : [])] as const export type LoginUserSuspenseQueryKey = ReturnType export function loginUserSuspenseQueryOptions< @@ -160,11 +156,10 @@ export function loginUserSuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUserHookSuspense< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], diff --git a/examples/react-query-v5/src/gen/hooks/useLogoutUserHook.ts b/examples/react-query-v5/src/gen/hooks/useLogoutUserHook.ts index 336aa5c6a..7e7fbb9e0 100644 --- a/examples/react-query-v5/src/gen/hooks/useLogoutUserHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useLogoutUserHook.ts @@ -45,11 +45,10 @@ export function logoutUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUserHook< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], @@ -74,7 +73,6 @@ export function useLogoutUserHook< query.queryKey = queryKey as TQueryKey return query } - export const logoutUserInfiniteQueryKey = () => [{ url: '/user/logout' }] as const export type LogoutUserInfiniteQueryKey = ReturnType export function logoutUserInfiniteQueryOptions< @@ -98,11 +96,10 @@ export function logoutUserInfiniteQueryOptions< initialPageParam: 0, getNextPageParam: (lastPage) => lastPage['id'], } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUserHookInfinite< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], @@ -127,7 +124,6 @@ export function useLogoutUserHookInfinite< query.queryKey = queryKey as TQueryKey return query } - export const logoutUserSuspenseQueryKey = () => [{ url: '/user/logout' }] as const export type LogoutUserSuspenseQueryKey = ReturnType export function logoutUserSuspenseQueryOptions< @@ -146,11 +142,10 @@ export function logoutUserSuspenseQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUserHookSuspense< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], diff --git a/examples/react-query-v5/src/gen/hooks/usePlaceOrderHook.ts b/examples/react-query-v5/src/gen/hooks/usePlaceOrderHook.ts index d158571ca..8faf37f9f 100644 --- a/examples/react-query-v5/src/gen/hooks/usePlaceOrderHook.ts +++ b/examples/react-query-v5/src/gen/hooks/usePlaceOrderHook.ts @@ -21,8 +21,7 @@ type PlaceOrder = { /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrderHook(options: { mutation?: UseMutationOptions client?: PlaceOrder['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/usePlaceOrderPatchHook.ts b/examples/react-query-v5/src/gen/hooks/usePlaceOrderPatchHook.ts index f37c96083..9c1f1a657 100644 --- a/examples/react-query-v5/src/gen/hooks/usePlaceOrderPatchHook.ts +++ b/examples/react-query-v5/src/gen/hooks/usePlaceOrderPatchHook.ts @@ -21,8 +21,7 @@ type PlaceOrderPatch = { /** * @description Place a new order in the store with patch * @summary Place an order for a pet with patch - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrderPatchHook(options: { mutation?: UseMutationOptions client?: PlaceOrderPatch['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useUpdatePetHook.ts b/examples/react-query-v5/src/gen/hooks/useUpdatePetHook.ts index e0056ccee..187b99e39 100644 --- a/examples/react-query-v5/src/gen/hooks/useUpdatePetHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useUpdatePetHook.ts @@ -21,8 +21,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePetHook(options: { mutation?: UseMutationOptions client?: UpdatePet['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useUpdatePetWithFormHook.ts b/examples/react-query-v5/src/gen/hooks/useUpdatePetWithFormHook.ts index 684d906fb..81c6b303b 100644 --- a/examples/react-query-v5/src/gen/hooks/useUpdatePetWithFormHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useUpdatePetWithFormHook.ts @@ -25,8 +25,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithFormHook( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithForm['queryParams'], diff --git a/examples/react-query-v5/src/gen/hooks/useUpdateUserHook.ts b/examples/react-query-v5/src/gen/hooks/useUpdateUserHook.ts index ac7ae2c12..8f8fa5453 100644 --- a/examples/react-query-v5/src/gen/hooks/useUpdateUserHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useUpdateUserHook.ts @@ -21,8 +21,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUserHook(username: UpdateUserPathParams['username'], options: { mutation?: UseMutationOptions client?: UpdateUser['client']['paramaters'] diff --git a/examples/react-query-v5/src/gen/hooks/useUploadFileHook.ts b/examples/react-query-v5/src/gen/hooks/useUploadFileHook.ts index 36f5c7231..41ab78781 100644 --- a/examples/react-query-v5/src/gen/hooks/useUploadFileHook.ts +++ b/examples/react-query-v5/src/gen/hooks/useUploadFileHook.ts @@ -20,8 +20,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFileHook( petId: UploadFilePathParams['petId'], params?: UploadFile['queryParams'], diff --git a/examples/react-query-v5/src/gen/models/AddPet.ts b/examples/react-query-v5/src/gen/models/AddPet.ts index 0c7911b45..c8349c827 100644 --- a/examples/react-query-v5/src/gen/models/AddPet.ts +++ b/examples/react-query-v5/src/gen/models/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/react-query-v5/src/gen/models/CreateUser.ts b/examples/react-query-v5/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/react-query-v5/src/gen/models/CreateUser.ts +++ b/examples/react-query-v5/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/react-query-v5/src/gen/models/CreateUsersWithListInput.ts b/examples/react-query-v5/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/react-query-v5/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/react-query-v5/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/react-query-v5/src/gen/models/DeleteOrder.ts b/examples/react-query-v5/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/react-query-v5/src/gen/models/DeleteOrder.ts +++ b/examples/react-query-v5/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/react-query-v5/src/gen/models/DeletePet.ts b/examples/react-query-v5/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/react-query-v5/src/gen/models/DeletePet.ts +++ b/examples/react-query-v5/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/react-query-v5/src/gen/models/DeleteUser.ts b/examples/react-query-v5/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/react-query-v5/src/gen/models/DeleteUser.ts +++ b/examples/react-query-v5/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/react-query-v5/src/gen/models/FindPetsByStatus.ts b/examples/react-query-v5/src/gen/models/FindPetsByStatus.ts index f84d6b225..ee89e038f 100644 --- a/examples/react-query-v5/src/gen/models/FindPetsByStatus.ts +++ b/examples/react-query-v5/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/react-query-v5/src/gen/models/FindPetsByTags.ts b/examples/react-query-v5/src/gen/models/FindPetsByTags.ts index 0f74ac3cb..135a247e5 100644 --- a/examples/react-query-v5/src/gen/models/FindPetsByTags.ts +++ b/examples/react-query-v5/src/gen/models/FindPetsByTags.ts @@ -27,7 +27,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/react-query-v5/src/gen/models/GetInventory.ts b/examples/react-query-v5/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/react-query-v5/src/gen/models/GetInventory.ts +++ b/examples/react-query-v5/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/react-query-v5/src/gen/models/GetOrderById.ts b/examples/react-query-v5/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/react-query-v5/src/gen/models/GetOrderById.ts +++ b/examples/react-query-v5/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/react-query-v5/src/gen/models/GetPetById.ts b/examples/react-query-v5/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/react-query-v5/src/gen/models/GetPetById.ts +++ b/examples/react-query-v5/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/react-query-v5/src/gen/models/GetUserByName.ts b/examples/react-query-v5/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/react-query-v5/src/gen/models/GetUserByName.ts +++ b/examples/react-query-v5/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/react-query-v5/src/gen/models/LoginUser.ts b/examples/react-query-v5/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/react-query-v5/src/gen/models/LoginUser.ts +++ b/examples/react-query-v5/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/react-query-v5/src/gen/models/LogoutUser.ts b/examples/react-query-v5/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/react-query-v5/src/gen/models/LogoutUser.ts +++ b/examples/react-query-v5/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/react-query-v5/src/gen/models/PlaceOrder.ts b/examples/react-query-v5/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/react-query-v5/src/gen/models/PlaceOrder.ts +++ b/examples/react-query-v5/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/react-query-v5/src/gen/models/PlaceOrderPatch.ts b/examples/react-query-v5/src/gen/models/PlaceOrderPatch.ts index 12340d275..b6a277f61 100644 --- a/examples/react-query-v5/src/gen/models/PlaceOrderPatch.ts +++ b/examples/react-query-v5/src/gen/models/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/react-query-v5/src/gen/models/UpdatePet.ts b/examples/react-query-v5/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/react-query-v5/src/gen/models/UpdatePet.ts +++ b/examples/react-query-v5/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/react-query-v5/src/gen/models/UpdatePetWithForm.ts b/examples/react-query-v5/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/react-query-v5/src/gen/models/UpdatePetWithForm.ts +++ b/examples/react-query-v5/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/react-query-v5/src/gen/models/UpdateUser.ts b/examples/react-query-v5/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/react-query-v5/src/gen/models/UpdateUser.ts +++ b/examples/react-query-v5/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/react-query-v5/src/gen/models/UploadFile.ts b/examples/react-query-v5/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/react-query-v5/src/gen/models/UploadFile.ts +++ b/examples/react-query-v5/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/react-query/src/gen/hooks/useAddPetHook.ts b/examples/react-query/src/gen/hooks/useAddPetHook.ts index f7f02f435..4c943d301 100644 --- a/examples/react-query/src/gen/hooks/useAddPetHook.ts +++ b/examples/react-query/src/gen/hooks/useAddPetHook.ts @@ -21,8 +21,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPetHook(options: { mutation?: UseMutationOptions client?: AddPet['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useCreateUserHook.ts b/examples/react-query/src/gen/hooks/useCreateUserHook.ts index 5155af054..cfad4c83b 100644 --- a/examples/react-query/src/gen/hooks/useCreateUserHook.ts +++ b/examples/react-query/src/gen/hooks/useCreateUserHook.ts @@ -21,8 +21,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUserHook(options: { mutation?: UseMutationOptions client?: CreateUser['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useCreateUsersWithListInputHook.ts b/examples/react-query/src/gen/hooks/useCreateUsersWithListInputHook.ts index e80ed6b25..d853fdd6e 100644 --- a/examples/react-query/src/gen/hooks/useCreateUsersWithListInputHook.ts +++ b/examples/react-query/src/gen/hooks/useCreateUsersWithListInputHook.ts @@ -29,8 +29,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInputHook(options: { mutation?: UseMutationOptions client?: CreateUsersWithListInput['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useDeleteOrderHook.ts b/examples/react-query/src/gen/hooks/useDeleteOrderHook.ts index 0229928c7..e23f8b576 100644 --- a/examples/react-query/src/gen/hooks/useDeleteOrderHook.ts +++ b/examples/react-query/src/gen/hooks/useDeleteOrderHook.ts @@ -21,8 +21,7 @@ type DeleteOrder = { /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function useDeleteOrderHook(orderId: DeleteOrderPathParams['orderId'], options: { mutation?: UseMutationOptions client?: DeleteOrder['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useDeletePetHook.ts b/examples/react-query/src/gen/hooks/useDeletePetHook.ts index 9b9288c71..e7b8fa230 100644 --- a/examples/react-query/src/gen/hooks/useDeletePetHook.ts +++ b/examples/react-query/src/gen/hooks/useDeletePetHook.ts @@ -21,8 +21,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePetHook( petId: DeletePetPathParams['petId'], headers?: DeletePet['headerParams'], diff --git a/examples/react-query/src/gen/hooks/useDeleteUserHook.ts b/examples/react-query/src/gen/hooks/useDeleteUserHook.ts index 9aa676faa..4e8506c93 100644 --- a/examples/react-query/src/gen/hooks/useDeleteUserHook.ts +++ b/examples/react-query/src/gen/hooks/useDeleteUserHook.ts @@ -21,8 +21,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUserHook(username: DeleteUserPathParams['username'], options: { mutation?: UseMutationOptions client?: DeleteUser['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useFindPetsByStatusHook.ts b/examples/react-query/src/gen/hooks/useFindPetsByStatusHook.ts index baac55138..b940e1ab6 100644 --- a/examples/react-query/src/gen/hooks/useFindPetsByStatusHook.ts +++ b/examples/react-query/src/gen/hooks/useFindPetsByStatusHook.ts @@ -41,12 +41,11 @@ export function findPetsByStatusQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatusHook< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], @@ -71,7 +70,6 @@ export function useFindPetsByStatusHook< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByStatusInfiniteQueryKey = (params?: FindPetsByStatus['queryParams']) => [{ url: '/pet/findByStatus' }, ...(params ? [params] : [])] as const export type FindPetsByStatusInfiniteQueryKey = ReturnType @@ -100,12 +98,11 @@ export function findPetsByStatusInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatusHookInfinite< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], diff --git a/examples/react-query/src/gen/hooks/useFindPetsByTagsHook.ts b/examples/react-query/src/gen/hooks/useFindPetsByTagsHook.ts index 275eac10b..f456ab27b 100644 --- a/examples/react-query/src/gen/hooks/useFindPetsByTagsHook.ts +++ b/examples/react-query/src/gen/hooks/useFindPetsByTagsHook.ts @@ -41,12 +41,11 @@ export function findPetsByTagsQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTagsHook< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], @@ -71,7 +70,6 @@ export function useFindPetsByTagsHook< query.queryKey = queryKey as TQueryKey return query } - export const findPetsByTagsInfiniteQueryKey = (params?: FindPetsByTags['queryParams']) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const export type FindPetsByTagsInfiniteQueryKey = ReturnType export function findPetsByTagsInfiniteQueryOptions< @@ -99,12 +97,11 @@ export function findPetsByTagsInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTagsHookInfinite< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], diff --git a/examples/react-query/src/gen/hooks/useGetInventoryHook.ts b/examples/react-query/src/gen/hooks/useGetInventoryHook.ts index a1d281e8d..7a45a28cb 100644 --- a/examples/react-query/src/gen/hooks/useGetInventoryHook.ts +++ b/examples/react-query/src/gen/hooks/useGetInventoryHook.ts @@ -37,12 +37,11 @@ export function getInventoryQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventoryHook< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], @@ -67,7 +66,6 @@ export function useGetInventoryHook< query.queryKey = queryKey as TQueryKey return query } - export const getInventoryInfiniteQueryKey = () => [{ url: '/store/inventory' }] as const export type GetInventoryInfiniteQueryKey = ReturnType export function getInventoryInfiniteQueryOptions< @@ -89,12 +87,11 @@ export function getInventoryInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventoryHookInfinite< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], diff --git a/examples/react-query/src/gen/hooks/useGetOrderByIdHook.ts b/examples/react-query/src/gen/hooks/useGetOrderByIdHook.ts index ec98a6d11..baaaf618c 100644 --- a/examples/react-query/src/gen/hooks/useGetOrderByIdHook.ts +++ b/examples/react-query/src/gen/hooks/useGetOrderByIdHook.ts @@ -40,12 +40,11 @@ export function getOrderByIdQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderByIdHook< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], @@ -70,7 +69,6 @@ export function useGetOrderByIdHook< query.queryKey = queryKey as TQueryKey return query } - export const getOrderByIdInfiniteQueryKey = (orderId: GetOrderByIdPathParams['orderId']) => [{ url: '/store/order/:orderId', params: { orderId: orderId } }] as const export type GetOrderByIdInfiniteQueryKey = ReturnType @@ -94,12 +92,11 @@ export function getOrderByIdInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderByIdHookInfinite< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], diff --git a/examples/react-query/src/gen/hooks/useGetPetByIdHook.ts b/examples/react-query/src/gen/hooks/useGetPetByIdHook.ts index 4c8ed8743..a95a1ca00 100644 --- a/examples/react-query/src/gen/hooks/useGetPetByIdHook.ts +++ b/examples/react-query/src/gen/hooks/useGetPetByIdHook.ts @@ -40,12 +40,11 @@ export function getPetByIdQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetByIdHook< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], @@ -70,7 +69,6 @@ export function useGetPetByIdHook< query.queryKey = queryKey as TQueryKey return query } - export const getPetByIdInfiniteQueryKey = (petId: GetPetByIdPathParams['petId']) => [{ url: '/pet/:petId', params: { petId: petId } }] as const export type GetPetByIdInfiniteQueryKey = ReturnType export function getPetByIdInfiniteQueryOptions< @@ -93,12 +91,11 @@ export function getPetByIdInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetByIdHookInfinite< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], diff --git a/examples/react-query/src/gen/hooks/useGetUserByNameHook.ts b/examples/react-query/src/gen/hooks/useGetUserByNameHook.ts index 0bef4776f..a29a9dcfc 100644 --- a/examples/react-query/src/gen/hooks/useGetUserByNameHook.ts +++ b/examples/react-query/src/gen/hooks/useGetUserByNameHook.ts @@ -40,11 +40,10 @@ export function getUserByNameQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByNameHook< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], @@ -69,7 +68,6 @@ export function useGetUserByNameHook< query.queryKey = queryKey as TQueryKey return query } - export const getUserByNameInfiniteQueryKey = (username: GetUserByNamePathParams['username']) => [{ url: '/user/:username', params: { username: username } }] as const export type GetUserByNameInfiniteQueryKey = ReturnType @@ -93,11 +91,10 @@ export function getUserByNameInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByNameHookInfinite< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], diff --git a/examples/react-query/src/gen/hooks/useLoginUserHook.ts b/examples/react-query/src/gen/hooks/useLoginUserHook.ts index a86669ee6..d4a4ad520 100644 --- a/examples/react-query/src/gen/hooks/useLoginUserHook.ts +++ b/examples/react-query/src/gen/hooks/useLoginUserHook.ts @@ -41,11 +41,10 @@ export function loginUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUserHook< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], @@ -70,7 +69,6 @@ export function useLoginUserHook< query.queryKey = queryKey as TQueryKey return query } - export const loginUserInfiniteQueryKey = (params?: LoginUser['queryParams']) => [{ url: '/user/login' }, ...(params ? [params] : [])] as const export type LoginUserInfiniteQueryKey = ReturnType export function loginUserInfiniteQueryOptions< @@ -98,11 +96,10 @@ export function loginUserInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUserHookInfinite< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], diff --git a/examples/react-query/src/gen/hooks/useLogoutUserHook.ts b/examples/react-query/src/gen/hooks/useLogoutUserHook.ts index 4a02af175..03de11deb 100644 --- a/examples/react-query/src/gen/hooks/useLogoutUserHook.ts +++ b/examples/react-query/src/gen/hooks/useLogoutUserHook.ts @@ -37,11 +37,10 @@ export function logoutUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUserHook< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], @@ -66,7 +65,6 @@ export function useLogoutUserHook< query.queryKey = queryKey as TQueryKey return query } - export const logoutUserInfiniteQueryKey = () => [{ url: '/user/logout' }] as const export type LogoutUserInfiniteQueryKey = ReturnType export function logoutUserInfiniteQueryOptions< @@ -88,11 +86,10 @@ export function logoutUserInfiniteQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUserHookInfinite< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], diff --git a/examples/react-query/src/gen/hooks/usePlaceOrderHook.ts b/examples/react-query/src/gen/hooks/usePlaceOrderHook.ts index d158571ca..8faf37f9f 100644 --- a/examples/react-query/src/gen/hooks/usePlaceOrderHook.ts +++ b/examples/react-query/src/gen/hooks/usePlaceOrderHook.ts @@ -21,8 +21,7 @@ type PlaceOrder = { /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrderHook(options: { mutation?: UseMutationOptions client?: PlaceOrder['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/usePlaceOrderPatchHook.ts b/examples/react-query/src/gen/hooks/usePlaceOrderPatchHook.ts index f37c96083..9c1f1a657 100644 --- a/examples/react-query/src/gen/hooks/usePlaceOrderPatchHook.ts +++ b/examples/react-query/src/gen/hooks/usePlaceOrderPatchHook.ts @@ -21,8 +21,7 @@ type PlaceOrderPatch = { /** * @description Place a new order in the store with patch * @summary Place an order for a pet with patch - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrderPatchHook(options: { mutation?: UseMutationOptions client?: PlaceOrderPatch['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useUpdatePetHook.ts b/examples/react-query/src/gen/hooks/useUpdatePetHook.ts index e0056ccee..187b99e39 100644 --- a/examples/react-query/src/gen/hooks/useUpdatePetHook.ts +++ b/examples/react-query/src/gen/hooks/useUpdatePetHook.ts @@ -21,8 +21,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePetHook(options: { mutation?: UseMutationOptions client?: UpdatePet['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useUpdatePetWithFormHook.ts b/examples/react-query/src/gen/hooks/useUpdatePetWithFormHook.ts index 684d906fb..81c6b303b 100644 --- a/examples/react-query/src/gen/hooks/useUpdatePetWithFormHook.ts +++ b/examples/react-query/src/gen/hooks/useUpdatePetWithFormHook.ts @@ -25,8 +25,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithFormHook( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithForm['queryParams'], diff --git a/examples/react-query/src/gen/hooks/useUpdateUserHook.ts b/examples/react-query/src/gen/hooks/useUpdateUserHook.ts index ac7ae2c12..8f8fa5453 100644 --- a/examples/react-query/src/gen/hooks/useUpdateUserHook.ts +++ b/examples/react-query/src/gen/hooks/useUpdateUserHook.ts @@ -21,8 +21,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUserHook(username: UpdateUserPathParams['username'], options: { mutation?: UseMutationOptions client?: UpdateUser['client']['paramaters'] diff --git a/examples/react-query/src/gen/hooks/useUploadFileHook.ts b/examples/react-query/src/gen/hooks/useUploadFileHook.ts index 36f5c7231..41ab78781 100644 --- a/examples/react-query/src/gen/hooks/useUploadFileHook.ts +++ b/examples/react-query/src/gen/hooks/useUploadFileHook.ts @@ -20,8 +20,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFileHook( petId: UploadFilePathParams['petId'], params?: UploadFile['queryParams'], diff --git a/examples/react-query/src/gen/models/AddPet.ts b/examples/react-query/src/gen/models/AddPet.ts index 0c7911b45..c8349c827 100644 --- a/examples/react-query/src/gen/models/AddPet.ts +++ b/examples/react-query/src/gen/models/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/react-query/src/gen/models/CreateUser.ts b/examples/react-query/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/react-query/src/gen/models/CreateUser.ts +++ b/examples/react-query/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/react-query/src/gen/models/CreateUsersWithListInput.ts b/examples/react-query/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/react-query/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/react-query/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/react-query/src/gen/models/DeleteOrder.ts b/examples/react-query/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/react-query/src/gen/models/DeleteOrder.ts +++ b/examples/react-query/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/react-query/src/gen/models/DeletePet.ts b/examples/react-query/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/react-query/src/gen/models/DeletePet.ts +++ b/examples/react-query/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/react-query/src/gen/models/DeleteUser.ts b/examples/react-query/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/react-query/src/gen/models/DeleteUser.ts +++ b/examples/react-query/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/react-query/src/gen/models/FindPetsByStatus.ts b/examples/react-query/src/gen/models/FindPetsByStatus.ts index f84d6b225..ee89e038f 100644 --- a/examples/react-query/src/gen/models/FindPetsByStatus.ts +++ b/examples/react-query/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/react-query/src/gen/models/FindPetsByTags.ts b/examples/react-query/src/gen/models/FindPetsByTags.ts index 0f74ac3cb..135a247e5 100644 --- a/examples/react-query/src/gen/models/FindPetsByTags.ts +++ b/examples/react-query/src/gen/models/FindPetsByTags.ts @@ -27,7 +27,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/react-query/src/gen/models/GetInventory.ts b/examples/react-query/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/react-query/src/gen/models/GetInventory.ts +++ b/examples/react-query/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/react-query/src/gen/models/GetOrderById.ts b/examples/react-query/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/react-query/src/gen/models/GetOrderById.ts +++ b/examples/react-query/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/react-query/src/gen/models/GetPetById.ts b/examples/react-query/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/react-query/src/gen/models/GetPetById.ts +++ b/examples/react-query/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/react-query/src/gen/models/GetUserByName.ts b/examples/react-query/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/react-query/src/gen/models/GetUserByName.ts +++ b/examples/react-query/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/react-query/src/gen/models/LoginUser.ts b/examples/react-query/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/react-query/src/gen/models/LoginUser.ts +++ b/examples/react-query/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/react-query/src/gen/models/LogoutUser.ts b/examples/react-query/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/react-query/src/gen/models/LogoutUser.ts +++ b/examples/react-query/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/react-query/src/gen/models/PlaceOrder.ts b/examples/react-query/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/react-query/src/gen/models/PlaceOrder.ts +++ b/examples/react-query/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/react-query/src/gen/models/PlaceOrderPatch.ts b/examples/react-query/src/gen/models/PlaceOrderPatch.ts index 12340d275..b6a277f61 100644 --- a/examples/react-query/src/gen/models/PlaceOrderPatch.ts +++ b/examples/react-query/src/gen/models/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/react-query/src/gen/models/UpdatePet.ts b/examples/react-query/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/react-query/src/gen/models/UpdatePet.ts +++ b/examples/react-query/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/react-query/src/gen/models/UpdatePetWithForm.ts b/examples/react-query/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/react-query/src/gen/models/UpdatePetWithForm.ts +++ b/examples/react-query/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/react-query/src/gen/models/UpdateUser.ts b/examples/react-query/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/react-query/src/gen/models/UpdateUser.ts +++ b/examples/react-query/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/react-query/src/gen/models/UploadFile.ts b/examples/react-query/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/react-query/src/gen/models/UploadFile.ts +++ b/examples/react-query/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/simple-single/src/gen/hooks.ts b/examples/simple-single/src/gen/hooks.ts index 267e748ce..593d0b821 100644 --- a/examples/simple-single/src/gen/hooks.ts +++ b/examples/simple-single/src/gen/hooks.ts @@ -90,8 +90,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePet(options: { mutation?: UseMutationOptions client?: UpdatePet['client']['paramaters'] @@ -128,8 +127,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPet(options: { mutation?: UseMutationOptions client?: AddPet['client']['paramaters'] @@ -186,12 +184,11 @@ export function findPetsByStatusQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatus< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], @@ -255,12 +252,11 @@ export function findPetsByTagsQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTags< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], @@ -323,12 +319,11 @@ export function getPetByIdQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetById< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], @@ -371,8 +366,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithForm( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithForm['queryParams'], @@ -413,8 +407,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePet( petId: DeletePetPathParams['petId'], headers?: DeletePet['headerParams'], @@ -454,8 +447,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFile( petId: UploadFilePathParams['petId'], params?: UploadFile['queryParams'], @@ -513,12 +505,11 @@ export function getInventoryQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventory< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], @@ -562,8 +553,7 @@ type PlaceOrder = { /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrder(options: { mutation?: UseMutationOptions client?: PlaceOrder['client']['paramaters'] @@ -600,8 +590,7 @@ type PlaceOrderPatch = { /** * @description Place a new order in the store with patch * @summary Place an order for a pet with patch - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrderPatch(options: { mutation?: UseMutationOptions client?: PlaceOrderPatch['client']['paramaters'] @@ -657,12 +646,11 @@ export function getOrderByIdQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderById< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], @@ -706,8 +694,7 @@ type DeleteOrder = { /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function useDeleteOrder(orderId: DeleteOrderPathParams['orderId'], options: { mutation?: UseMutationOptions client?: DeleteOrder['client']['paramaters'] @@ -743,8 +730,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUser(options: { mutation?: UseMutationOptions client?: CreateUser['client']['paramaters'] @@ -785,8 +771,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInput(options: { mutation?: UseMutationOptions client?: CreateUsersWithListInput['client']['paramaters'] @@ -843,11 +828,10 @@ export function loginUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUser< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], @@ -907,11 +891,10 @@ export function logoutUserQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUser< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], @@ -974,11 +957,10 @@ export function getUserByNameQueryOptions< }).then(res => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByName< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], @@ -1022,8 +1004,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUser(username: UpdateUserPathParams['username'], options: { mutation?: UseMutationOptions client?: UpdateUser['client']['paramaters'] @@ -1060,8 +1041,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUser(username: DeleteUserPathParams['username'], options: { mutation?: UseMutationOptions client?: DeleteUser['client']['paramaters'] diff --git a/examples/simple-single/src/gen/models.ts b/examples/simple-single/src/gen/models.ts index 2d8609af4..7153fdeae 100644 --- a/examples/simple-single/src/gen/models.ts +++ b/examples/simple-single/src/gen/models.ts @@ -274,7 +274,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest @@ -301,7 +300,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest @@ -332,7 +330,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams @@ -366,7 +363,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams @@ -395,7 +391,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams @@ -429,7 +424,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams @@ -458,7 +452,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams @@ -488,7 +481,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest @@ -502,7 +494,6 @@ export namespace UploadFileMutation { export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } @@ -518,7 +509,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest @@ -536,7 +526,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest @@ -565,7 +554,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams @@ -591,7 +579,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams @@ -609,7 +596,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest @@ -627,7 +613,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest @@ -656,7 +641,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams @@ -669,7 +653,6 @@ export namespace LoginUserQuery { export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError @@ -697,7 +680,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams @@ -723,7 +705,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest @@ -750,7 +731,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/solid-query/src/gen/hooks/addPetQuery.ts b/examples/solid-query/src/gen/hooks/addPetQuery.ts index f42ecb6f8..f7e901aea 100644 --- a/examples/solid-query/src/gen/hooks/addPetQuery.ts +++ b/examples/solid-query/src/gen/hooks/addPetQuery.ts @@ -21,8 +21,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function addPetQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/solid-query/src/gen/hooks/createUserQuery.ts b/examples/solid-query/src/gen/hooks/createUserQuery.ts index 461a4ce6f..04aad26df 100644 --- a/examples/solid-query/src/gen/hooks/createUserQuery.ts +++ b/examples/solid-query/src/gen/hooks/createUserQuery.ts @@ -21,8 +21,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function createUserQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/solid-query/src/gen/hooks/createUsersWithListInputQuery.ts b/examples/solid-query/src/gen/hooks/createUsersWithListInputQuery.ts index d02f0cf3b..968f888c3 100644 --- a/examples/solid-query/src/gen/hooks/createUsersWithListInputQuery.ts +++ b/examples/solid-query/src/gen/hooks/createUsersWithListInputQuery.ts @@ -29,8 +29,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function createUsersWithListInputQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/solid-query/src/gen/hooks/deleteOrderQuery.ts b/examples/solid-query/src/gen/hooks/deleteOrderQuery.ts index 5a8c50f64..3daa373ad 100644 --- a/examples/solid-query/src/gen/hooks/deleteOrderQuery.ts +++ b/examples/solid-query/src/gen/hooks/deleteOrderQuery.ts @@ -21,8 +21,7 @@ type DeleteOrder = { /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function deleteOrderQuery( orderId: DeleteOrderPathParams['orderId'], options: { diff --git a/examples/solid-query/src/gen/hooks/deletePetQuery.ts b/examples/solid-query/src/gen/hooks/deletePetQuery.ts index 76ebbc712..515ce6c7f 100644 --- a/examples/solid-query/src/gen/hooks/deletePetQuery.ts +++ b/examples/solid-query/src/gen/hooks/deletePetQuery.ts @@ -21,8 +21,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function deletePetQuery( petId: DeletePetPathParams['petId'], headers?: DeletePet['headerParams'], diff --git a/examples/solid-query/src/gen/hooks/deleteUserQuery.ts b/examples/solid-query/src/gen/hooks/deleteUserQuery.ts index 033d2a27e..e88a0d7f3 100644 --- a/examples/solid-query/src/gen/hooks/deleteUserQuery.ts +++ b/examples/solid-query/src/gen/hooks/deleteUserQuery.ts @@ -21,8 +21,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function deleteUserQuery( username: DeleteUserPathParams['username'], options: { diff --git a/examples/solid-query/src/gen/hooks/findPetsByStatusQuery.ts b/examples/solid-query/src/gen/hooks/findPetsByStatusQuery.ts index 000298606..f9d239804 100644 --- a/examples/solid-query/src/gen/hooks/findPetsByStatusQuery.ts +++ b/examples/solid-query/src/gen/hooks/findPetsByStatusQuery.ts @@ -41,12 +41,11 @@ export function findPetsByStatusQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function findPetsByStatusQuery< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], diff --git a/examples/solid-query/src/gen/hooks/findPetsByTagsQuery.ts b/examples/solid-query/src/gen/hooks/findPetsByTagsQuery.ts index 3fd4c05d0..ab411bfcf 100644 --- a/examples/solid-query/src/gen/hooks/findPetsByTagsQuery.ts +++ b/examples/solid-query/src/gen/hooks/findPetsByTagsQuery.ts @@ -41,12 +41,11 @@ export function findPetsByTagsQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function findPetsByTagsQuery< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], diff --git a/examples/solid-query/src/gen/hooks/getInventoryQuery.ts b/examples/solid-query/src/gen/hooks/getInventoryQuery.ts index ffc811a0c..43ad77650 100644 --- a/examples/solid-query/src/gen/hooks/getInventoryQuery.ts +++ b/examples/solid-query/src/gen/hooks/getInventoryQuery.ts @@ -37,12 +37,11 @@ export function getInventoryQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function getInventoryQuery< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], diff --git a/examples/solid-query/src/gen/hooks/getOrderByIdQuery.ts b/examples/solid-query/src/gen/hooks/getOrderByIdQuery.ts index 29f0321c4..a1ad1c2e5 100644 --- a/examples/solid-query/src/gen/hooks/getOrderByIdQuery.ts +++ b/examples/solid-query/src/gen/hooks/getOrderByIdQuery.ts @@ -40,12 +40,11 @@ export function getOrderByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function getOrderByIdQuery< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], diff --git a/examples/solid-query/src/gen/hooks/getPetByIdQuery.ts b/examples/solid-query/src/gen/hooks/getPetByIdQuery.ts index eb6a21e1c..93085683e 100644 --- a/examples/solid-query/src/gen/hooks/getPetByIdQuery.ts +++ b/examples/solid-query/src/gen/hooks/getPetByIdQuery.ts @@ -40,12 +40,11 @@ export function getPetByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function getPetByIdQuery< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], diff --git a/examples/solid-query/src/gen/hooks/getUserByNameQuery.ts b/examples/solid-query/src/gen/hooks/getUserByNameQuery.ts index 95d8ecc2e..a531c6031 100644 --- a/examples/solid-query/src/gen/hooks/getUserByNameQuery.ts +++ b/examples/solid-query/src/gen/hooks/getUserByNameQuery.ts @@ -40,11 +40,10 @@ export function getUserByNameQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function getUserByNameQuery< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], diff --git a/examples/solid-query/src/gen/hooks/loginUserQuery.ts b/examples/solid-query/src/gen/hooks/loginUserQuery.ts index 13f12a43a..03087bb11 100644 --- a/examples/solid-query/src/gen/hooks/loginUserQuery.ts +++ b/examples/solid-query/src/gen/hooks/loginUserQuery.ts @@ -41,11 +41,10 @@ export function loginUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function loginUserQuery< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], diff --git a/examples/solid-query/src/gen/hooks/logoutUserQuery.ts b/examples/solid-query/src/gen/hooks/logoutUserQuery.ts index 9ad011f76..2f2529b88 100644 --- a/examples/solid-query/src/gen/hooks/logoutUserQuery.ts +++ b/examples/solid-query/src/gen/hooks/logoutUserQuery.ts @@ -37,11 +37,10 @@ export function logoutUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function logoutUserQuery< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], diff --git a/examples/solid-query/src/gen/hooks/placeOrderPatchQuery.ts b/examples/solid-query/src/gen/hooks/placeOrderPatchQuery.ts index 0944d81fe..42aaa1081 100644 --- a/examples/solid-query/src/gen/hooks/placeOrderPatchQuery.ts +++ b/examples/solid-query/src/gen/hooks/placeOrderPatchQuery.ts @@ -21,8 +21,7 @@ type PlaceOrderPatch = { /** * @description Place a new order in the store with patch * @summary Place an order for a pet with patch - * @link /store/order - */ + * @link /store/order */ export function placeOrderPatchQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/solid-query/src/gen/hooks/placeOrderQuery.ts b/examples/solid-query/src/gen/hooks/placeOrderQuery.ts index 9b32615e9..2bdcb633f 100644 --- a/examples/solid-query/src/gen/hooks/placeOrderQuery.ts +++ b/examples/solid-query/src/gen/hooks/placeOrderQuery.ts @@ -21,8 +21,7 @@ type PlaceOrder = { /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function placeOrderQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/solid-query/src/gen/hooks/updatePetQuery.ts b/examples/solid-query/src/gen/hooks/updatePetQuery.ts index 092cc699e..deb37f188 100644 --- a/examples/solid-query/src/gen/hooks/updatePetQuery.ts +++ b/examples/solid-query/src/gen/hooks/updatePetQuery.ts @@ -21,8 +21,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function updatePetQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/solid-query/src/gen/hooks/updatePetWithFormQuery.ts b/examples/solid-query/src/gen/hooks/updatePetWithFormQuery.ts index a335db9d2..f69e141ef 100644 --- a/examples/solid-query/src/gen/hooks/updatePetWithFormQuery.ts +++ b/examples/solid-query/src/gen/hooks/updatePetWithFormQuery.ts @@ -25,8 +25,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function updatePetWithFormQuery( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithForm['queryParams'], diff --git a/examples/solid-query/src/gen/hooks/updateUserQuery.ts b/examples/solid-query/src/gen/hooks/updateUserQuery.ts index 3fa32f94e..42a726ffd 100644 --- a/examples/solid-query/src/gen/hooks/updateUserQuery.ts +++ b/examples/solid-query/src/gen/hooks/updateUserQuery.ts @@ -21,8 +21,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function updateUserQuery( username: UpdateUserPathParams['username'], options: { diff --git a/examples/solid-query/src/gen/hooks/uploadFileQuery.ts b/examples/solid-query/src/gen/hooks/uploadFileQuery.ts index 1f8b05828..bd20ff7d6 100644 --- a/examples/solid-query/src/gen/hooks/uploadFileQuery.ts +++ b/examples/solid-query/src/gen/hooks/uploadFileQuery.ts @@ -20,8 +20,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function uploadFileQuery( petId: UploadFilePathParams['petId'], params?: UploadFile['queryParams'], diff --git a/examples/solid-query/src/gen/models/AddPet.ts b/examples/solid-query/src/gen/models/AddPet.ts index 0c7911b45..c8349c827 100644 --- a/examples/solid-query/src/gen/models/AddPet.ts +++ b/examples/solid-query/src/gen/models/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/solid-query/src/gen/models/CreateUser.ts b/examples/solid-query/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/solid-query/src/gen/models/CreateUser.ts +++ b/examples/solid-query/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/solid-query/src/gen/models/CreateUsersWithListInput.ts b/examples/solid-query/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/solid-query/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/solid-query/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/solid-query/src/gen/models/DeleteOrder.ts b/examples/solid-query/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/solid-query/src/gen/models/DeleteOrder.ts +++ b/examples/solid-query/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/solid-query/src/gen/models/DeletePet.ts b/examples/solid-query/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/solid-query/src/gen/models/DeletePet.ts +++ b/examples/solid-query/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/solid-query/src/gen/models/DeleteUser.ts b/examples/solid-query/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/solid-query/src/gen/models/DeleteUser.ts +++ b/examples/solid-query/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/solid-query/src/gen/models/FindPetsByStatus.ts b/examples/solid-query/src/gen/models/FindPetsByStatus.ts index b0fe4373d..a1659b564 100644 --- a/examples/solid-query/src/gen/models/FindPetsByStatus.ts +++ b/examples/solid-query/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/solid-query/src/gen/models/FindPetsByTags.ts b/examples/solid-query/src/gen/models/FindPetsByTags.ts index 0f74ac3cb..135a247e5 100644 --- a/examples/solid-query/src/gen/models/FindPetsByTags.ts +++ b/examples/solid-query/src/gen/models/FindPetsByTags.ts @@ -27,7 +27,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/solid-query/src/gen/models/GetInventory.ts b/examples/solid-query/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/solid-query/src/gen/models/GetInventory.ts +++ b/examples/solid-query/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/solid-query/src/gen/models/GetOrderById.ts b/examples/solid-query/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/solid-query/src/gen/models/GetOrderById.ts +++ b/examples/solid-query/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/solid-query/src/gen/models/GetPetById.ts b/examples/solid-query/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/solid-query/src/gen/models/GetPetById.ts +++ b/examples/solid-query/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/solid-query/src/gen/models/GetUserByName.ts b/examples/solid-query/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/solid-query/src/gen/models/GetUserByName.ts +++ b/examples/solid-query/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/solid-query/src/gen/models/LoginUser.ts b/examples/solid-query/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/solid-query/src/gen/models/LoginUser.ts +++ b/examples/solid-query/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/solid-query/src/gen/models/LogoutUser.ts b/examples/solid-query/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/solid-query/src/gen/models/LogoutUser.ts +++ b/examples/solid-query/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/solid-query/src/gen/models/PlaceOrder.ts b/examples/solid-query/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/solid-query/src/gen/models/PlaceOrder.ts +++ b/examples/solid-query/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/solid-query/src/gen/models/PlaceOrderPatch.ts b/examples/solid-query/src/gen/models/PlaceOrderPatch.ts index 12340d275..b6a277f61 100644 --- a/examples/solid-query/src/gen/models/PlaceOrderPatch.ts +++ b/examples/solid-query/src/gen/models/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/solid-query/src/gen/models/UpdatePet.ts b/examples/solid-query/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/solid-query/src/gen/models/UpdatePet.ts +++ b/examples/solid-query/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/solid-query/src/gen/models/UpdatePetWithForm.ts b/examples/solid-query/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/solid-query/src/gen/models/UpdatePetWithForm.ts +++ b/examples/solid-query/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/solid-query/src/gen/models/UpdateUser.ts b/examples/solid-query/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/solid-query/src/gen/models/UpdateUser.ts +++ b/examples/solid-query/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/solid-query/src/gen/models/UploadFile.ts b/examples/solid-query/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/solid-query/src/gen/models/UploadFile.ts +++ b/examples/solid-query/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/svelte-query/src/gen/hooks/addPetQuery.ts b/examples/svelte-query/src/gen/hooks/addPetQuery.ts index 34c3ba7df..aea1aac71 100644 --- a/examples/svelte-query/src/gen/hooks/addPetQuery.ts +++ b/examples/svelte-query/src/gen/hooks/addPetQuery.ts @@ -21,8 +21,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function addPetQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/svelte-query/src/gen/hooks/createUserQuery.ts b/examples/svelte-query/src/gen/hooks/createUserQuery.ts index 96f9e623e..49ef752ce 100644 --- a/examples/svelte-query/src/gen/hooks/createUserQuery.ts +++ b/examples/svelte-query/src/gen/hooks/createUserQuery.ts @@ -21,8 +21,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function createUserQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/svelte-query/src/gen/hooks/createUsersWithListInputQuery.ts b/examples/svelte-query/src/gen/hooks/createUsersWithListInputQuery.ts index 574da8c58..6cfcad4d3 100644 --- a/examples/svelte-query/src/gen/hooks/createUsersWithListInputQuery.ts +++ b/examples/svelte-query/src/gen/hooks/createUsersWithListInputQuery.ts @@ -29,8 +29,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function createUsersWithListInputQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/svelte-query/src/gen/hooks/deleteOrderQuery.ts b/examples/svelte-query/src/gen/hooks/deleteOrderQuery.ts index 7635c1429..08c8d66f1 100644 --- a/examples/svelte-query/src/gen/hooks/deleteOrderQuery.ts +++ b/examples/svelte-query/src/gen/hooks/deleteOrderQuery.ts @@ -21,8 +21,7 @@ type DeleteOrder = { /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function deleteOrderQuery( orderId: DeleteOrderPathParams['orderId'], options: { diff --git a/examples/svelte-query/src/gen/hooks/deletePetQuery.ts b/examples/svelte-query/src/gen/hooks/deletePetQuery.ts index c1876fda1..bb26b760a 100644 --- a/examples/svelte-query/src/gen/hooks/deletePetQuery.ts +++ b/examples/svelte-query/src/gen/hooks/deletePetQuery.ts @@ -21,8 +21,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function deletePetQuery( petId: DeletePetPathParams['petId'], headers?: DeletePet['headerParams'], diff --git a/examples/svelte-query/src/gen/hooks/deleteUserQuery.ts b/examples/svelte-query/src/gen/hooks/deleteUserQuery.ts index 17eb64806..e1bec507f 100644 --- a/examples/svelte-query/src/gen/hooks/deleteUserQuery.ts +++ b/examples/svelte-query/src/gen/hooks/deleteUserQuery.ts @@ -21,8 +21,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function deleteUserQuery( username: DeleteUserPathParams['username'], options: { diff --git a/examples/svelte-query/src/gen/hooks/findPetsByStatusQuery.ts b/examples/svelte-query/src/gen/hooks/findPetsByStatusQuery.ts index a1477af28..16db75784 100644 --- a/examples/svelte-query/src/gen/hooks/findPetsByStatusQuery.ts +++ b/examples/svelte-query/src/gen/hooks/findPetsByStatusQuery.ts @@ -41,12 +41,11 @@ export function findPetsByStatusQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function findPetsByStatusQuery< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], @@ -102,12 +101,11 @@ export function findPetsByStatusInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function findPetsByStatusQueryInfinite< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], diff --git a/examples/svelte-query/src/gen/hooks/findPetsByTagsQuery.ts b/examples/svelte-query/src/gen/hooks/findPetsByTagsQuery.ts index 171981d5c..542820a6a 100644 --- a/examples/svelte-query/src/gen/hooks/findPetsByTagsQuery.ts +++ b/examples/svelte-query/src/gen/hooks/findPetsByTagsQuery.ts @@ -41,12 +41,11 @@ export function findPetsByTagsQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function findPetsByTagsQuery< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], @@ -101,12 +100,11 @@ export function findPetsByTagsInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function findPetsByTagsQueryInfinite< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], diff --git a/examples/svelte-query/src/gen/hooks/getInventoryQuery.ts b/examples/svelte-query/src/gen/hooks/getInventoryQuery.ts index eafeca2f3..988e308da 100644 --- a/examples/svelte-query/src/gen/hooks/getInventoryQuery.ts +++ b/examples/svelte-query/src/gen/hooks/getInventoryQuery.ts @@ -37,12 +37,11 @@ export function getInventoryQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function getInventoryQuery< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], @@ -90,12 +89,11 @@ export function getInventoryInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function getInventoryQueryInfinite< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], diff --git a/examples/svelte-query/src/gen/hooks/getOrderByIdQuery.ts b/examples/svelte-query/src/gen/hooks/getOrderByIdQuery.ts index 6856d5456..06e6c3161 100644 --- a/examples/svelte-query/src/gen/hooks/getOrderByIdQuery.ts +++ b/examples/svelte-query/src/gen/hooks/getOrderByIdQuery.ts @@ -40,12 +40,11 @@ export function getOrderByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function getOrderByIdQuery< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], @@ -96,12 +95,11 @@ export function getOrderByIdInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function getOrderByIdQueryInfinite< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], diff --git a/examples/svelte-query/src/gen/hooks/getPetByIdQuery.ts b/examples/svelte-query/src/gen/hooks/getPetByIdQuery.ts index 366f3ca44..22fae68a6 100644 --- a/examples/svelte-query/src/gen/hooks/getPetByIdQuery.ts +++ b/examples/svelte-query/src/gen/hooks/getPetByIdQuery.ts @@ -40,12 +40,11 @@ export function getPetByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function getPetByIdQuery< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], @@ -95,12 +94,11 @@ export function getPetByIdInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function getPetByIdQueryInfinite< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], diff --git a/examples/svelte-query/src/gen/hooks/getUserByNameQuery.ts b/examples/svelte-query/src/gen/hooks/getUserByNameQuery.ts index 2f2b1f85d..0954c1aea 100644 --- a/examples/svelte-query/src/gen/hooks/getUserByNameQuery.ts +++ b/examples/svelte-query/src/gen/hooks/getUserByNameQuery.ts @@ -40,11 +40,10 @@ export function getUserByNameQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function getUserByNameQuery< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], @@ -95,11 +94,10 @@ export function getUserByNameInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function getUserByNameQueryInfinite< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], diff --git a/examples/svelte-query/src/gen/hooks/loginUserQuery.ts b/examples/svelte-query/src/gen/hooks/loginUserQuery.ts index 798b6fad3..f5a738c99 100644 --- a/examples/svelte-query/src/gen/hooks/loginUserQuery.ts +++ b/examples/svelte-query/src/gen/hooks/loginUserQuery.ts @@ -41,11 +41,10 @@ export function loginUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function loginUserQuery< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], @@ -100,11 +99,10 @@ export function loginUserInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function loginUserQueryInfinite< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], diff --git a/examples/svelte-query/src/gen/hooks/logoutUserQuery.ts b/examples/svelte-query/src/gen/hooks/logoutUserQuery.ts index 86791a0f7..6f972cfa9 100644 --- a/examples/svelte-query/src/gen/hooks/logoutUserQuery.ts +++ b/examples/svelte-query/src/gen/hooks/logoutUserQuery.ts @@ -37,11 +37,10 @@ export function logoutUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function logoutUserQuery< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], @@ -89,11 +88,10 @@ export function logoutUserInfiniteQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function logoutUserQueryInfinite< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], diff --git a/examples/svelte-query/src/gen/hooks/placeOrderPatchQuery.ts b/examples/svelte-query/src/gen/hooks/placeOrderPatchQuery.ts index 906cdf91f..5d934e1be 100644 --- a/examples/svelte-query/src/gen/hooks/placeOrderPatchQuery.ts +++ b/examples/svelte-query/src/gen/hooks/placeOrderPatchQuery.ts @@ -21,8 +21,7 @@ type PlaceOrderPatch = { /** * @description Place a new order in the store with patch * @summary Place an order for a pet with patch - * @link /store/order - */ + * @link /store/order */ export function placeOrderPatchQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/svelte-query/src/gen/hooks/placeOrderQuery.ts b/examples/svelte-query/src/gen/hooks/placeOrderQuery.ts index f9507d1d7..4eae2c66c 100644 --- a/examples/svelte-query/src/gen/hooks/placeOrderQuery.ts +++ b/examples/svelte-query/src/gen/hooks/placeOrderQuery.ts @@ -21,8 +21,7 @@ type PlaceOrder = { /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function placeOrderQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/svelte-query/src/gen/hooks/updatePetQuery.ts b/examples/svelte-query/src/gen/hooks/updatePetQuery.ts index 6dde37b69..8be17e09c 100644 --- a/examples/svelte-query/src/gen/hooks/updatePetQuery.ts +++ b/examples/svelte-query/src/gen/hooks/updatePetQuery.ts @@ -21,8 +21,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function updatePetQuery( options: { mutation?: CreateMutationOptions diff --git a/examples/svelte-query/src/gen/hooks/updatePetWithFormQuery.ts b/examples/svelte-query/src/gen/hooks/updatePetWithFormQuery.ts index efb771009..9a6b9da59 100644 --- a/examples/svelte-query/src/gen/hooks/updatePetWithFormQuery.ts +++ b/examples/svelte-query/src/gen/hooks/updatePetWithFormQuery.ts @@ -25,8 +25,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function updatePetWithFormQuery( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithForm['queryParams'], diff --git a/examples/svelte-query/src/gen/hooks/updateUserQuery.ts b/examples/svelte-query/src/gen/hooks/updateUserQuery.ts index e02322da3..aa2392fdb 100644 --- a/examples/svelte-query/src/gen/hooks/updateUserQuery.ts +++ b/examples/svelte-query/src/gen/hooks/updateUserQuery.ts @@ -21,8 +21,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function updateUserQuery( username: UpdateUserPathParams['username'], options: { diff --git a/examples/svelte-query/src/gen/hooks/uploadFileQuery.ts b/examples/svelte-query/src/gen/hooks/uploadFileQuery.ts index 10dd19eb1..df4fbbb1e 100644 --- a/examples/svelte-query/src/gen/hooks/uploadFileQuery.ts +++ b/examples/svelte-query/src/gen/hooks/uploadFileQuery.ts @@ -20,8 +20,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function uploadFileQuery( petId: UploadFilePathParams['petId'], params?: UploadFile['queryParams'], diff --git a/examples/svelte-query/src/gen/models/AddPet.ts b/examples/svelte-query/src/gen/models/AddPet.ts index 0c7911b45..c8349c827 100644 --- a/examples/svelte-query/src/gen/models/AddPet.ts +++ b/examples/svelte-query/src/gen/models/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/svelte-query/src/gen/models/CreateUser.ts b/examples/svelte-query/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/svelte-query/src/gen/models/CreateUser.ts +++ b/examples/svelte-query/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/svelte-query/src/gen/models/CreateUsersWithListInput.ts b/examples/svelte-query/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/svelte-query/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/svelte-query/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/svelte-query/src/gen/models/DeleteOrder.ts b/examples/svelte-query/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/svelte-query/src/gen/models/DeleteOrder.ts +++ b/examples/svelte-query/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/svelte-query/src/gen/models/DeletePet.ts b/examples/svelte-query/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/svelte-query/src/gen/models/DeletePet.ts +++ b/examples/svelte-query/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/svelte-query/src/gen/models/DeleteUser.ts b/examples/svelte-query/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/svelte-query/src/gen/models/DeleteUser.ts +++ b/examples/svelte-query/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/svelte-query/src/gen/models/FindPetsByStatus.ts b/examples/svelte-query/src/gen/models/FindPetsByStatus.ts index b0fe4373d..a1659b564 100644 --- a/examples/svelte-query/src/gen/models/FindPetsByStatus.ts +++ b/examples/svelte-query/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/svelte-query/src/gen/models/FindPetsByTags.ts b/examples/svelte-query/src/gen/models/FindPetsByTags.ts index 0f74ac3cb..135a247e5 100644 --- a/examples/svelte-query/src/gen/models/FindPetsByTags.ts +++ b/examples/svelte-query/src/gen/models/FindPetsByTags.ts @@ -27,7 +27,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/svelte-query/src/gen/models/GetInventory.ts b/examples/svelte-query/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/svelte-query/src/gen/models/GetInventory.ts +++ b/examples/svelte-query/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/svelte-query/src/gen/models/GetOrderById.ts b/examples/svelte-query/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/svelte-query/src/gen/models/GetOrderById.ts +++ b/examples/svelte-query/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/svelte-query/src/gen/models/GetPetById.ts b/examples/svelte-query/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/svelte-query/src/gen/models/GetPetById.ts +++ b/examples/svelte-query/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/svelte-query/src/gen/models/GetUserByName.ts b/examples/svelte-query/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/svelte-query/src/gen/models/GetUserByName.ts +++ b/examples/svelte-query/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/svelte-query/src/gen/models/LoginUser.ts b/examples/svelte-query/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/svelte-query/src/gen/models/LoginUser.ts +++ b/examples/svelte-query/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/svelte-query/src/gen/models/LogoutUser.ts b/examples/svelte-query/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/svelte-query/src/gen/models/LogoutUser.ts +++ b/examples/svelte-query/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/svelte-query/src/gen/models/PlaceOrder.ts b/examples/svelte-query/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/svelte-query/src/gen/models/PlaceOrder.ts +++ b/examples/svelte-query/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/svelte-query/src/gen/models/PlaceOrderPatch.ts b/examples/svelte-query/src/gen/models/PlaceOrderPatch.ts index 12340d275..b6a277f61 100644 --- a/examples/svelte-query/src/gen/models/PlaceOrderPatch.ts +++ b/examples/svelte-query/src/gen/models/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/svelte-query/src/gen/models/UpdatePet.ts b/examples/svelte-query/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/svelte-query/src/gen/models/UpdatePet.ts +++ b/examples/svelte-query/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/svelte-query/src/gen/models/UpdatePetWithForm.ts b/examples/svelte-query/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/svelte-query/src/gen/models/UpdatePetWithForm.ts +++ b/examples/svelte-query/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/svelte-query/src/gen/models/UpdateUser.ts b/examples/svelte-query/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/svelte-query/src/gen/models/UpdateUser.ts +++ b/examples/svelte-query/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/svelte-query/src/gen/models/UploadFile.ts b/examples/svelte-query/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/svelte-query/src/gen/models/UploadFile.ts +++ b/examples/svelte-query/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/swr/src/gen/hooks/useAddPet.ts b/examples/swr/src/gen/hooks/useAddPet.ts index 84ecea66f..85dbedd61 100644 --- a/examples/swr/src/gen/hooks/useAddPet.ts +++ b/examples/swr/src/gen/hooks/useAddPet.ts @@ -7,8 +7,7 @@ import type { AddPetMutationRequest, AddPetMutationResponse, AddPet405 } from '. /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPet(options?: { mutation?: SWRMutationConfiguration, TError, string | null, TVariables> client?: Partial>[0]> diff --git a/examples/swr/src/gen/hooks/useCreateUser.ts b/examples/swr/src/gen/hooks/useCreateUser.ts index 0ae587a94..ef02ca34e 100644 --- a/examples/swr/src/gen/hooks/useCreateUser.ts +++ b/examples/swr/src/gen/hooks/useCreateUser.ts @@ -7,8 +7,7 @@ import type { CreateUserMutationRequest, CreateUserMutationResponse, CreateUserE /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUser(options?: { mutation?: SWRMutationConfiguration, TError, string | null, TVariables> client?: Partial>[0]> diff --git a/examples/swr/src/gen/hooks/useCreateUsersWithListInput.ts b/examples/swr/src/gen/hooks/useCreateUsersWithListInput.ts index 52c4b4ad5..70cc7719f 100644 --- a/examples/swr/src/gen/hooks/useCreateUsersWithListInput.ts +++ b/examples/swr/src/gen/hooks/useCreateUsersWithListInput.ts @@ -11,8 +11,7 @@ import type { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInput< TData = CreateUsersWithListInputMutationResponse, TError = CreateUsersWithListInputError, diff --git a/examples/swr/src/gen/hooks/useDeleteOrder.ts b/examples/swr/src/gen/hooks/useDeleteOrder.ts index fa2222cc2..bba8a463a 100644 --- a/examples/swr/src/gen/hooks/useDeleteOrder.ts +++ b/examples/swr/src/gen/hooks/useDeleteOrder.ts @@ -7,8 +7,7 @@ import type { DeleteOrderMutationResponse, DeleteOrderPathParams, DeleteOrder400 /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function useDeleteOrder( orderId: DeleteOrderPathParams['orderId'], options?: { diff --git a/examples/swr/src/gen/hooks/useDeletePet.ts b/examples/swr/src/gen/hooks/useDeletePet.ts index 9a5b326c6..7d185f430 100644 --- a/examples/swr/src/gen/hooks/useDeletePet.ts +++ b/examples/swr/src/gen/hooks/useDeletePet.ts @@ -7,8 +7,7 @@ import type { DeletePetMutationResponse, DeletePetPathParams, DeletePetHeaderPar /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePet( petId: DeletePetPathParams['petId'], headers?: DeletePetHeaderParams, diff --git a/examples/swr/src/gen/hooks/useDeleteUser.ts b/examples/swr/src/gen/hooks/useDeleteUser.ts index fadb19db5..1c741ec62 100644 --- a/examples/swr/src/gen/hooks/useDeleteUser.ts +++ b/examples/swr/src/gen/hooks/useDeleteUser.ts @@ -7,8 +7,7 @@ import type { DeleteUserMutationResponse, DeleteUserPathParams, DeleteUser400, D /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUser( username: DeleteUserPathParams['username'], options?: { diff --git a/examples/swr/src/gen/hooks/useFindPetsByStatus.ts b/examples/swr/src/gen/hooks/useFindPetsByStatus.ts index cc9f1d68d..eade9f1b3 100644 --- a/examples/swr/src/gen/hooks/useFindPetsByStatus.ts +++ b/examples/swr/src/gen/hooks/useFindPetsByStatus.ts @@ -17,12 +17,11 @@ export function findPetsByStatusQueryOptions res.data) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatus( params?: FindPetsByStatusQueryParams, options?: { diff --git a/examples/swr/src/gen/hooks/useFindPetsByTags.ts b/examples/swr/src/gen/hooks/useFindPetsByTags.ts index e83598523..375245e27 100644 --- a/examples/swr/src/gen/hooks/useFindPetsByTags.ts +++ b/examples/swr/src/gen/hooks/useFindPetsByTags.ts @@ -17,12 +17,11 @@ export function findPetsByTagsQueryOptions res.data) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTags( params?: FindPetsByTagsQueryParams, options?: { diff --git a/examples/swr/src/gen/hooks/useGetInventory.ts b/examples/swr/src/gen/hooks/useGetInventory.ts index 7dfd5e406..202009a76 100644 --- a/examples/swr/src/gen/hooks/useGetInventory.ts +++ b/examples/swr/src/gen/hooks/useGetInventory.ts @@ -15,12 +15,11 @@ export function getInventoryQueryOptions res.data) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventory(options?: { query?: SWRConfiguration client?: Partial>[0]> diff --git a/examples/swr/src/gen/hooks/useGetOrderById.ts b/examples/swr/src/gen/hooks/useGetOrderById.ts index 45133ce4f..56168ff84 100644 --- a/examples/swr/src/gen/hooks/useGetOrderById.ts +++ b/examples/swr/src/gen/hooks/useGetOrderById.ts @@ -16,12 +16,11 @@ export function getOrderByIdQueryOptions res.data) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderById( orderId: GetOrderByIdPathParams['orderId'], options?: { diff --git a/examples/swr/src/gen/hooks/useGetPetById.ts b/examples/swr/src/gen/hooks/useGetPetById.ts index 1d5435449..8007a26ba 100644 --- a/examples/swr/src/gen/hooks/useGetPetById.ts +++ b/examples/swr/src/gen/hooks/useGetPetById.ts @@ -16,12 +16,11 @@ export function getPetByIdQueryOptions res.data) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetById( petId: GetPetByIdPathParams['petId'], options?: { diff --git a/examples/swr/src/gen/hooks/useGetUserByName.ts b/examples/swr/src/gen/hooks/useGetUserByName.ts index 39c6a1600..f4196e5d1 100644 --- a/examples/swr/src/gen/hooks/useGetUserByName.ts +++ b/examples/swr/src/gen/hooks/useGetUserByName.ts @@ -16,11 +16,10 @@ export function getUserByNameQueryOptions res.data) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByName( username: GetUserByNamePathParams['username'], options?: { diff --git a/examples/swr/src/gen/hooks/useLoginUser.ts b/examples/swr/src/gen/hooks/useLoginUser.ts index dfebe2a3f..4a77984e8 100644 --- a/examples/swr/src/gen/hooks/useLoginUser.ts +++ b/examples/swr/src/gen/hooks/useLoginUser.ts @@ -17,11 +17,10 @@ export function loginUserQueryOptions res.data) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUser( params?: LoginUserQueryParams, options?: { diff --git a/examples/swr/src/gen/hooks/useLogoutUser.ts b/examples/swr/src/gen/hooks/useLogoutUser.ts index a1bd78ff5..ad16346df 100644 --- a/examples/swr/src/gen/hooks/useLogoutUser.ts +++ b/examples/swr/src/gen/hooks/useLogoutUser.ts @@ -15,11 +15,10 @@ export function logoutUserQueryOptions res.data) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUser(options?: { query?: SWRConfiguration client?: Partial>[0]> diff --git a/examples/swr/src/gen/hooks/usePlaceOrder.ts b/examples/swr/src/gen/hooks/usePlaceOrder.ts index f9c83c51c..20d5d1bbb 100644 --- a/examples/swr/src/gen/hooks/usePlaceOrder.ts +++ b/examples/swr/src/gen/hooks/usePlaceOrder.ts @@ -7,8 +7,7 @@ import type { PlaceOrderMutationRequest, PlaceOrderMutationResponse, PlaceOrder4 /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrder(options?: { mutation?: SWRMutationConfiguration, TError, string | null, TVariables> client?: Partial>[0]> diff --git a/examples/swr/src/gen/hooks/usePlaceOrderPatch.ts b/examples/swr/src/gen/hooks/usePlaceOrderPatch.ts index da2dee425..22da794f0 100644 --- a/examples/swr/src/gen/hooks/usePlaceOrderPatch.ts +++ b/examples/swr/src/gen/hooks/usePlaceOrderPatch.ts @@ -7,8 +7,7 @@ import type { PlaceOrderPatchMutationRequest, PlaceOrderPatchMutationResponse, P /** * @description Place a new order in the store with patch * @summary Place an order for a pet with patch - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrderPatch< TData = PlaceOrderPatchMutationResponse, TError = PlaceOrderPatch405, diff --git a/examples/swr/src/gen/hooks/useUpdatePet.ts b/examples/swr/src/gen/hooks/useUpdatePet.ts index 530dabb13..461dfe55b 100644 --- a/examples/swr/src/gen/hooks/useUpdatePet.ts +++ b/examples/swr/src/gen/hooks/useUpdatePet.ts @@ -7,8 +7,7 @@ import type { UpdatePetMutationRequest, UpdatePetMutationResponse, UpdatePet400, /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePet< TData = UpdatePetMutationResponse, TError = UpdatePet400 | UpdatePet404 | UpdatePet405, diff --git a/examples/swr/src/gen/hooks/useUpdatePetWithForm.ts b/examples/swr/src/gen/hooks/useUpdatePetWithForm.ts index f42da22a4..62cc822c0 100644 --- a/examples/swr/src/gen/hooks/useUpdatePetWithForm.ts +++ b/examples/swr/src/gen/hooks/useUpdatePetWithForm.ts @@ -11,8 +11,7 @@ import type { /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithForm( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithFormQueryParams, diff --git a/examples/swr/src/gen/hooks/useUpdateUser.ts b/examples/swr/src/gen/hooks/useUpdateUser.ts index 4eb47b0ef..364898316 100644 --- a/examples/swr/src/gen/hooks/useUpdateUser.ts +++ b/examples/swr/src/gen/hooks/useUpdateUser.ts @@ -7,8 +7,7 @@ import type { UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserP /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUser( username: UpdateUserPathParams['username'], options?: { diff --git a/examples/swr/src/gen/hooks/useUploadFile.ts b/examples/swr/src/gen/hooks/useUploadFile.ts index 184cf9315..62f5f6950 100644 --- a/examples/swr/src/gen/hooks/useUploadFile.ts +++ b/examples/swr/src/gen/hooks/useUploadFile.ts @@ -6,8 +6,7 @@ import type { UploadFileMutationRequest, UploadFileMutationResponse, UploadFileP /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFile( petId: UploadFilePathParams['petId'], params?: UploadFileQueryParams, diff --git a/examples/swr/src/gen/models/AddPet.ts b/examples/swr/src/gen/models/AddPet.ts index 0c7911b45..c8349c827 100644 --- a/examples/swr/src/gen/models/AddPet.ts +++ b/examples/swr/src/gen/models/AddPet.ts @@ -21,7 +21,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/swr/src/gen/models/CreateUser.ts b/examples/swr/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/swr/src/gen/models/CreateUser.ts +++ b/examples/swr/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/swr/src/gen/models/CreateUsersWithListInput.ts b/examples/swr/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/swr/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/swr/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/swr/src/gen/models/DeleteOrder.ts b/examples/swr/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/swr/src/gen/models/DeleteOrder.ts +++ b/examples/swr/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/swr/src/gen/models/DeletePet.ts b/examples/swr/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/swr/src/gen/models/DeletePet.ts +++ b/examples/swr/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/swr/src/gen/models/DeleteUser.ts b/examples/swr/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/swr/src/gen/models/DeleteUser.ts +++ b/examples/swr/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/swr/src/gen/models/FindPetsByStatus.ts b/examples/swr/src/gen/models/FindPetsByStatus.ts index b0fe4373d..a1659b564 100644 --- a/examples/swr/src/gen/models/FindPetsByStatus.ts +++ b/examples/swr/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/swr/src/gen/models/FindPetsByTags.ts b/examples/swr/src/gen/models/FindPetsByTags.ts index 0f74ac3cb..135a247e5 100644 --- a/examples/swr/src/gen/models/FindPetsByTags.ts +++ b/examples/swr/src/gen/models/FindPetsByTags.ts @@ -27,7 +27,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/swr/src/gen/models/GetInventory.ts b/examples/swr/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/swr/src/gen/models/GetInventory.ts +++ b/examples/swr/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/swr/src/gen/models/GetOrderById.ts b/examples/swr/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/swr/src/gen/models/GetOrderById.ts +++ b/examples/swr/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/swr/src/gen/models/GetPetById.ts b/examples/swr/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/swr/src/gen/models/GetPetById.ts +++ b/examples/swr/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/swr/src/gen/models/GetUserByName.ts b/examples/swr/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/swr/src/gen/models/GetUserByName.ts +++ b/examples/swr/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/swr/src/gen/models/LoginUser.ts b/examples/swr/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/swr/src/gen/models/LoginUser.ts +++ b/examples/swr/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/swr/src/gen/models/LogoutUser.ts b/examples/swr/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/swr/src/gen/models/LogoutUser.ts +++ b/examples/swr/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/swr/src/gen/models/PlaceOrder.ts b/examples/swr/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/swr/src/gen/models/PlaceOrder.ts +++ b/examples/swr/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/swr/src/gen/models/PlaceOrderPatch.ts b/examples/swr/src/gen/models/PlaceOrderPatch.ts index 12340d275..b6a277f61 100644 --- a/examples/swr/src/gen/models/PlaceOrderPatch.ts +++ b/examples/swr/src/gen/models/PlaceOrderPatch.ts @@ -11,7 +11,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest diff --git a/examples/swr/src/gen/models/UpdatePet.ts b/examples/swr/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/swr/src/gen/models/UpdatePet.ts +++ b/examples/swr/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/swr/src/gen/models/UpdatePetWithForm.ts b/examples/swr/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/swr/src/gen/models/UpdatePetWithForm.ts +++ b/examples/swr/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/swr/src/gen/models/UpdateUser.ts b/examples/swr/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/swr/src/gen/models/UpdateUser.ts +++ b/examples/swr/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/swr/src/gen/models/UploadFile.ts b/examples/swr/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/swr/src/gen/models/UploadFile.ts +++ b/examples/swr/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/typescript/src/gen/models.ts b/examples/typescript/src/gen/models.ts index c651a1d2c..b4f7ab649 100644 --- a/examples/typescript/src/gen/models.ts +++ b/examples/typescript/src/gen/models.ts @@ -270,7 +270,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest @@ -297,7 +296,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest @@ -327,7 +325,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams @@ -361,7 +358,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams @@ -390,7 +386,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams @@ -424,7 +419,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams @@ -453,7 +447,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams @@ -483,7 +476,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest @@ -497,7 +489,6 @@ export namespace UploadFileMutation { export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } @@ -513,7 +504,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest @@ -531,7 +521,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest @@ -560,7 +549,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams @@ -586,7 +574,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams @@ -604,7 +591,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest @@ -622,7 +608,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest @@ -651,7 +636,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams @@ -664,7 +648,6 @@ export namespace LoginUserQuery { export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError @@ -692,7 +675,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams @@ -718,7 +700,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest @@ -745,7 +726,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/typescript/src/gen/modelsConst.ts b/examples/typescript/src/gen/modelsConst.ts index 4e8f218cd..a1ce63543 100644 --- a/examples/typescript/src/gen/modelsConst.ts +++ b/examples/typescript/src/gen/modelsConst.ts @@ -274,7 +274,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest @@ -301,7 +300,6 @@ export type AddPetMutationRequest = AddPetRequest * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest @@ -332,7 +330,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams @@ -366,7 +363,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams @@ -395,7 +391,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams @@ -429,7 +424,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams @@ -458,7 +452,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams @@ -488,7 +481,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest @@ -502,7 +494,6 @@ export namespace UploadFileMutation { export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } @@ -518,7 +509,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest @@ -536,7 +526,6 @@ export type PlaceOrderPatchMutationRequest = Order * @description successful operation */ export type PlaceOrderPatchMutationResponse = Order - export namespace PlaceOrderPatchMutation { export type Response = PlaceOrderPatchMutationResponse export type Request = PlaceOrderPatchMutationRequest @@ -565,7 +554,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams @@ -591,7 +579,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams @@ -609,7 +596,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest @@ -627,7 +613,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest @@ -656,7 +641,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams @@ -669,7 +653,6 @@ export namespace LoginUserQuery { export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError @@ -697,7 +680,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams @@ -723,7 +705,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest @@ -750,7 +731,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/vue-query-v5/package.json b/examples/vue-query-v5/package.json index 896c68938..917ee216e 100644 --- a/examples/vue-query-v5/package.json +++ b/examples/vue-query-v5/package.json @@ -29,7 +29,7 @@ "@kubb/swagger-tanstack-query": "workspace:*", "@kubb/swagger-ts": "workspace:*", "@kubb/swagger-zod": "workspace:*", - "@tanstack/vue-query": "^5.8.4", + "@tanstack/vue-query": "^5.8.6", "axios": "^1.6.2", "vue": "^3.3.8" }, diff --git a/examples/vue-query-v5/src/gen/hooks/useAddPet.ts b/examples/vue-query-v5/src/gen/hooks/useAddPet.ts index a1e9ff288..57725d079 100644 --- a/examples/vue-query-v5/src/gen/hooks/useAddPet.ts +++ b/examples/vue-query-v5/src/gen/hooks/useAddPet.ts @@ -21,8 +21,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPet( options: { mutation?: UseMutationOptions diff --git a/examples/vue-query-v5/src/gen/hooks/useCreateUser.ts b/examples/vue-query-v5/src/gen/hooks/useCreateUser.ts index 8f0ba1617..347dd0715 100644 --- a/examples/vue-query-v5/src/gen/hooks/useCreateUser.ts +++ b/examples/vue-query-v5/src/gen/hooks/useCreateUser.ts @@ -21,8 +21,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUser( options: { mutation?: UseMutationOptions diff --git a/examples/vue-query-v5/src/gen/hooks/useCreateUsersWithListInput.ts b/examples/vue-query-v5/src/gen/hooks/useCreateUsersWithListInput.ts index fd241ba72..9309667cf 100644 --- a/examples/vue-query-v5/src/gen/hooks/useCreateUsersWithListInput.ts +++ b/examples/vue-query-v5/src/gen/hooks/useCreateUsersWithListInput.ts @@ -29,8 +29,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInput( options: { mutation?: UseMutationOptions diff --git a/examples/vue-query-v5/src/gen/hooks/useDeleteOrder.ts b/examples/vue-query-v5/src/gen/hooks/useDeleteOrder.ts index 258dcea62..5fe134b7f 100644 --- a/examples/vue-query-v5/src/gen/hooks/useDeleteOrder.ts +++ b/examples/vue-query-v5/src/gen/hooks/useDeleteOrder.ts @@ -23,8 +23,7 @@ type DeleteOrder = { /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function useDeleteOrder( refOrderId: MaybeRef, options: { diff --git a/examples/vue-query-v5/src/gen/hooks/useDeletePet.ts b/examples/vue-query-v5/src/gen/hooks/useDeletePet.ts index a19bcf03c..18f5f04cf 100644 --- a/examples/vue-query-v5/src/gen/hooks/useDeletePet.ts +++ b/examples/vue-query-v5/src/gen/hooks/useDeletePet.ts @@ -23,8 +23,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePet( refPetId: MaybeRef, refHeaders?: MaybeRef, diff --git a/examples/vue-query-v5/src/gen/hooks/useDeleteUser.ts b/examples/vue-query-v5/src/gen/hooks/useDeleteUser.ts index a26cd9a5e..c09124451 100644 --- a/examples/vue-query-v5/src/gen/hooks/useDeleteUser.ts +++ b/examples/vue-query-v5/src/gen/hooks/useDeleteUser.ts @@ -23,8 +23,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUser( refUsername: MaybeRef, options: { diff --git a/examples/vue-query-v5/src/gen/hooks/useFindPetsByStatus.ts b/examples/vue-query-v5/src/gen/hooks/useFindPetsByStatus.ts index 51763c3f7..67a2c6c4e 100644 --- a/examples/vue-query-v5/src/gen/hooks/useFindPetsByStatus.ts +++ b/examples/vue-query-v5/src/gen/hooks/useFindPetsByStatus.ts @@ -45,12 +45,11 @@ export function findPetsByStatusQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatus< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/useFindPetsByTags.ts b/examples/vue-query-v5/src/gen/hooks/useFindPetsByTags.ts index b6575c512..0b52e81bd 100644 --- a/examples/vue-query-v5/src/gen/hooks/useFindPetsByTags.ts +++ b/examples/vue-query-v5/src/gen/hooks/useFindPetsByTags.ts @@ -44,12 +44,11 @@ export function findPetsByTagsQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTags< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/useGetInventory.ts b/examples/vue-query-v5/src/gen/hooks/useGetInventory.ts index f788c261d..34c84eb76 100644 --- a/examples/vue-query-v5/src/gen/hooks/useGetInventory.ts +++ b/examples/vue-query-v5/src/gen/hooks/useGetInventory.ts @@ -37,12 +37,11 @@ export function getInventoryQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventory< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/useGetOrderById.ts b/examples/vue-query-v5/src/gen/hooks/useGetOrderById.ts index 64abf7810..373536733 100644 --- a/examples/vue-query-v5/src/gen/hooks/useGetOrderById.ts +++ b/examples/vue-query-v5/src/gen/hooks/useGetOrderById.ts @@ -44,12 +44,11 @@ export function getOrderByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderById< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/useGetPetById.ts b/examples/vue-query-v5/src/gen/hooks/useGetPetById.ts index 8b37df9be..9d84e3d7e 100644 --- a/examples/vue-query-v5/src/gen/hooks/useGetPetById.ts +++ b/examples/vue-query-v5/src/gen/hooks/useGetPetById.ts @@ -43,12 +43,11 @@ export function getPetByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetById< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/useGetUserByName.ts b/examples/vue-query-v5/src/gen/hooks/useGetUserByName.ts index 56eb0f512..1d0a7c228 100644 --- a/examples/vue-query-v5/src/gen/hooks/useGetUserByName.ts +++ b/examples/vue-query-v5/src/gen/hooks/useGetUserByName.ts @@ -44,11 +44,10 @@ export function getUserByNameQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByName< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/useLoginUser.ts b/examples/vue-query-v5/src/gen/hooks/useLoginUser.ts index 1bd1e1487..9a989b09b 100644 --- a/examples/vue-query-v5/src/gen/hooks/useLoginUser.ts +++ b/examples/vue-query-v5/src/gen/hooks/useLoginUser.ts @@ -44,11 +44,10 @@ export function loginUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUser< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/useLogoutUser.ts b/examples/vue-query-v5/src/gen/hooks/useLogoutUser.ts index 91d9d7be0..b73f93e1d 100644 --- a/examples/vue-query-v5/src/gen/hooks/useLogoutUser.ts +++ b/examples/vue-query-v5/src/gen/hooks/useLogoutUser.ts @@ -37,11 +37,10 @@ export function logoutUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUser< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], diff --git a/examples/vue-query-v5/src/gen/hooks/usePlaceOrder.ts b/examples/vue-query-v5/src/gen/hooks/usePlaceOrder.ts index 1e4498fbe..a68700c12 100644 --- a/examples/vue-query-v5/src/gen/hooks/usePlaceOrder.ts +++ b/examples/vue-query-v5/src/gen/hooks/usePlaceOrder.ts @@ -21,8 +21,7 @@ type PlaceOrder = { /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrder( options: { mutation?: UseMutationOptions diff --git a/examples/vue-query-v5/src/gen/hooks/useUpdatePet.ts b/examples/vue-query-v5/src/gen/hooks/useUpdatePet.ts index 0d6f649b2..30dcfcf5d 100644 --- a/examples/vue-query-v5/src/gen/hooks/useUpdatePet.ts +++ b/examples/vue-query-v5/src/gen/hooks/useUpdatePet.ts @@ -21,8 +21,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePet( options: { mutation?: UseMutationOptions diff --git a/examples/vue-query-v5/src/gen/hooks/useUpdatePetWithForm.ts b/examples/vue-query-v5/src/gen/hooks/useUpdatePetWithForm.ts index 3dc71d56e..9310da36a 100644 --- a/examples/vue-query-v5/src/gen/hooks/useUpdatePetWithForm.ts +++ b/examples/vue-query-v5/src/gen/hooks/useUpdatePetWithForm.ts @@ -27,8 +27,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithForm( refPetId: MaybeRef, refParams?: MaybeRef, diff --git a/examples/vue-query-v5/src/gen/hooks/useUpdateUser.ts b/examples/vue-query-v5/src/gen/hooks/useUpdateUser.ts index 8ce8c1852..3fae0571f 100644 --- a/examples/vue-query-v5/src/gen/hooks/useUpdateUser.ts +++ b/examples/vue-query-v5/src/gen/hooks/useUpdateUser.ts @@ -23,8 +23,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUser( refUsername: MaybeRef, options: { diff --git a/examples/vue-query-v5/src/gen/hooks/useUploadFile.ts b/examples/vue-query-v5/src/gen/hooks/useUploadFile.ts index 3eb4b2d6f..70b09459a 100644 --- a/examples/vue-query-v5/src/gen/hooks/useUploadFile.ts +++ b/examples/vue-query-v5/src/gen/hooks/useUploadFile.ts @@ -22,8 +22,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFile( refPetId: MaybeRef, refParams?: MaybeRef, diff --git a/examples/vue-query-v5/src/gen/models/AddPet.ts b/examples/vue-query-v5/src/gen/models/AddPet.ts index 707cee2a6..b2539b4bc 100644 --- a/examples/vue-query-v5/src/gen/models/AddPet.ts +++ b/examples/vue-query-v5/src/gen/models/AddPet.ts @@ -14,7 +14,6 @@ export type AddPetMutationRequest = Pet * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/vue-query-v5/src/gen/models/CreateUser.ts b/examples/vue-query-v5/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/vue-query-v5/src/gen/models/CreateUser.ts +++ b/examples/vue-query-v5/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/vue-query-v5/src/gen/models/CreateUsersWithListInput.ts b/examples/vue-query-v5/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/vue-query-v5/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/vue-query-v5/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/vue-query-v5/src/gen/models/DeleteOrder.ts b/examples/vue-query-v5/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/vue-query-v5/src/gen/models/DeleteOrder.ts +++ b/examples/vue-query-v5/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/vue-query-v5/src/gen/models/DeletePet.ts b/examples/vue-query-v5/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/vue-query-v5/src/gen/models/DeletePet.ts +++ b/examples/vue-query-v5/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/vue-query-v5/src/gen/models/DeleteUser.ts b/examples/vue-query-v5/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/vue-query-v5/src/gen/models/DeleteUser.ts +++ b/examples/vue-query-v5/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/vue-query-v5/src/gen/models/FindPetsByStatus.ts b/examples/vue-query-v5/src/gen/models/FindPetsByStatus.ts index b0fe4373d..a1659b564 100644 --- a/examples/vue-query-v5/src/gen/models/FindPetsByStatus.ts +++ b/examples/vue-query-v5/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/vue-query-v5/src/gen/models/FindPetsByTags.ts b/examples/vue-query-v5/src/gen/models/FindPetsByTags.ts index 322509ccc..0cb8dcce6 100644 --- a/examples/vue-query-v5/src/gen/models/FindPetsByTags.ts +++ b/examples/vue-query-v5/src/gen/models/FindPetsByTags.ts @@ -17,7 +17,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/vue-query-v5/src/gen/models/GetInventory.ts b/examples/vue-query-v5/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/vue-query-v5/src/gen/models/GetInventory.ts +++ b/examples/vue-query-v5/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/vue-query-v5/src/gen/models/GetOrderById.ts b/examples/vue-query-v5/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/vue-query-v5/src/gen/models/GetOrderById.ts +++ b/examples/vue-query-v5/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/vue-query-v5/src/gen/models/GetPetById.ts b/examples/vue-query-v5/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/vue-query-v5/src/gen/models/GetPetById.ts +++ b/examples/vue-query-v5/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/vue-query-v5/src/gen/models/GetUserByName.ts b/examples/vue-query-v5/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/vue-query-v5/src/gen/models/GetUserByName.ts +++ b/examples/vue-query-v5/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/vue-query-v5/src/gen/models/LoginUser.ts b/examples/vue-query-v5/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/vue-query-v5/src/gen/models/LoginUser.ts +++ b/examples/vue-query-v5/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/vue-query-v5/src/gen/models/LogoutUser.ts b/examples/vue-query-v5/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/vue-query-v5/src/gen/models/LogoutUser.ts +++ b/examples/vue-query-v5/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/vue-query-v5/src/gen/models/PlaceOrder.ts b/examples/vue-query-v5/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/vue-query-v5/src/gen/models/PlaceOrder.ts +++ b/examples/vue-query-v5/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/vue-query-v5/src/gen/models/UpdatePet.ts b/examples/vue-query-v5/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/vue-query-v5/src/gen/models/UpdatePet.ts +++ b/examples/vue-query-v5/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/vue-query-v5/src/gen/models/UpdatePetWithForm.ts b/examples/vue-query-v5/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/vue-query-v5/src/gen/models/UpdatePetWithForm.ts +++ b/examples/vue-query-v5/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/vue-query-v5/src/gen/models/UpdateUser.ts b/examples/vue-query-v5/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/vue-query-v5/src/gen/models/UpdateUser.ts +++ b/examples/vue-query-v5/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/vue-query-v5/src/gen/models/UploadFile.ts b/examples/vue-query-v5/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/vue-query-v5/src/gen/models/UploadFile.ts +++ b/examples/vue-query-v5/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/vue-query/src/gen/hooks/useAddPet.ts b/examples/vue-query/src/gen/hooks/useAddPet.ts index 741a7144d..b540f8496 100644 --- a/examples/vue-query/src/gen/hooks/useAddPet.ts +++ b/examples/vue-query/src/gen/hooks/useAddPet.ts @@ -22,8 +22,7 @@ type AddPet = { /** * @description Add a new pet to the store * @summary Add a new pet to the store - * @link /pet - */ + * @link /pet */ export function useAddPet( options: { mutation?: VueMutationObserverOptions diff --git a/examples/vue-query/src/gen/hooks/useCreateUser.ts b/examples/vue-query/src/gen/hooks/useCreateUser.ts index b25acf0cd..27df2de4c 100644 --- a/examples/vue-query/src/gen/hooks/useCreateUser.ts +++ b/examples/vue-query/src/gen/hooks/useCreateUser.ts @@ -22,8 +22,7 @@ type CreateUser = { /** * @description This can only be done by the logged in user. * @summary Create user - * @link /user - */ + * @link /user */ export function useCreateUser( options: { mutation?: VueMutationObserverOptions diff --git a/examples/vue-query/src/gen/hooks/useCreateUsersWithListInput.ts b/examples/vue-query/src/gen/hooks/useCreateUsersWithListInput.ts index eff0764b3..43d537f52 100644 --- a/examples/vue-query/src/gen/hooks/useCreateUsersWithListInput.ts +++ b/examples/vue-query/src/gen/hooks/useCreateUsersWithListInput.ts @@ -30,8 +30,7 @@ type CreateUsersWithListInput = { /** * @description Creates list of users with given input array * @summary Creates list of users with given input array - * @link /user/createWithList - */ + * @link /user/createWithList */ export function useCreateUsersWithListInput( options: { mutation?: VueMutationObserverOptions diff --git a/examples/vue-query/src/gen/hooks/useDeleteOrder.ts b/examples/vue-query/src/gen/hooks/useDeleteOrder.ts index 8365d2d6a..b7ef64e6a 100644 --- a/examples/vue-query/src/gen/hooks/useDeleteOrder.ts +++ b/examples/vue-query/src/gen/hooks/useDeleteOrder.ts @@ -24,8 +24,7 @@ type DeleteOrder = { /** * @description For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @summary Delete purchase order by ID - * @link /store/order/:orderId - */ + * @link /store/order/:orderId */ export function useDeleteOrder( refOrderId: MaybeRef, options: { diff --git a/examples/vue-query/src/gen/hooks/useDeletePet.ts b/examples/vue-query/src/gen/hooks/useDeletePet.ts index 29b055619..c8f540ee3 100644 --- a/examples/vue-query/src/gen/hooks/useDeletePet.ts +++ b/examples/vue-query/src/gen/hooks/useDeletePet.ts @@ -24,8 +24,7 @@ type DeletePet = { /** * @description delete a pet * @summary Deletes a pet - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useDeletePet( refPetId: MaybeRef, refHeaders?: MaybeRef, diff --git a/examples/vue-query/src/gen/hooks/useDeleteUser.ts b/examples/vue-query/src/gen/hooks/useDeleteUser.ts index 4147ec7d0..93f0e9653 100644 --- a/examples/vue-query/src/gen/hooks/useDeleteUser.ts +++ b/examples/vue-query/src/gen/hooks/useDeleteUser.ts @@ -24,8 +24,7 @@ type DeleteUser = { /** * @description This can only be done by the logged in user. * @summary Delete user - * @link /user/:username - */ + * @link /user/:username */ export function useDeleteUser( refUsername: MaybeRef, options: { diff --git a/examples/vue-query/src/gen/hooks/useFindPetsByStatus.ts b/examples/vue-query/src/gen/hooks/useFindPetsByStatus.ts index 115912f78..71ce6d1d6 100644 --- a/examples/vue-query/src/gen/hooks/useFindPetsByStatus.ts +++ b/examples/vue-query/src/gen/hooks/useFindPetsByStatus.ts @@ -46,12 +46,11 @@ export function findPetsByStatusQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple status values can be provided with comma separated strings * @summary Finds Pets by status - * @link /pet/findByStatus - */ - + * @link /pet/findByStatus */ export function useFindPetsByStatus< TQueryFnData extends FindPetsByStatus['data'] = FindPetsByStatus['data'], TError = FindPetsByStatus['error'], diff --git a/examples/vue-query/src/gen/hooks/useFindPetsByTags.ts b/examples/vue-query/src/gen/hooks/useFindPetsByTags.ts index e3f25b411..c7349e05b 100644 --- a/examples/vue-query/src/gen/hooks/useFindPetsByTags.ts +++ b/examples/vue-query/src/gen/hooks/useFindPetsByTags.ts @@ -45,12 +45,11 @@ export function findPetsByTagsQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags - * @link /pet/findByTags - */ - + * @link /pet/findByTags */ export function useFindPetsByTags< TQueryFnData extends FindPetsByTags['data'] = FindPetsByTags['data'], TError = FindPetsByTags['error'], diff --git a/examples/vue-query/src/gen/hooks/useGetInventory.ts b/examples/vue-query/src/gen/hooks/useGetInventory.ts index 4ab60c6f5..940e663e8 100644 --- a/examples/vue-query/src/gen/hooks/useGetInventory.ts +++ b/examples/vue-query/src/gen/hooks/useGetInventory.ts @@ -38,12 +38,11 @@ export function getInventoryQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a map of status codes to quantities * @summary Returns pet inventories by status - * @link /store/inventory - */ - + * @link /store/inventory */ export function useGetInventory< TQueryFnData extends GetInventory['data'] = GetInventory['data'], TError = GetInventory['error'], diff --git a/examples/vue-query/src/gen/hooks/useGetOrderById.ts b/examples/vue-query/src/gen/hooks/useGetOrderById.ts index 4c3ad8725..585fcad78 100644 --- a/examples/vue-query/src/gen/hooks/useGetOrderById.ts +++ b/examples/vue-query/src/gen/hooks/useGetOrderById.ts @@ -45,12 +45,11 @@ export function getOrderByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. * @summary Find purchase order by ID - * @link /store/order/:orderId - */ - + * @link /store/order/:orderId */ export function useGetOrderById< TQueryFnData extends GetOrderById['data'] = GetOrderById['data'], TError = GetOrderById['error'], diff --git a/examples/vue-query/src/gen/hooks/useGetPetById.ts b/examples/vue-query/src/gen/hooks/useGetPetById.ts index dff478502..ef6f3e94e 100644 --- a/examples/vue-query/src/gen/hooks/useGetPetById.ts +++ b/examples/vue-query/src/gen/hooks/useGetPetById.ts @@ -44,12 +44,11 @@ export function getPetByIdQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @description Returns a single pet * @summary Find pet by ID - * @link /pet/:petId - */ - + * @link /pet/:petId */ export function useGetPetById< TQueryFnData extends GetPetById['data'] = GetPetById['data'], TError = GetPetById['error'], diff --git a/examples/vue-query/src/gen/hooks/useGetUserByName.ts b/examples/vue-query/src/gen/hooks/useGetUserByName.ts index 5b5c42377..5a0c7337b 100644 --- a/examples/vue-query/src/gen/hooks/useGetUserByName.ts +++ b/examples/vue-query/src/gen/hooks/useGetUserByName.ts @@ -45,11 +45,10 @@ export function getUserByNameQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Get user by user name - * @link /user/:username - */ - + * @link /user/:username */ export function useGetUserByName< TQueryFnData extends GetUserByName['data'] = GetUserByName['data'], TError = GetUserByName['error'], diff --git a/examples/vue-query/src/gen/hooks/useLoginUser.ts b/examples/vue-query/src/gen/hooks/useLoginUser.ts index 7c4290b5c..63b10f3ea 100644 --- a/examples/vue-query/src/gen/hooks/useLoginUser.ts +++ b/examples/vue-query/src/gen/hooks/useLoginUser.ts @@ -45,11 +45,10 @@ export function loginUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs user into the system - * @link /user/login - */ - + * @link /user/login */ export function useLoginUser< TQueryFnData extends LoginUser['data'] = LoginUser['data'], TError = LoginUser['error'], diff --git a/examples/vue-query/src/gen/hooks/useLogoutUser.ts b/examples/vue-query/src/gen/hooks/useLogoutUser.ts index bb878f00b..f88a3d4d0 100644 --- a/examples/vue-query/src/gen/hooks/useLogoutUser.ts +++ b/examples/vue-query/src/gen/hooks/useLogoutUser.ts @@ -38,11 +38,10 @@ export function logoutUserQueryOptions< }).then((res) => res?.data || res) }, } -} /** +} +/** * @summary Logs out current logged in user session - * @link /user/logout - */ - + * @link /user/logout */ export function useLogoutUser< TQueryFnData extends LogoutUser['data'] = LogoutUser['data'], TError = LogoutUser['error'], diff --git a/examples/vue-query/src/gen/hooks/usePlaceOrder.ts b/examples/vue-query/src/gen/hooks/usePlaceOrder.ts index 7c9a620d6..9913310a2 100644 --- a/examples/vue-query/src/gen/hooks/usePlaceOrder.ts +++ b/examples/vue-query/src/gen/hooks/usePlaceOrder.ts @@ -22,8 +22,7 @@ type PlaceOrder = { /** * @description Place a new order in the store * @summary Place an order for a pet - * @link /store/order - */ + * @link /store/order */ export function usePlaceOrder( options: { mutation?: VueMutationObserverOptions diff --git a/examples/vue-query/src/gen/hooks/useUpdatePet.ts b/examples/vue-query/src/gen/hooks/useUpdatePet.ts index 8e84bca07..dca160cdc 100644 --- a/examples/vue-query/src/gen/hooks/useUpdatePet.ts +++ b/examples/vue-query/src/gen/hooks/useUpdatePet.ts @@ -22,8 +22,7 @@ type UpdatePet = { /** * @description Update an existing pet by Id * @summary Update an existing pet - * @link /pet - */ + * @link /pet */ export function useUpdatePet( options: { mutation?: VueMutationObserverOptions diff --git a/examples/vue-query/src/gen/hooks/useUpdatePetWithForm.ts b/examples/vue-query/src/gen/hooks/useUpdatePetWithForm.ts index b22f94de1..6ceceb15f 100644 --- a/examples/vue-query/src/gen/hooks/useUpdatePetWithForm.ts +++ b/examples/vue-query/src/gen/hooks/useUpdatePetWithForm.ts @@ -28,8 +28,7 @@ type UpdatePetWithForm = { } /** * @summary Updates a pet in the store with form data - * @link /pet/:petId - */ + * @link /pet/:petId */ export function useUpdatePetWithForm( refPetId: MaybeRef, refParams?: MaybeRef, diff --git a/examples/vue-query/src/gen/hooks/useUpdateUser.ts b/examples/vue-query/src/gen/hooks/useUpdateUser.ts index 1210bc3d5..206634ee9 100644 --- a/examples/vue-query/src/gen/hooks/useUpdateUser.ts +++ b/examples/vue-query/src/gen/hooks/useUpdateUser.ts @@ -24,8 +24,7 @@ type UpdateUser = { /** * @description This can only be done by the logged in user. * @summary Update user - * @link /user/:username - */ + * @link /user/:username */ export function useUpdateUser( refUsername: MaybeRef, options: { diff --git a/examples/vue-query/src/gen/hooks/useUploadFile.ts b/examples/vue-query/src/gen/hooks/useUploadFile.ts index e5433d4bf..4145bb8b2 100644 --- a/examples/vue-query/src/gen/hooks/useUploadFile.ts +++ b/examples/vue-query/src/gen/hooks/useUploadFile.ts @@ -23,8 +23,7 @@ type UploadFile = { } /** * @summary uploads an image - * @link /pet/:petId/uploadImage - */ + * @link /pet/:petId/uploadImage */ export function useUploadFile( refPetId: MaybeRef, refParams?: MaybeRef, diff --git a/examples/vue-query/src/gen/models/AddPet.ts b/examples/vue-query/src/gen/models/AddPet.ts index 707cee2a6..b2539b4bc 100644 --- a/examples/vue-query/src/gen/models/AddPet.ts +++ b/examples/vue-query/src/gen/models/AddPet.ts @@ -14,7 +14,6 @@ export type AddPetMutationRequest = Pet * @description Successful operation */ export type AddPetMutationResponse = Pet - export namespace AddPetMutation { export type Response = AddPetMutationResponse export type Request = AddPetMutationRequest diff --git a/examples/vue-query/src/gen/models/CreateUser.ts b/examples/vue-query/src/gen/models/CreateUser.ts index 7cb55e840..40b1e23c7 100644 --- a/examples/vue-query/src/gen/models/CreateUser.ts +++ b/examples/vue-query/src/gen/models/CreateUser.ts @@ -11,7 +11,6 @@ export type CreateUserError = User * @description Created user object */ export type CreateUserMutationRequest = User - export namespace CreateUserMutation { export type Response = CreateUserMutationResponse export type Request = CreateUserMutationRequest diff --git a/examples/vue-query/src/gen/models/CreateUsersWithListInput.ts b/examples/vue-query/src/gen/models/CreateUsersWithListInput.ts index d7c8230a1..66918deab 100644 --- a/examples/vue-query/src/gen/models/CreateUsersWithListInput.ts +++ b/examples/vue-query/src/gen/models/CreateUsersWithListInput.ts @@ -11,7 +11,6 @@ export type CreateUsersWithListInputMutationRequest = User[] * @description Successful operation */ export type CreateUsersWithListInputMutationResponse = User - export namespace CreateUsersWithListInputMutation { export type Response = CreateUsersWithListInputMutationResponse export type Request = CreateUsersWithListInputMutationRequest diff --git a/examples/vue-query/src/gen/models/DeleteOrder.ts b/examples/vue-query/src/gen/models/DeleteOrder.ts index 2853aea43..ae14aa7d0 100644 --- a/examples/vue-query/src/gen/models/DeleteOrder.ts +++ b/examples/vue-query/src/gen/models/DeleteOrder.ts @@ -17,7 +17,6 @@ export type DeleteOrderPathParams = { */ orderId: number } - export namespace DeleteOrderMutation { export type Response = DeleteOrderMutationResponse export type PathParams = DeleteOrderPathParams diff --git a/examples/vue-query/src/gen/models/DeletePet.ts b/examples/vue-query/src/gen/models/DeletePet.ts index 10e8dc176..c33aa24fe 100644 --- a/examples/vue-query/src/gen/models/DeletePet.ts +++ b/examples/vue-query/src/gen/models/DeletePet.ts @@ -19,7 +19,6 @@ export type DeletePetPathParams = { */ petId: number } - export namespace DeletePetMutation { export type Response = DeletePetMutationResponse export type PathParams = DeletePetPathParams diff --git a/examples/vue-query/src/gen/models/DeleteUser.ts b/examples/vue-query/src/gen/models/DeleteUser.ts index ff9cf28a1..410f821e2 100644 --- a/examples/vue-query/src/gen/models/DeleteUser.ts +++ b/examples/vue-query/src/gen/models/DeleteUser.ts @@ -17,7 +17,6 @@ export type DeleteUserPathParams = { */ username: string } - export namespace DeleteUserMutation { export type Response = DeleteUserMutationResponse export type PathParams = DeleteUserPathParams diff --git a/examples/vue-query/src/gen/models/FindPetsByStatus.ts b/examples/vue-query/src/gen/models/FindPetsByStatus.ts index b0fe4373d..a1659b564 100644 --- a/examples/vue-query/src/gen/models/FindPetsByStatus.ts +++ b/examples/vue-query/src/gen/models/FindPetsByStatus.ts @@ -24,7 +24,6 @@ export type FindPetsByStatusQueryParams = { * @description successful operation */ export type FindPetsByStatusQueryResponse = Pet[] - export namespace FindPetsByStatusQuery { export type Response = FindPetsByStatusQueryResponse export type QueryParams = FindPetsByStatusQueryParams diff --git a/examples/vue-query/src/gen/models/FindPetsByTags.ts b/examples/vue-query/src/gen/models/FindPetsByTags.ts index 322509ccc..0cb8dcce6 100644 --- a/examples/vue-query/src/gen/models/FindPetsByTags.ts +++ b/examples/vue-query/src/gen/models/FindPetsByTags.ts @@ -17,7 +17,6 @@ export type FindPetsByTagsQueryParams = { * @description successful operation */ export type FindPetsByTagsQueryResponse = Pet[] - export namespace FindPetsByTagsQuery { export type Response = FindPetsByTagsQueryResponse export type QueryParams = FindPetsByTagsQueryParams diff --git a/examples/vue-query/src/gen/models/GetInventory.ts b/examples/vue-query/src/gen/models/GetInventory.ts index 9cc349e13..324e4150a 100644 --- a/examples/vue-query/src/gen/models/GetInventory.ts +++ b/examples/vue-query/src/gen/models/GetInventory.ts @@ -4,7 +4,6 @@ export type GetInventoryQueryResponse = { [key: string]: number } - export namespace GetInventoryQuery { export type Response = GetInventoryQueryResponse } diff --git a/examples/vue-query/src/gen/models/GetOrderById.ts b/examples/vue-query/src/gen/models/GetOrderById.ts index c128dfb06..0a3fa5d98 100644 --- a/examples/vue-query/src/gen/models/GetOrderById.ts +++ b/examples/vue-query/src/gen/models/GetOrderById.ts @@ -22,7 +22,6 @@ export type GetOrderByIdPathParams = { * @description successful operation */ export type GetOrderByIdQueryResponse = Order - export namespace GetOrderByIdQuery { export type Response = GetOrderByIdQueryResponse export type PathParams = GetOrderByIdPathParams diff --git a/examples/vue-query/src/gen/models/GetPetById.ts b/examples/vue-query/src/gen/models/GetPetById.ts index f92178bc9..282d8593c 100644 --- a/examples/vue-query/src/gen/models/GetPetById.ts +++ b/examples/vue-query/src/gen/models/GetPetById.ts @@ -22,7 +22,6 @@ export type GetPetByIdPathParams = { * @description successful operation */ export type GetPetByIdQueryResponse = Pet - export namespace GetPetByIdQuery { export type Response = GetPetByIdQueryResponse export type PathParams = GetPetByIdPathParams diff --git a/examples/vue-query/src/gen/models/GetUserByName.ts b/examples/vue-query/src/gen/models/GetUserByName.ts index cc0cb2448..dde7d23e6 100644 --- a/examples/vue-query/src/gen/models/GetUserByName.ts +++ b/examples/vue-query/src/gen/models/GetUserByName.ts @@ -22,7 +22,6 @@ export type GetUserByNamePathParams = { * @description successful operation */ export type GetUserByNameQueryResponse = User - export namespace GetUserByNameQuery { export type Response = GetUserByNameQueryResponse export type PathParams = GetUserByNamePathParams diff --git a/examples/vue-query/src/gen/models/LoginUser.ts b/examples/vue-query/src/gen/models/LoginUser.ts index be4a135d3..16589cf45 100644 --- a/examples/vue-query/src/gen/models/LoginUser.ts +++ b/examples/vue-query/src/gen/models/LoginUser.ts @@ -20,7 +20,6 @@ export type LoginUserQueryParams = { * @description successful operation */ export type LoginUserQueryResponse = string - export namespace LoginUserQuery { export type Response = LoginUserQueryResponse export type QueryParams = LoginUserQueryParams diff --git a/examples/vue-query/src/gen/models/LogoutUser.ts b/examples/vue-query/src/gen/models/LogoutUser.ts index b62c99120..e26dc60fb 100644 --- a/examples/vue-query/src/gen/models/LogoutUser.ts +++ b/examples/vue-query/src/gen/models/LogoutUser.ts @@ -4,7 +4,6 @@ export type LogoutUserError = any | null export type LogoutUserQueryResponse = any | null - export namespace LogoutUserQuery { export type Response = LogoutUserQueryResponse export type Errors = LogoutUserError diff --git a/examples/vue-query/src/gen/models/PlaceOrder.ts b/examples/vue-query/src/gen/models/PlaceOrder.ts index c467ec22d..44611f953 100644 --- a/examples/vue-query/src/gen/models/PlaceOrder.ts +++ b/examples/vue-query/src/gen/models/PlaceOrder.ts @@ -11,7 +11,6 @@ export type PlaceOrderMutationRequest = Order * @description successful operation */ export type PlaceOrderMutationResponse = Order - export namespace PlaceOrderMutation { export type Response = PlaceOrderMutationResponse export type Request = PlaceOrderMutationRequest diff --git a/examples/vue-query/src/gen/models/UpdatePet.ts b/examples/vue-query/src/gen/models/UpdatePet.ts index 07f988832..0aa4475c0 100644 --- a/examples/vue-query/src/gen/models/UpdatePet.ts +++ b/examples/vue-query/src/gen/models/UpdatePet.ts @@ -24,7 +24,6 @@ export type UpdatePetMutationRequest = Pet * @description Successful operation */ export type UpdatePetMutationResponse = Pet - export namespace UpdatePetMutation { export type Response = UpdatePetMutationResponse export type Request = UpdatePetMutationRequest diff --git a/examples/vue-query/src/gen/models/UpdatePetWithForm.ts b/examples/vue-query/src/gen/models/UpdatePetWithForm.ts index d83b963e5..1073a59e5 100644 --- a/examples/vue-query/src/gen/models/UpdatePetWithForm.ts +++ b/examples/vue-query/src/gen/models/UpdatePetWithForm.ts @@ -25,7 +25,6 @@ export type UpdatePetWithFormQueryParams = { */ status?: string } - export namespace UpdatePetWithFormMutation { export type Response = UpdatePetWithFormMutationResponse export type PathParams = UpdatePetWithFormPathParams diff --git a/examples/vue-query/src/gen/models/UpdateUser.ts b/examples/vue-query/src/gen/models/UpdateUser.ts index 92ad6c987..a200acb1c 100644 --- a/examples/vue-query/src/gen/models/UpdateUser.ts +++ b/examples/vue-query/src/gen/models/UpdateUser.ts @@ -19,7 +19,6 @@ export type UpdateUserPathParams = { * @description Update an existent user in the store */ export type UpdateUserMutationRequest = User - export namespace UpdateUserMutation { export type Response = UpdateUserMutationResponse export type Request = UpdateUserMutationRequest diff --git a/examples/vue-query/src/gen/models/UploadFile.ts b/examples/vue-query/src/gen/models/UploadFile.ts index 66e8d1105..3d823f09a 100644 --- a/examples/vue-query/src/gen/models/UploadFile.ts +++ b/examples/vue-query/src/gen/models/UploadFile.ts @@ -22,7 +22,6 @@ export type UploadFileQueryParams = { * @description successful operation */ export type UploadFileMutationResponse = ApiResponse - export namespace UploadFileMutation { export type Response = UploadFileMutationResponse export type Request = UploadFileMutationRequest diff --git a/examples/zod/src/gen/zod/addPetRequestSchema.ts b/examples/zod/src/gen/zod/addPetRequestSchema.ts index bd158fbdd..56a7c4cec 100644 --- a/examples/zod/src/gen/zod/addPetRequestSchema.ts +++ b/examples/zod/src/gen/zod/addPetRequestSchema.ts @@ -1,7 +1,6 @@ -import { z } from 'zod' - import { categorySchema } from './categorySchema' import { tagSchema } from './tagSchema' +import { z } from 'zod' export const addPetRequestSchema = z.object({ id: z.number().optional(), diff --git a/examples/zod/src/gen/zod/addPetSchema.ts b/examples/zod/src/gen/zod/addPetSchema.ts index 18330949a..c27a6744b 100644 --- a/examples/zod/src/gen/zod/addPetSchema.ts +++ b/examples/zod/src/gen/zod/addPetSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { addPetRequestSchema } from './addPetRequestSchema' import { petSchema } from './petSchema' diff --git a/examples/zod/src/gen/zod/createUserSchema.ts b/examples/zod/src/gen/zod/createUserSchema.ts index ca8dea957..0a4b4ee5f 100644 --- a/examples/zod/src/gen/zod/createUserSchema.ts +++ b/examples/zod/src/gen/zod/createUserSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' export const createUserMutationResponseSchema = z.any() diff --git a/examples/zod/src/gen/zod/createUsersWithListInputSchema.ts b/examples/zod/src/gen/zod/createUsersWithListInputSchema.ts index 99103e6a7..47c72e9ef 100644 --- a/examples/zod/src/gen/zod/createUsersWithListInputSchema.ts +++ b/examples/zod/src/gen/zod/createUsersWithListInputSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' /** diff --git a/examples/zod/src/gen/zod/customerSchema.ts b/examples/zod/src/gen/zod/customerSchema.ts index 441c21129..226d98f68 100644 --- a/examples/zod/src/gen/zod/customerSchema.ts +++ b/examples/zod/src/gen/zod/customerSchema.ts @@ -1,6 +1,5 @@ -import { z } from 'zod' - import { addressSchema } from './addressSchema' +import { z } from 'zod' export const customerSchema = z.object({ id: z.number().optional(), diff --git a/examples/zod/src/gen/zod/findPetsByStatusSchema.ts b/examples/zod/src/gen/zod/findPetsByStatusSchema.ts index befd8672a..f51ef02a9 100644 --- a/examples/zod/src/gen/zod/findPetsByStatusSchema.ts +++ b/examples/zod/src/gen/zod/findPetsByStatusSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zod/src/gen/zod/findPetsByTagsSchema.ts b/examples/zod/src/gen/zod/findPetsByTagsSchema.ts index fe5a5dde5..b8ccea3fd 100644 --- a/examples/zod/src/gen/zod/findPetsByTagsSchema.ts +++ b/examples/zod/src/gen/zod/findPetsByTagsSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zod/src/gen/zod/getOrderByIdSchema.ts b/examples/zod/src/gen/zod/getOrderByIdSchema.ts index a15d43ad8..580ce06f6 100644 --- a/examples/zod/src/gen/zod/getOrderByIdSchema.ts +++ b/examples/zod/src/gen/zod/getOrderByIdSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { orderSchema } from './orderSchema' /** diff --git a/examples/zod/src/gen/zod/getPetByIdSchema.ts b/examples/zod/src/gen/zod/getPetByIdSchema.ts index cba0968e7..3790a7665 100644 --- a/examples/zod/src/gen/zod/getPetByIdSchema.ts +++ b/examples/zod/src/gen/zod/getPetByIdSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zod/src/gen/zod/getUserByNameSchema.ts b/examples/zod/src/gen/zod/getUserByNameSchema.ts index d711648ee..2c0c0a8ac 100644 --- a/examples/zod/src/gen/zod/getUserByNameSchema.ts +++ b/examples/zod/src/gen/zod/getUserByNameSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' /** diff --git a/examples/zod/src/gen/zod/petSchema.ts b/examples/zod/src/gen/zod/petSchema.ts index 8abfc3b5c..4d99a5f3c 100644 --- a/examples/zod/src/gen/zod/petSchema.ts +++ b/examples/zod/src/gen/zod/petSchema.ts @@ -1,7 +1,6 @@ -import { z } from 'zod' - import { categorySchema } from './categorySchema' import { tagSchema } from './tagSchema' +import { z } from 'zod' export const petSchema = z.object({ id: z.number().optional(), diff --git a/examples/zod/src/gen/zod/placeOrderPatchSchema.ts b/examples/zod/src/gen/zod/placeOrderPatchSchema.ts index 6eb675d97..4eb593302 100644 --- a/examples/zod/src/gen/zod/placeOrderPatchSchema.ts +++ b/examples/zod/src/gen/zod/placeOrderPatchSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { orderSchema } from './orderSchema' /** diff --git a/examples/zod/src/gen/zod/placeOrderSchema.ts b/examples/zod/src/gen/zod/placeOrderSchema.ts index 622846b9d..65b37da5e 100644 --- a/examples/zod/src/gen/zod/placeOrderSchema.ts +++ b/examples/zod/src/gen/zod/placeOrderSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { orderSchema } from './orderSchema' /** diff --git a/examples/zod/src/gen/zod/updatePetSchema.ts b/examples/zod/src/gen/zod/updatePetSchema.ts index 5d7ab4c39..6db4bf179 100644 --- a/examples/zod/src/gen/zod/updatePetSchema.ts +++ b/examples/zod/src/gen/zod/updatePetSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zod/src/gen/zod/updateUserSchema.ts b/examples/zod/src/gen/zod/updateUserSchema.ts index eb6a3fd43..85c246aa9 100644 --- a/examples/zod/src/gen/zod/updateUserSchema.ts +++ b/examples/zod/src/gen/zod/updateUserSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' /** diff --git a/examples/zod/src/gen/zod/uploadFileSchema.ts b/examples/zod/src/gen/zod/uploadFileSchema.ts index e84c9adb7..7865a96ad 100644 --- a/examples/zod/src/gen/zod/uploadFileSchema.ts +++ b/examples/zod/src/gen/zod/uploadFileSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { apiResponseSchema } from './apiResponseSchema' export const uploadFileMutationRequestSchema = z.string() diff --git a/examples/zod/src/gen/zod/userArraySchema.ts b/examples/zod/src/gen/zod/userArraySchema.ts index df207eb22..9c642aea8 100644 --- a/examples/zod/src/gen/zod/userArraySchema.ts +++ b/examples/zod/src/gen/zod/userArraySchema.ts @@ -1,5 +1,4 @@ -import { z } from 'zod' - import { userSchema } from './userSchema' +import { z } from 'zod' export const userArraySchema = z.array(z.lazy(() => userSchema).schema) diff --git a/examples/zodios/src/gen/zod/addPetRequestSchema.ts b/examples/zodios/src/gen/zod/addPetRequestSchema.ts index bd158fbdd..56a7c4cec 100644 --- a/examples/zodios/src/gen/zod/addPetRequestSchema.ts +++ b/examples/zodios/src/gen/zod/addPetRequestSchema.ts @@ -1,7 +1,6 @@ -import { z } from 'zod' - import { categorySchema } from './categorySchema' import { tagSchema } from './tagSchema' +import { z } from 'zod' export const addPetRequestSchema = z.object({ id: z.number().optional(), diff --git a/examples/zodios/src/gen/zod/addPetSchema.ts b/examples/zodios/src/gen/zod/addPetSchema.ts index 18330949a..c27a6744b 100644 --- a/examples/zodios/src/gen/zod/addPetSchema.ts +++ b/examples/zodios/src/gen/zod/addPetSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { addPetRequestSchema } from './addPetRequestSchema' import { petSchema } from './petSchema' diff --git a/examples/zodios/src/gen/zod/createUserSchema.ts b/examples/zodios/src/gen/zod/createUserSchema.ts index ca8dea957..0a4b4ee5f 100644 --- a/examples/zodios/src/gen/zod/createUserSchema.ts +++ b/examples/zodios/src/gen/zod/createUserSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' export const createUserMutationResponseSchema = z.any() diff --git a/examples/zodios/src/gen/zod/createUsersWithListInputSchema.ts b/examples/zodios/src/gen/zod/createUsersWithListInputSchema.ts index 99103e6a7..47c72e9ef 100644 --- a/examples/zodios/src/gen/zod/createUsersWithListInputSchema.ts +++ b/examples/zodios/src/gen/zod/createUsersWithListInputSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' /** diff --git a/examples/zodios/src/gen/zod/customerSchema.ts b/examples/zodios/src/gen/zod/customerSchema.ts index 441c21129..226d98f68 100644 --- a/examples/zodios/src/gen/zod/customerSchema.ts +++ b/examples/zodios/src/gen/zod/customerSchema.ts @@ -1,6 +1,5 @@ -import { z } from 'zod' - import { addressSchema } from './addressSchema' +import { z } from 'zod' export const customerSchema = z.object({ id: z.number().optional(), diff --git a/examples/zodios/src/gen/zod/findPetsByStatusSchema.ts b/examples/zodios/src/gen/zod/findPetsByStatusSchema.ts index befd8672a..f51ef02a9 100644 --- a/examples/zodios/src/gen/zod/findPetsByStatusSchema.ts +++ b/examples/zodios/src/gen/zod/findPetsByStatusSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zodios/src/gen/zod/findPetsByTagsSchema.ts b/examples/zodios/src/gen/zod/findPetsByTagsSchema.ts index fe5a5dde5..b8ccea3fd 100644 --- a/examples/zodios/src/gen/zod/findPetsByTagsSchema.ts +++ b/examples/zodios/src/gen/zod/findPetsByTagsSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zodios/src/gen/zod/getOrderByIdSchema.ts b/examples/zodios/src/gen/zod/getOrderByIdSchema.ts index a15d43ad8..580ce06f6 100644 --- a/examples/zodios/src/gen/zod/getOrderByIdSchema.ts +++ b/examples/zodios/src/gen/zod/getOrderByIdSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { orderSchema } from './orderSchema' /** diff --git a/examples/zodios/src/gen/zod/getPetByIdSchema.ts b/examples/zodios/src/gen/zod/getPetByIdSchema.ts index cba0968e7..3790a7665 100644 --- a/examples/zodios/src/gen/zod/getPetByIdSchema.ts +++ b/examples/zodios/src/gen/zod/getPetByIdSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zodios/src/gen/zod/getUserByNameSchema.ts b/examples/zodios/src/gen/zod/getUserByNameSchema.ts index d711648ee..2c0c0a8ac 100644 --- a/examples/zodios/src/gen/zod/getUserByNameSchema.ts +++ b/examples/zodios/src/gen/zod/getUserByNameSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' /** diff --git a/examples/zodios/src/gen/zod/petSchema.ts b/examples/zodios/src/gen/zod/petSchema.ts index 8abfc3b5c..4d99a5f3c 100644 --- a/examples/zodios/src/gen/zod/petSchema.ts +++ b/examples/zodios/src/gen/zod/petSchema.ts @@ -1,7 +1,6 @@ -import { z } from 'zod' - import { categorySchema } from './categorySchema' import { tagSchema } from './tagSchema' +import { z } from 'zod' export const petSchema = z.object({ id: z.number().optional(), diff --git a/examples/zodios/src/gen/zod/placeOrderPatchSchema.ts b/examples/zodios/src/gen/zod/placeOrderPatchSchema.ts index 6eb675d97..4eb593302 100644 --- a/examples/zodios/src/gen/zod/placeOrderPatchSchema.ts +++ b/examples/zodios/src/gen/zod/placeOrderPatchSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { orderSchema } from './orderSchema' /** diff --git a/examples/zodios/src/gen/zod/placeOrderSchema.ts b/examples/zodios/src/gen/zod/placeOrderSchema.ts index 622846b9d..65b37da5e 100644 --- a/examples/zodios/src/gen/zod/placeOrderSchema.ts +++ b/examples/zodios/src/gen/zod/placeOrderSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { orderSchema } from './orderSchema' /** diff --git a/examples/zodios/src/gen/zod/updatePetSchema.ts b/examples/zodios/src/gen/zod/updatePetSchema.ts index 5d7ab4c39..6db4bf179 100644 --- a/examples/zodios/src/gen/zod/updatePetSchema.ts +++ b/examples/zodios/src/gen/zod/updatePetSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { petSchema } from './petSchema' /** diff --git a/examples/zodios/src/gen/zod/updateUserSchema.ts b/examples/zodios/src/gen/zod/updateUserSchema.ts index eb6a3fd43..85c246aa9 100644 --- a/examples/zodios/src/gen/zod/updateUserSchema.ts +++ b/examples/zodios/src/gen/zod/updateUserSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { userSchema } from './userSchema' /** diff --git a/examples/zodios/src/gen/zod/uploadFileSchema.ts b/examples/zodios/src/gen/zod/uploadFileSchema.ts index e84c9adb7..7865a96ad 100644 --- a/examples/zodios/src/gen/zod/uploadFileSchema.ts +++ b/examples/zodios/src/gen/zod/uploadFileSchema.ts @@ -1,5 +1,4 @@ import { z } from 'zod' - import { apiResponseSchema } from './apiResponseSchema' export const uploadFileMutationRequestSchema = z.string() diff --git a/examples/zodios/src/gen/zod/userArraySchema.ts b/examples/zodios/src/gen/zod/userArraySchema.ts index df207eb22..9c642aea8 100644 --- a/examples/zodios/src/gen/zod/userArraySchema.ts +++ b/examples/zodios/src/gen/zod/userArraySchema.ts @@ -1,5 +1,4 @@ -import { z } from 'zod' - import { userSchema } from './userSchema' +import { z } from 'zod' export const userArraySchema = z.array(z.lazy(() => userSchema).schema) diff --git a/examples/zodios/src/gen/zodios.ts b/examples/zodios/src/gen/zodios.ts index 239e5e043..ad680a70f 100644 --- a/examples/zodios/src/gen/zodios.ts +++ b/examples/zodios/src/gen/zodios.ts @@ -517,7 +517,5 @@ const endpoints = makeApi([ ], }, ]) - export const api = new Zodios('https://petstore3.swagger.io/api/v3', endpoints) - export default api diff --git a/package.json b/package.json index dd9f3487a..7c52de3fe 100644 --- a/package.json +++ b/package.json @@ -54,11 +54,11 @@ "//changeset:beta:exit": "changeset pre exit" }, "devDependencies": { - "@changesets/cli": "^2.26.2", "@changesets/changelog-github": "^0.4.8", + "@changesets/cli": "^2.26.2", "@kubb/eslint-config": "workspace:*", "@kubb/ts-config": "workspace:*", - "@types/node": "^20.9.4", + "@types/node": "^20.10.0", "@vitest/coverage-v8": "^0.34.6", "@vitest/ui": "^0.34.6", "bun-types": "^1.0.14", diff --git a/packages/cli/package.json b/packages/cli/package.json index 784896f5c..5cd2537c4 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -65,7 +65,7 @@ "@kubb/swagger": "workspace:*", "@kubb/ts-config": "workspace:*", "@kubb/tsup-config": "workspace:*", - "@types/node": "^20.9.4", + "@types/node": "^20.10.0", "source-map-support": "^0.5.21", "tsup": "^8.0.1", "typescript": "^5.3.2" diff --git a/packages/config/eslint-config/src/ignores.ts b/packages/config/eslint-config/src/ignores.ts index c0eac7600..83146da4d 100644 --- a/packages/config/eslint-config/src/ignores.ts +++ b/packages/config/eslint-config/src/ignores.ts @@ -1,4 +1,4 @@ -export const defaultIgnores = ['dist/**', 'coverage/**', 'mocks/**', '*.d.ts', '*.config.ts'] +export const defaultIgnores = ['dist/**', 'coverage/**', 'mocks/**', '*.d.ts', '*.config.ts', 'templates/**'] /** * When using in a monorepo(with a `packages` folder) we need to append `**\/` diff --git a/packages/config/eslint-config/src/rules.ts b/packages/config/eslint-config/src/rules.ts index 644252043..9b08a72a5 100644 --- a/packages/config/eslint-config/src/rules.ts +++ b/packages/config/eslint-config/src/rules.ts @@ -17,7 +17,6 @@ export const rules = { disallowTypeAnnotations: false, }, ], - '@typescript-eslint/explicit-function-return-type': 'error', '@typescript-eslint/no-unsafe-assignment': 'warn', '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/await-thenable': 'off', diff --git a/packages/config/tsup-config/package.json b/packages/config/tsup-config/package.json index 3285c1245..e31c1d2d7 100644 --- a/packages/config/tsup-config/package.json +++ b/packages/config/tsup-config/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "@kubb/ts-config": "workspace:*", - "@types/node": "^20.9.4", + "@types/node": "^20.10.0", "tsup": "^8.0.1" }, "peerDependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index 9c5489d6d..18d173499 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -28,6 +28,11 @@ "require": "./dist/utils.cjs", "default": "./dist/utils.cjs" }, + "./transformers": { + "import": "./dist/transformers.js", + "require": "./dist/transformers.cjs", + "default": "./dist/transformers.cjs" + }, "./package.json": "./package.json", "./*": "./*", "./globals": { diff --git a/packages/core/src/FileManager.test.ts b/packages/core/src/FileManager.test.ts index 4b7154a68..acfe8e121 100644 --- a/packages/core/src/FileManager.test.ts +++ b/packages/core/src/FileManager.test.ts @@ -579,4 +579,6 @@ export const test2 = 3;`, expect(combineImports(importsWithoutSource, [])).toEqual([imports[0], imports[1]]) }) + + test.todo('if combineImports is excluding imports when import path and file path are the same') }) diff --git a/packages/core/src/FileManager.ts b/packages/core/src/FileManager.ts index a55d81aa7..c8f2a0553 100644 --- a/packages/core/src/FileManager.ts +++ b/packages/core/src/FileManager.ts @@ -8,9 +8,9 @@ import * as factory from '@kubb/parser/factory' import isEqual from 'lodash.isequal' import { orderBy } from 'natural-orderby' -import { read } from './utils/read.ts' +import transformers from './transformers/index.ts' +import { getRelativePath, read } from './utils/read.ts' import { timeout } from './utils/timeout.ts' -import { transformers } from './utils/transformers/index.ts' import { write } from './utils/write.ts' import { BarrelManager } from './BarrelManager.ts' @@ -28,7 +28,14 @@ export namespace KubbFile { * @example ["useState"] * @example "React" */ - name: string | Array + name: + | string + | Array< + string | { + propertyName: string + name?: string + } + > /** * Path for the import * @xample '@kubb/core' @@ -38,6 +45,10 @@ export namespace KubbFile { * Add `type` prefix to the import, this will result in: `import type { Type } from './path'`. */ isTypeOnly?: boolean + /** + * When root is set it will get the path with relative getRelativePath(root, path). + */ + root?: string } export type Export = { @@ -130,10 +141,6 @@ export namespace KubbFile { * This will override `process.env[key]` inside the `source`, see `getFileSource`. */ env?: NodeJS.ProcessEnv - /** - * @deprecated - */ - validate?: boolean } export type ResolvedFile< @@ -205,10 +212,6 @@ export class FileManager { } #validate(file: KubbFile.File): void { - if (!file.validate) { - return - } - if (!file.path.toLowerCase().endsWith(file.baseName.toLowerCase())) { throw new Error(`${file.path} should end with the baseName ${file.baseName}`) } @@ -218,7 +221,7 @@ export class FileManager { ...files: T ): AddResult { const promises = files.map((file) => { - this.#validate(file) + // this.#validate(file) if (file.override) { return this.#add(file) @@ -342,9 +345,24 @@ export class FileManager { const exports = file.exports ? combineExports(file.exports) : [] const imports = file.imports ? combineImports(file.imports, exports, file.source) : [] - const importNodes = imports.map((item) => factory.createImportDeclaration({ name: item.name, path: item.path, isTypeOnly: item.isTypeOnly })) + const importNodes = imports.filter(item => { + // isImportNotNeeded + // trim extName + return item.path !== transformers.trimExtName(file.path) + }).map((item) => { + return factory.createImportDeclaration({ + name: item.name, + path: item.root ? getRelativePath(item.root, item.path) : item.path, + isTypeOnly: item.isTypeOnly, + }) + }) const exportNodes = exports.map((item) => - factory.createExportDeclaration({ name: item.name, path: item.path, isTypeOnly: item.isTypeOnly, asAlias: item.asAlias }) + factory.createExportDeclaration({ + name: item.name, + path: item.path, + isTypeOnly: item.isTypeOnly, + asAlias: item.asAlias, + }) ) return [print([...importNodes, ...exportNodes]), getEnvSource(file.source, file.env)].join('\n') @@ -452,7 +470,7 @@ export function combineImports(imports: Array, exports: Array hasImportInSource(item)) + name = name.filter((item) => typeof item === 'string' ? hasImportInSource(item) : hasImportInSource(item.propertyName)) } const prevByPath = prev.findLast((imp) => imp.path === curr.path && imp.isTypeOnly === curr.isTypeOnly) diff --git a/packages/core/src/PluginManager.ts b/packages/core/src/PluginManager.ts index 0adb6b0e8..b3c918a5c 100644 --- a/packages/core/src/PluginManager.ts +++ b/packages/core/src/PluginManager.ts @@ -3,7 +3,7 @@ import { EventEmitter } from './utils/EventEmitter.ts' import { LogLevel } from './utils/logger.ts' import { Queue } from './utils/Queue.ts' -import { transformReservedWord } from './utils/transformers/transformReservedWord.ts' +import { transformReservedWord } from './transformers/transformReservedWord.ts' import { setUniqueName } from './utils/uniqueName.ts' import { ValidationPluginError } from './errors.ts' import { FileManager } from './FileManager.ts' @@ -129,11 +129,11 @@ export class PluginManager { parameters: [params.baseName, params.directory, params.options as object], }) - if (paths && paths?.length > 1) { - throw new Error( + if (paths && paths?.length > 1 && this.logger.logLevel === LogLevel.debug) { + this.logger.warn( `Cannot return a path where the 'pluginKey' ${params.pluginKey ? JSON.stringify(params.pluginKey) : '"'} is not unique enough\n\nPaths: ${ JSON.stringify(paths, undefined, 2) - }`, + }\n\nFalling back on the first item.\n`, ) } @@ -153,11 +153,11 @@ export class PluginManager { parameters: [params.name, params.type], }) - if (names && names?.length > 1) { - throw new Error( + if (names && names?.length > 1 && this.logger.logLevel === LogLevel.debug) { + this.logger.warn( `Cannot return a name where the 'pluginKey' ${params.pluginKey ? JSON.stringify(params.pluginKey) : '"'} is not unique enough\n\nNames: ${ JSON.stringify(names, undefined, 2) - }`, + }\n\nFalling back on the first item.\n`, ) } @@ -379,7 +379,7 @@ export class PluginManager { const plugins = [...this.plugins].filter((plugin) => plugin.name !== 'core') if (hookName) { - if (this.logger.logLevel === 'info') { + if (this.logger.logLevel === LogLevel.info) { const containsHookName = plugins.some((item) => item[hookName]) if (!containsHookName) { this.logger.warn(`No hook ${hookName} found`) @@ -435,7 +435,7 @@ export class PluginManager { const corePlugin = plugins.find((plugin) => plugin.name === 'core' && plugin[hookName]) - if (this.logger.logLevel === 'info') { + if (this.logger.logLevel === LogLevel.debug) { if (corePlugin) { this.logger.warn(`No hook '${hookName}' for pluginKey '${JSON.stringify(pluginKey)}' found, falling back on the '@kubb/core' plugin`) } else { diff --git a/packages/core/src/SchemaGenerator.ts b/packages/core/src/SchemaGenerator.ts deleted file mode 100644 index 8f0a58a68..000000000 --- a/packages/core/src/SchemaGenerator.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Generator } from './Generator.ts' - -/** - * Abstract class that contains the building blocks for plugins to create their own SchemaGenerator - */ -export abstract class SchemaGenerator extends Generator { - abstract build(schema: TInput, name: string, description?: string): TOutput -} diff --git a/packages/core/src/build.ts b/packages/core/src/build.ts index 3b4ee136f..f08ed4af9 100644 --- a/packages/core/src/build.ts +++ b/packages/core/src/build.ts @@ -116,7 +116,7 @@ async function setup(options: BuildOptions): Promise { logger.spinner.start(`💾 Writing`) } - if (logger.logLevel === 'debug') { + if (logger.logLevel === LogLevel.debug) { logger.info(`PluginKey ${pc.dim(JSON.stringify(plugin.key))} \nwith source\n\n${code}`) } } diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index febe8315e..63e06487d 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -12,7 +12,6 @@ export { PackageManager } from './PackageManager.ts' export { createPlugin, pluginName as name, pluginName } from './plugin.ts' export { PluginManager } from './PluginManager.ts' export { PromiseManager } from './PromiseManager.ts' -export { SchemaGenerator } from './SchemaGenerator.ts' export * from './types.ts' export interface _Register {} diff --git a/packages/core/src/transformers/casing.ts b/packages/core/src/transformers/casing.ts new file mode 100644 index 000000000..eaf6f49c5 --- /dev/null +++ b/packages/core/src/transformers/casing.ts @@ -0,0 +1,9 @@ +import { camelCase as changeCaseCamel, camelCaseTransformMerge, pascalCase as changePascalCase, pascalCaseTransformMerge } from 'change-case' + +export function camelCase(text: string): string { + return changeCaseCamel(text, { delimiter: '', stripRegexp: /[^A-Z0-9$]/gi, transform: camelCaseTransformMerge }) +} + +export function pascalCase(text: string): string { + return changePascalCase(text, { delimiter: '', stripRegexp: /[^A-Z0-9$]/gi, transform: pascalCaseTransformMerge }) +} diff --git a/packages/core/src/utils/transformers/combineCodes.ts b/packages/core/src/transformers/combineCodes.ts similarity index 100% rename from packages/core/src/utils/transformers/combineCodes.ts rename to packages/core/src/transformers/combineCodes.ts diff --git a/packages/core/src/utils/transformers/createJSDocBlockText.test.ts b/packages/core/src/transformers/createJSDocBlockText.test.ts similarity index 52% rename from packages/core/src/utils/transformers/createJSDocBlockText.test.ts rename to packages/core/src/transformers/createJSDocBlockText.test.ts index 2aad20591..b4724013f 100644 --- a/packages/core/src/utils/transformers/createJSDocBlockText.test.ts +++ b/packages/core/src/transformers/createJSDocBlockText.test.ts @@ -3,7 +3,6 @@ import { createJSDocBlockText } from './createJSDocBlockText.ts' describe('jsdoc', () => { test('comments should be converted to jsdocs', () => { expect(createJSDocBlockText({ comments: [] })).toBe('') - expect(createJSDocBlockText({ comments: ['test'], newLine: false })).toBe('/**\n * test\n */') - expect(createJSDocBlockText({ comments: ['test'], newLine: true })).toBe('/**\n * test\n */\n') + expect(createJSDocBlockText({ comments: ['test'] })).toBe('/**\n * test\n */') }) }) diff --git a/packages/core/src/transformers/createJSDocBlockText.ts b/packages/core/src/transformers/createJSDocBlockText.ts new file mode 100644 index 000000000..27e38b613 --- /dev/null +++ b/packages/core/src/transformers/createJSDocBlockText.ts @@ -0,0 +1,9 @@ +export function createJSDocBlockText({ comments }: { comments: Array }): string { + const filteredComments = comments.filter(Boolean) + + if (!filteredComments.length) { + return '' + } + + return `/**\n * ${filteredComments.join('\n * ')}\n */` +} diff --git a/packages/core/src/utils/transformers/escape.test.ts b/packages/core/src/transformers/escape.test.ts similarity index 100% rename from packages/core/src/utils/transformers/escape.test.ts rename to packages/core/src/transformers/escape.test.ts diff --git a/packages/core/src/utils/transformers/escape.ts b/packages/core/src/transformers/escape.ts similarity index 100% rename from packages/core/src/utils/transformers/escape.ts rename to packages/core/src/transformers/escape.ts diff --git a/packages/core/src/utils/transformers/indent.ts b/packages/core/src/transformers/indent.ts similarity index 100% rename from packages/core/src/utils/transformers/indent.ts rename to packages/core/src/transformers/indent.ts diff --git a/packages/core/src/transformers/index.ts b/packages/core/src/transformers/index.ts new file mode 100644 index 000000000..ad4b5ffa1 --- /dev/null +++ b/packages/core/src/transformers/index.ts @@ -0,0 +1,36 @@ +import { camelCase, pascalCase } from './casing.ts' +import { combineCodes } from './combineCodes.ts' +import { createJSDocBlockText } from './createJSDocBlockText.ts' +import { escape, jsStringEscape } from './escape.ts' +import { createIndent } from './indent.ts' +import { nameSorter } from './nameSorter.ts' +import { searchAndReplace } from './searchAndReplace.ts' +import { transformReservedWord } from './transformReservedWord.ts' +import { trim, trimExtName } from './trim.ts' + +export { camelCase, pascalCase } from './casing.ts' +export { combineCodes } from './combineCodes.ts' +export { createJSDocBlockText } from './createJSDocBlockText.ts' +export { escape, jsStringEscape } from './escape.ts' +export { createIndent } from './indent.ts' +export { nameSorter } from './nameSorter.ts' +export { searchAndReplace } from './searchAndReplace.ts' +export { transformReservedWord } from './transformReservedWord.ts' +export { trim, trimExtName } from './trim.ts' + +export default { + combineCodes, + escape, + jsStringEscape, + createIndent, + transformReservedWord, + nameSorter, + searchAndReplace, + trim, + trimExtName, + JSDoc: { + createJSDocBlockText, + }, + camelCase, + pascalCase, +} as const diff --git a/packages/core/src/utils/transformers/nameSorter.ts b/packages/core/src/transformers/nameSorter.ts similarity index 100% rename from packages/core/src/utils/transformers/nameSorter.ts rename to packages/core/src/transformers/nameSorter.ts diff --git a/packages/core/src/utils/transformers/searchAndReplace.ts b/packages/core/src/transformers/searchAndReplace.ts similarity index 100% rename from packages/core/src/utils/transformers/searchAndReplace.ts rename to packages/core/src/transformers/searchAndReplace.ts diff --git a/packages/core/src/utils/transformers/transformReservedWord.test.ts b/packages/core/src/transformers/transformReservedWord.test.ts similarity index 100% rename from packages/core/src/utils/transformers/transformReservedWord.test.ts rename to packages/core/src/transformers/transformReservedWord.test.ts diff --git a/packages/core/src/utils/transformers/transformReservedWord.ts b/packages/core/src/transformers/transformReservedWord.ts similarity index 100% rename from packages/core/src/utils/transformers/transformReservedWord.ts rename to packages/core/src/transformers/transformReservedWord.ts diff --git a/packages/core/src/transformers/trim.ts b/packages/core/src/transformers/trim.ts new file mode 100644 index 000000000..c00390550 --- /dev/null +++ b/packages/core/src/transformers/trim.ts @@ -0,0 +1,7 @@ +export function trim(text: string): string { + return text.replaceAll(/\n/g, '').trim() +} + +export function trimExtName(text: string): string { + return text.replace(/\.[^/.]+$/, '') +} diff --git a/packages/core/src/utils/FunctionParams.ts b/packages/core/src/utils/FunctionParams.ts index 05d56efea..4e5f4ecf5 100644 --- a/packages/core/src/utils/FunctionParams.ts +++ b/packages/core/src/utils/FunctionParams.ts @@ -1,6 +1,7 @@ -import { camelCase, camelCaseTransformMerge } from 'change-case' import { orderBy } from 'natural-orderby' +import transformers from '../transformers/index.ts' + type FunctionParamsASTWithoutType = { name?: string type?: string @@ -66,7 +67,7 @@ export class FunctionParams { return acc } // TODO check whey we still need the camelcase here - const parameterName = name.startsWith('{') ? name : camelCase(name, { delimiter: '', transform: camelCaseTransformMerge }) + const parameterName = name.startsWith('{') ? name : transformers.camelCase(name) if (type) { if (required) { diff --git a/packages/core/src/utils/URLPath.ts b/packages/core/src/utils/URLPath.ts index a113c31d0..94ec442e4 100644 --- a/packages/core/src/utils/URLPath.ts +++ b/packages/core/src/utils/URLPath.ts @@ -1,4 +1,4 @@ -import { camelCase, camelCaseTransformMerge } from 'change-case' +import transformers from '../transformers/index.ts' export type URLObject = { url: string @@ -90,8 +90,8 @@ export class URLPath { if (found) { newPath = found.reduce((prev, curr) => { const pathParam = replacer - ? replacer(camelCase(curr, { delimiter: '', transform: camelCaseTransformMerge })) - : camelCase(curr, { delimiter: '', transform: camelCaseTransformMerge }) + ? replacer(transformers.camelCase(curr)) + : transformers.camelCase(curr) const replacement = `\${${pathParam}}` return prev.replace(curr, replacement) @@ -114,8 +114,8 @@ export class URLPath { item = item.replaceAll('{', '').replaceAll('}', '') const pathParam = replacer - ? replacer(camelCase(item, { delimiter: '', transform: camelCaseTransformMerge })) - : camelCase(item, { delimiter: '', transform: camelCaseTransformMerge }) + ? replacer(transformers.camelCase(item)) + : transformers.camelCase(item) params[pathParam] = pathParam }, this.path) diff --git a/packages/core/src/utils/index.ts b/packages/core/src/utils/index.ts index 4975469f7..5a39c63bc 100644 --- a/packages/core/src/utils/index.ts +++ b/packages/core/src/utils/index.ts @@ -12,7 +12,6 @@ export * from './read.ts' export * from './renderTemplate.ts' export * from './throttle.ts' export * from './timeout.ts' -export * from './transformers/index.ts' export * from './TreeNode.ts' export * from './uniqueName.ts' export * from './URLPath.ts' diff --git a/packages/core/src/utils/transformers/createJSDocBlockText.ts b/packages/core/src/utils/transformers/createJSDocBlockText.ts deleted file mode 100644 index b5156872e..000000000 --- a/packages/core/src/utils/transformers/createJSDocBlockText.ts +++ /dev/null @@ -1,15 +0,0 @@ -export function createJSDocBlockText({ comments, newLine }: { comments: Array; newLine?: boolean }): string { - const filteredComments = comments.filter(Boolean) - - if (!filteredComments.length) { - return '' - } - - const source = `/**\n * ${filteredComments.join('\n * ')}\n */` - - if (newLine) { - return `${source}\n` - } - - return source -} diff --git a/packages/core/src/utils/transformers/index.ts b/packages/core/src/utils/transformers/index.ts deleted file mode 100644 index 56da6b928..000000000 --- a/packages/core/src/utils/transformers/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { combineCodes } from './combineCodes.ts' -import { createJSDocBlockText } from './createJSDocBlockText.ts' -import { escape, jsStringEscape } from './escape.ts' -import { createIndent } from './indent.ts' -import { nameSorter } from './nameSorter.ts' -import { searchAndReplace } from './searchAndReplace.ts' -import { transformReservedWord } from './transformReservedWord.ts' -import { trim } from './trim.ts' - -export const transformers = { - combineCodes, - escape, - jsStringEscape, - createIndent, - transformReservedWord, - nameSorter, - searchAndReplace, - trim, - JSDoc: { - createJSDocBlockText, - }, -} as const diff --git a/packages/core/src/utils/transformers/trim.ts b/packages/core/src/utils/transformers/trim.ts deleted file mode 100644 index e823d780d..000000000 --- a/packages/core/src/utils/transformers/trim.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function trim(text: string): string { - return text.replaceAll(/\n/g, '').trim() -} diff --git a/packages/core/src/utils/write.ts b/packages/core/src/utils/write.ts index 5dcca6306..65519dc78 100644 --- a/packages/core/src/utils/write.ts +++ b/packages/core/src/utils/write.ts @@ -1,4 +1,4 @@ -import { dirname, resolve } from 'node:path' +import { dirname, resolve, extname } from 'node:path' import fs from 'fs-extra' import { switcher } from 'js-runtime' diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts index 1abfce347..4dc81425e 100644 --- a/packages/core/tsup.config.ts +++ b/packages/core/tsup.config.ts @@ -24,4 +24,18 @@ export default defineConfig([ name: 'utils', noExternal: [/find-up/], }, + { + ...optionsCJS, + entry: { + transformers: 'src/transformers/index.ts', + }, + name: 'transformers', + }, + { + ...optionsESM, + entry: { + transformers: 'src/transformers/index.ts', + }, + name: 'transformers', + }, ]) diff --git a/packages/kubb/package.json b/packages/kubb/package.json index 02024113c..cbce96025 100644 --- a/packages/kubb/package.json +++ b/packages/kubb/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@kubb/ts-config": "workspace:*", "@kubb/tsup-config": "workspace:*", - "@types/node": "^20.9.4", + "@types/node": "^20.10.0", "tsup": "^8.0.1", "typescript": "^5.3.2" }, diff --git a/packages/react/src/components/File.test.tsx b/packages/react/src/components/File.test.tsx index 11c3465dd..3859eaca2 100644 --- a/packages/react/src/components/File.test.tsx +++ b/packages/react/src/components/File.test.tsx @@ -43,6 +43,7 @@ describe('', () => { isTypeOnly: undefined, name: 'React', path: 'react', + root: undefined, }, ]) }) @@ -143,6 +144,7 @@ describe('', () => { 'isTypeOnly': undefined, 'name': 'node', 'path': 'node', + 'root': undefined, }]) expect(root.files.length).toBe(2) @@ -153,6 +155,7 @@ describe('', () => { 'isTypeOnly': undefined, 'name': 'node', 'path': 'node', + 'root': undefined, }]) expect(await format(root.files[1]?.source)).toMatchSnapshot() @@ -211,6 +214,7 @@ describe('', () => { 'isTypeOnly': undefined, 'name': 'node', 'path': 'node', + 'root': undefined, }]) expect(root.files.length).toBe(2) @@ -221,6 +225,7 @@ describe('', () => { 'isTypeOnly': undefined, 'name': 'node', 'path': 'node', + 'root': undefined, }]) expect(await format(root.files[1]?.source)).toMatchSnapshot() diff --git a/packages/react/src/components/Function.test.tsx b/packages/react/src/components/Function.test.tsx index 3c8f38258..fb70d7210 100644 --- a/packages/react/src/components/Function.test.tsx +++ b/packages/react/src/components/Function.test.tsx @@ -85,6 +85,25 @@ describe('', () => { expect(await format(root.output)).toMatchSnapshot() }) + test('render multiple functions', async () => { + const Component = () => { + return ( + <> + + 2; + + + + 3; + + + ) + } + const root = createRoot() + root.render() + + expect(await format(root.output)).toMatchSnapshot() + }) // test('render Function ServerComponent(beta)', async () => { // const Component = async () => { // const data = await Promise.resolve('return 2;') diff --git a/packages/react/src/components/Function.tsx b/packages/react/src/components/Function.tsx index b46f94dec..7663615e9 100644 --- a/packages/react/src/components/Function.tsx +++ b/packages/react/src/components/Function.tsx @@ -1,4 +1,5 @@ -import { transformers } from '@kubb/core/utils' +import { print } from '@kubb/parser' +import * as factory from '@kubb/parser/factory' import { Text } from './Text.tsx' @@ -43,7 +44,7 @@ export function Function({ name, export: canExport, async, generics, params, ret <> {JSDoc?.comments && ( <> - {transformers.JSDoc.createJSDocBlockText({ comments: JSDoc.comments })} + {print(factory.createJSDoc({ comments: JSDoc?.comments }))}
)} @@ -83,7 +84,8 @@ export function Function({ name, export: canExport, async, generics, params, ret
{children}
- {'};'} + {'}'} +
) } @@ -100,7 +102,7 @@ export function ArrowFunction({ name, export: canExport, async, generics, params <> {JSDoc?.comments && ( <> - {transformers.JSDoc.createJSDocBlockText({ comments: JSDoc.comments })} + {print(factory.createJSDoc({ comments: JSDoc?.comments }))}
)} @@ -139,6 +141,7 @@ export function ArrowFunction({ name, export: canExport, async, generics, params <> {' => '} {children} +
)} @@ -148,7 +151,8 @@ export function ArrowFunction({ name, export: canExport, async, generics, params
{children}
- {'};'} + {'}'} +
)} diff --git a/packages/react/src/components/Import.tsx b/packages/react/src/components/Import.tsx index 9b6708915..c595b804d 100644 --- a/packages/react/src/components/Import.tsx +++ b/packages/react/src/components/Import.tsx @@ -1,5 +1,3 @@ -import { getRelativePath } from '@kubb/core/utils' - import type { KubbFile } from '@kubb/core' import type { KubbNode } from '../types.ts' @@ -9,14 +7,8 @@ type Props = KubbFile.Import & { * When false, it will add the import to a KubbFile instance(see fileManager). */ print?: boolean - /** - * When root is set it will get the path with relative getRelativePath(root, path). - */ - root?: string } export function Import({ name, root, path, isTypeOnly, print }: Props): KubbNode { - const resolvedPath = root ? getRelativePath(root, path) : path - - return + return } diff --git a/packages/react/src/components/Type.tsx b/packages/react/src/components/Type.tsx index 1689df4a8..859d40a17 100644 --- a/packages/react/src/components/Type.tsx +++ b/packages/react/src/components/Type.tsx @@ -1,4 +1,5 @@ -import { transformers } from '@kubb/core/utils' +import { print } from '@kubb/parser' +import * as factory from '@kubb/parser/factory' import { Text } from './Text.tsx' @@ -29,7 +30,7 @@ export function Type({ name, export: canExport, JSDoc, children }: Props): KubbN <> {JSDoc?.comments && ( <> - {transformers.JSDoc.createJSDocBlockText({ comments: JSDoc.comments })} + {print(factory.createJSDoc({ comments: JSDoc?.comments }))}
)} @@ -44,6 +45,7 @@ export function Type({ name, export: canExport, JSDoc, children }: Props): KubbN {children} +
) } diff --git a/packages/react/src/components/__snapshots__/Function.test.tsx.snap b/packages/react/src/components/__snapshots__/Function.test.tsx.snap index 402a24fb7..3fc62e2da 100644 --- a/packages/react/src/components/__snapshots__/Function.test.tsx.snap +++ b/packages/react/src/components/__snapshots__/Function.test.tsx.snap @@ -35,10 +35,20 @@ exports[` > render Function Generics 1`] = ` exports[` > render Function with comments 1`] = ` "/** - * @deprecated - */ + * @deprecated */ + export async function getData() { return 2 } " `; + +exports[` > render multiple functions 1`] = ` +"export async function getData(): Promise { + 2 +} +export async function getData(): Promise { + 3 +} +" +`; diff --git a/packages/react/src/components/__snapshots__/Type.test.tsx.snap b/packages/react/src/components/__snapshots__/Type.test.tsx.snap index 9a78b767c..2575a48d6 100644 --- a/packages/react/src/components/__snapshots__/Type.test.tsx.snap +++ b/packages/react/src/components/__snapshots__/Type.test.tsx.snap @@ -7,8 +7,8 @@ exports[` > render Function 1`] = ` exports[` > render Function with comments 1`] = ` "/** - * @deprecated - */ + * @deprecated */ + export type Data = number | string " `; diff --git a/packages/react/src/hooks/index.ts b/packages/react/src/hooks/index.ts index dc34a23cf..40e86f149 100644 --- a/packages/react/src/hooks/index.ts +++ b/packages/react/src/hooks/index.ts @@ -6,3 +6,5 @@ export { useMeta } from './useMeta.ts' export { usePackageVersion } from './usePackageVersion.ts' export { usePlugin } from './usePlugin.ts' export { usePluginManager } from './usePluginManager.ts' +export { useResolveName } from './useResolveName.ts' +export { useResolvePath } from './useResolvePath.ts' diff --git a/packages/react/src/hooks/useIndent.ts b/packages/react/src/hooks/useIndent.ts index 356789750..623c25600 100644 --- a/packages/react/src/hooks/useIndent.ts +++ b/packages/react/src/hooks/useIndent.ts @@ -1,4 +1,4 @@ -import { transformers } from '@kubb/core/utils' +import transformers from '@kubb/core/transformers' import type { KubbNode } from '../types.ts' diff --git a/packages/swagger/src/hooks/useResolveName.ts b/packages/react/src/hooks/useResolveName.ts similarity index 54% rename from packages/swagger/src/hooks/useResolveName.ts rename to packages/react/src/hooks/useResolveName.ts index f9e71f6d2..a75640e43 100644 --- a/packages/swagger/src/hooks/useResolveName.ts +++ b/packages/react/src/hooks/useResolveName.ts @@ -1,12 +1,8 @@ import { usePluginManager } from '@kubb/react' -import type { KubbPlugin } from '@kubb/core' +import type { ResolveNameParams } from '@kubb/core' -type Props = { - name: string - pluginKey: KubbPlugin['key'] | undefined - type?: 'file' | 'function' | 'type' -} +type Props = ResolveNameParams export function useResolveName(props: Props): string { const pluginManager = usePluginManager() diff --git a/packages/react/src/hooks/useResolvePath.ts b/packages/react/src/hooks/useResolvePath.ts new file mode 100644 index 000000000..73ff6a70c --- /dev/null +++ b/packages/react/src/hooks/useResolvePath.ts @@ -0,0 +1,11 @@ +import { usePluginManager } from '@kubb/react' + +import type { KubbFile, ResolvePathParams } from '@kubb/core' + +type Props = ResolvePathParams + +export function useResolvePath(props: Props): KubbFile.OptionalPath { + const pluginManager = usePluginManager() + + return pluginManager.resolvePath(props) +} diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index a3a961fa9..892902430 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -1,10 +1,21 @@ -import { transformers } from '@kubb/core/utils' +import transformers from '@kubb/core/transformers' export type { RootType } from './client/index.ts' export { createRoot } from './client/index.ts' export type { AppContextProps } from './components/index.ts' export { File, Function, Text, Type } from './components/index.ts' -export { useApp, useFile, useFileManager, useIndent, useMeta, usePackageVersion, usePlugin, usePluginManager } from './hooks/index.ts' +export { + useApp, + useFile, + useFileManager, + useIndent, + useMeta, + usePackageVersion, + usePlugin, + usePluginManager, + useResolveName, + useResolvePath, +} from './hooks/index.ts' export * from './types.ts' /** * @deprecated use `@kubb/core/utils' import instead diff --git a/packages/react/src/shared/utils/squashExportNodes.ts b/packages/react/src/shared/utils/squashExportNodes.ts index c92696349..5ddd16703 100644 --- a/packages/react/src/shared/utils/squashExportNodes.ts +++ b/packages/react/src/shared/utils/squashExportNodes.ts @@ -21,7 +21,12 @@ export function squashExportNodes(node: DOMElement): Array { if (childNode.nodeName === 'kubb-export' && !childNode.attributes.print) { const attributes = childNode.attributes as React.ComponentProps - exports.push({ name: attributes['name'], path: attributes['path'], isTypeOnly: attributes.isTypeOnly, asAlias: attributes['asAlias'] }) + exports.push({ + name: attributes['name'], + path: attributes['path'], + isTypeOnly: attributes.isTypeOnly, + asAlias: attributes['asAlias'], + }) } } diff --git a/packages/react/src/shared/utils/squashImportNodes.ts b/packages/react/src/shared/utils/squashImportNodes.ts index 7a7c3ec11..0b7274498 100644 --- a/packages/react/src/shared/utils/squashImportNodes.ts +++ b/packages/react/src/shared/utils/squashImportNodes.ts @@ -21,7 +21,12 @@ export function squashImportNodes(node: DOMElement): Array { if (childNode.nodeName === 'kubb-import' && !childNode.attributes.print) { const attributes = childNode.attributes as React.ComponentProps - imports.push({ name: attributes['name'], path: attributes['path'], isTypeOnly: attributes.isTypeOnly }) + imports.push({ + name: attributes.name, + path: attributes.path, + isTypeOnly: attributes.isTypeOnly, + root: attributes.root, + }) } } diff --git a/packages/react/src/shared/utils/squashTextNodes.ts b/packages/react/src/shared/utils/squashTextNodes.ts index 5c048aa0f..6022773aa 100644 --- a/packages/react/src/shared/utils/squashTextNodes.ts +++ b/packages/react/src/shared/utils/squashTextNodes.ts @@ -1,3 +1,4 @@ +import { getRelativePath } from '@kubb/core/utils' import { print } from '@kubb/parser' import * as factory from '@kubb/parser/factory' @@ -27,13 +28,24 @@ export function squashTextNodes(node: DOMElement): string { const getPrintText = (text: string): string => { if (childNode.nodeName === 'kubb-import') { const attributes = childNode.attributes as React.ComponentProps - return print(factory.createImportDeclaration({ name: attributes.name, path: attributes.path, isTypeOnly: attributes.isTypeOnly })) + return print( + factory.createImportDeclaration({ + name: attributes.name, + path: attributes.root ? getRelativePath(attributes.root, attributes.path) : attributes.path, + isTypeOnly: attributes.isTypeOnly, + }), + ) } if (childNode.nodeName === 'kubb-export') { const attributes = childNode.attributes as React.ComponentProps return print( - factory.createExportDeclaration({ name: attributes.name, path: attributes.path, isTypeOnly: attributes.isTypeOnly, asAlias: attributes.asAlias }), + factory.createExportDeclaration({ + name: attributes.name, + path: attributes.path, + isTypeOnly: attributes.isTypeOnly, + asAlias: attributes.asAlias, + }), ) } if (childNode.nodeName === 'kubb-source') { diff --git a/packages/swagger-client/package.json b/packages/swagger-client/package.json index 13b11b6d0..21dc81712 100644 --- a/packages/swagger-client/package.json +++ b/packages/swagger-client/package.json @@ -72,8 +72,7 @@ "@kubb/parser": "workspace:*", "@kubb/react": "workspace:*", "@kubb/swagger": "workspace:*", - "@kubb/swagger-ts": "workspace:*", - "change-case": "^4.1.2" + "@kubb/swagger-ts": "workspace:*" }, "devDependencies": { "@kubb/eslint-config": "workspace:*", diff --git a/packages/swagger-client/src/OperationGenerator.test.tsx b/packages/swagger-client/src/OperationGenerator.test.tsx index 34b94ec21..5246bfb7b 100644 --- a/packages/swagger-client/src/OperationGenerator.test.tsx +++ b/packages/swagger-client/src/OperationGenerator.test.tsx @@ -42,6 +42,7 @@ describe('OperationGenerator', () => { pluginManager: { resolvePath, resolveName, config } as unknown as PluginManager, plugin: { options } as KubbPlugin, contentType: undefined, + override: undefined, }, ) const operation = oas.operation('/pets/{pet_id}', 'get') @@ -80,6 +81,7 @@ describe('OperationGenerator', () => { pluginManager: { resolvePath, resolveName, config } as unknown as PluginManager, plugin: { options } as KubbPlugin, contentType: undefined, + override: undefined, }, ) const operation = oas.operation('/pets/{pet_id}', 'get') @@ -120,6 +122,7 @@ describe('OperationGenerator', () => { pluginManager: { resolvePath, resolveName, config } as unknown as PluginManager, plugin: { options } as KubbPlugin, contentType: undefined, + override: undefined, }, ) const operation = oas.operation('/pets/{pet_id}', 'get') diff --git a/packages/swagger-client/src/OperationGenerator.tsx b/packages/swagger-client/src/OperationGenerator.tsx index 01931590c..7af72e609 100644 --- a/packages/swagger-client/src/OperationGenerator.tsx +++ b/packages/swagger-client/src/OperationGenerator.tsx @@ -4,27 +4,27 @@ import { OperationGenerator as Generator } from '@kubb/swagger' import { Client, Operations } from './components/index.ts' import type { AppContextProps } from '@kubb/react' -import type { HttpMethod, OperationMethodResult, OperationSchemas } from '@kubb/swagger' +import type { OperationMethodResult, OperationSchemas, Paths } from '@kubb/swagger' import type { Operation } from '@kubb/swagger' import type { FileMeta, PluginOptions } from './types.ts' export class OperationGenerator extends Generator { - async all(paths: Record>): OperationMethodResult { + async all(paths: Paths): OperationMethodResult { const { pluginManager, oas, plugin } = this.context const root = createRoot({ logger: pluginManager.logger }) - root.render(, { meta: { pluginManager, plugin } }) + root.render(, { meta: { oas, pluginManager, plugin } }) return root.files } async #generate(operation: Operation, schemas: OperationSchemas, options: PluginOptions['resolvedOptions']): OperationMethodResult { - const { pluginManager, plugin } = this.context + const { oas, pluginManager, plugin } = this.context const root = createRoot>({ logger: pluginManager.logger }) - root.render(, { meta: { pluginManager, plugin: { ...plugin, options }, schemas, operation } }) + root.render(, { meta: { oas, pluginManager, plugin: { ...plugin, options }, schemas, operation } }) return root.files } diff --git a/packages/swagger-client/src/__snapshots__/OperationGenerator.test.tsx.snap b/packages/swagger-client/src/__snapshots__/OperationGenerator.test.tsx.snap index 0c6eee16f..fe1f81a9f 100644 --- a/packages/swagger-client/src/__snapshots__/OperationGenerator.test.tsx.snap +++ b/packages/swagger-client/src/__snapshots__/OperationGenerator.test.tsx.snap @@ -8,8 +8,7 @@ import type { ShowPetByIdQueryResponse, ShowPetByIdPathParams } from './' /** * @summary Info for a specific pet - * @link /pets/:pet_id - */ + * @link /pets/:pet_id */ export async function showPetById( { petId, testId }: ShowPetByIdPathParams, options: Partial[0]> = {}, @@ -22,8 +21,7 @@ export async function showPetById( exports[`OperationGenerator > [GET] should generate code based on a pathParamsType \`inline\` 1`] = ` "/** * @summary Info for a specific pet - * @link /pets/:pet_id - */ + * @link /pets/:pet_id */ export async function showPetById( petId: ShowPetByIdPathParams['pet_id'], testId: ShowPetByIdPathParams['testId'], @@ -42,8 +40,7 @@ export async function showPetById( exports[`OperationGenerator > [GET] should generate code based on a pathParamsType \`object\` 1`] = ` "/** * @summary Info for a specific pet - * @link /pets/:pet_id - */ + * @link /pets/:pet_id */ export async function showPetById( { petId, testId }: ShowPetByIdPathParams, options: Partial[0]> = {}, diff --git a/packages/swagger-client/src/components/Client.tsx b/packages/swagger-client/src/components/Client.tsx index c0175e2de..93ccd810b 100644 --- a/packages/swagger-client/src/components/Client.tsx +++ b/packages/swagger-client/src/components/Client.tsx @@ -1,4 +1,5 @@ -import { FunctionParams, transformers } from '@kubb/core/utils' +import transformers from '@kubb/core/transformers' +import { FunctionParams } from '@kubb/core/utils' import { URLPath } from '@kubb/core/utils' import { File, Function, usePlugin } from '@kubb/react' import { useOperation, useOperationFile, useOperationName, useSchemas } from '@kubb/swagger/hooks' @@ -68,7 +69,7 @@ function Template({ {` return client<${client.generics}>({ ${resolvedClientOptions} - });`} + })`} ) } @@ -78,9 +79,9 @@ ${resolvedClientOptions} {` const { data: resData } = await client<${client.generics}>({ ${resolvedClientOptions} -}); +}) -return resData;`} +return resData`} ) } diff --git a/packages/swagger-client/src/components/Operations.tsx b/packages/swagger-client/src/components/Operations.tsx index 8b7cd7611..3e44694fd 100644 --- a/packages/swagger-client/src/components/Operations.tsx +++ b/packages/swagger-client/src/components/Operations.tsx @@ -1,9 +1,9 @@ import { URLPath } from '@kubb/core/utils' import { File, usePlugin } from '@kubb/react' import { useFile } from '@kubb/react' +import { useOas } from '@kubb/swagger/hooks' -import type { HttpMethod, Oas } from '@kubb/swagger' -import type { Operation } from '@kubb/swagger' +import type { HttpMethod, Oas, Paths } from '@kubb/swagger' import type { ReactNode } from 'react' import type { FileMeta, PluginOptions } from '../types.ts' @@ -28,7 +28,7 @@ function Template({ const defaultTemplates = { default: Template } as const -function getOperations(oas: Oas, paths: Record>): Record { +function getOperations(oas: Oas, paths: Paths): Record { const operations: Record = {} Object.keys(paths).forEach((path) => { @@ -48,8 +48,7 @@ function getOperations(oas: Oas, paths: Record> + paths: Paths /** * This will make it possible to override the default behaviour. */ @@ -57,10 +56,11 @@ type Props = { } export function Operations({ - oas, paths, Template = defaultTemplates.default, }: Props): ReactNode { + const oas = useOas() + const operations = getOperations(oas, paths) return (