diff --git a/examples/advanced/configs/kubb.config.ts b/examples/advanced/configs/kubb.config.ts index d1792c61e..5f2a409b8 100644 --- a/examples/advanced/configs/kubb.config.ts +++ b/examples/advanced/configs/kubb.config.ts @@ -23,7 +23,7 @@ export default defineConfig(() => { barrelType: 'named', }, hooks: { - done: ['npm run typecheck', 'biome format --write ./', 'biome lint --apply-unsafe ./src'], + // done: ['npm run typecheck', 'biome format --write ./', 'biome lint --apply-unsafe ./src'], }, plugins: [ pluginOas({ validate: true }), diff --git a/examples/advanced/src/gen/clients/axios/index.ts b/examples/advanced/src/gen/clients/axios/index.ts deleted file mode 100644 index dbbedbab8..000000000 --- a/examples/advanced/src/gen/clients/axios/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export { operations } from './operations.ts' -export { addPet } from './petService/addPet.ts' -export { deletePet } from './petService/deletePet.ts' -export { findPetsByStatus } from './petService/findPetsByStatus.ts' -export { findPetsByTags } from './petService/findPetsByTags.ts' -export { getPetById } from './petService/getPetById.ts' -export { petService } from './petService/petService.ts' -export { updatePet } from './petService/updatePet.ts' -export { updatePetWithForm } from './petService/updatePetWithForm.ts' -export { uploadFile } from './petService/uploadFile.ts' -export { createPets } from './petsService/createPets.ts' -export { petsService } from './petsService/petsService.ts' -export { createUser } from './userService/createUser.ts' -export { createUsersWithListInput } from './userService/createUsersWithListInput.ts' -export { deleteUser } from './userService/deleteUser.ts' -export { getUserByName } from './userService/getUserByName.ts' -export { loginUser } from './userService/loginUser.ts' -export { logoutUser } from './userService/logoutUser.ts' -export { updateUser } from './userService/updateUser.ts' -export { userService } from './userService/userService.ts' diff --git a/examples/advanced/src/gen/clients/axios/operations.ts b/examples/advanced/src/gen/clients/axios/operations.ts deleted file mode 100644 index 40519e742..000000000 --- a/examples/advanced/src/gen/clients/axios/operations.ts +++ /dev/null @@ -1,66 +0,0 @@ -export const operations = { - createPets: { - path: '/pets/:uuid', - method: 'post', - }, - updatePet: { - path: '/pet', - method: 'put', - }, - addPet: { - path: '/pet', - method: 'post', - }, - findPetsByStatus: { - path: '/pet/findByStatus/:step_id', - method: 'get', - }, - findPetsByTags: { - path: '/pet/findByTags', - method: 'get', - }, - getPetById: { - path: '/pet/:petId', - method: 'get', - }, - updatePetWithForm: { - path: '/pet/:petId', - method: 'post', - }, - deletePet: { - path: '/pet/:petId', - method: 'delete', - }, - uploadFile: { - path: '/pet/:petId/uploadImage', - method: 'post', - }, - createUser: { - path: '/user', - method: 'post', - }, - createUsersWithListInput: { - path: '/user/createWithList', - method: 'post', - }, - loginUser: { - path: '/user/login', - method: 'get', - }, - logoutUser: { - path: '/user/logout', - method: 'get', - }, - getUserByName: { - path: '/user/:username', - method: 'get', - }, - updateUser: { - path: '/user/:username', - method: 'put', - }, - deleteUser: { - path: '/user/:username', - method: 'delete', - }, -} as const diff --git a/examples/advanced/src/gen/clients/axios/petService/addPet.ts b/examples/advanced/src/gen/clients/axios/petService/addPet.ts deleted file mode 100644 index c3011f7f1..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/addPet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { AddPetMutationRequest, AddPetMutationResponse, AddPet405 } from '../../../models/ts/petController/AddPet.ts' - -/** - * @description Add a new pet to the store - * @summary Add a new pet to the store - * {@link /pet} - */ -export async function addPet({ data }: { data: AddPetMutationRequest }, config: Partial> = {}) { - const res = await client({ - method: 'POST', - url: '/pet', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petService/deletePet.ts b/examples/advanced/src/gen/clients/axios/petService/deletePet.ts deleted file mode 100644 index 344486109..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/deletePet.ts +++ /dev/null @@ -1,22 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { DeletePetMutationResponse, DeletePetPathParams, DeletePetHeaderParams, DeletePet400 } from '../../../models/ts/petController/DeletePet.ts' - -/** - * @description delete a pet - * @summary Deletes a pet - * {@link /pet/:petId} - */ -export async function deletePet( - { petId, headers }: { petId: DeletePetPathParams['petId']; headers?: DeletePetHeaderParams }, - config: Partial = {}, -) { - const res = await client({ - method: 'DELETE', - url: `/pet/${petId}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - headers: { ...headers, ...config.headers }, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petService/findPetsByStatus.ts b/examples/advanced/src/gen/clients/axios/petService/findPetsByStatus.ts deleted file mode 100644 index 2d348b847..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/findPetsByStatus.ts +++ /dev/null @@ -1,18 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { FindPetsByStatusQueryResponse, FindPetsByStatusPathParams, FindPetsByStatus400 } from '../../../models/ts/petController/FindPetsByStatus.ts' - -/** - * @description Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - * {@link /pet/findByStatus/:step_id} - */ -export async function findPetsByStatus({ step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: `/pet/findByStatus/${step_id}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petService/findPetsByTags.ts b/examples/advanced/src/gen/clients/axios/petService/findPetsByTags.ts deleted file mode 100644 index 4ddbc74a1..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/findPetsByTags.ts +++ /dev/null @@ -1,28 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { - FindPetsByTagsQueryResponse, - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParams, - FindPetsByTags400, -} from '../../../models/ts/petController/FindPetsByTags.ts' - -/** - * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * {@link /pet/findByTags} - */ -export async function findPetsByTags( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - config: Partial = {}, -) { - const res = await client({ - method: 'GET', - url: '/pet/findByTags', - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - headers: { ...headers, ...config.headers }, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petService/getPetById.ts b/examples/advanced/src/gen/clients/axios/petService/getPetById.ts deleted file mode 100644 index bfe4a8888..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/getPetById.ts +++ /dev/null @@ -1,18 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { GetPetByIdQueryResponse, GetPetByIdPathParams, GetPetById400, GetPetById404 } from '../../../models/ts/petController/GetPetById.ts' - -/** - * @description Returns a single pet - * @summary Find pet by ID - * {@link /pet/:petId} - */ -export async function getPetById({ petId }: { petId: GetPetByIdPathParams['petId'] }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: `/pet/${petId}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petService/index.ts b/examples/advanced/src/gen/clients/axios/petService/index.ts deleted file mode 100644 index 8f9e63aec..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { addPet } from './addPet.ts' -export { deletePet } from './deletePet.ts' -export { findPetsByStatus } from './findPetsByStatus.ts' -export { findPetsByTags } from './findPetsByTags.ts' -export { getPetById } from './getPetById.ts' -export { petService } from './petService.ts' -export { updatePet } from './updatePet.ts' -export { updatePetWithForm } from './updatePetWithForm.ts' -export { uploadFile } from './uploadFile.ts' diff --git a/examples/advanced/src/gen/clients/axios/petService/petService.ts b/examples/advanced/src/gen/clients/axios/petService/petService.ts deleted file mode 100644 index 2b1858912..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/petService.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { addPet } from './addPet.ts' -import { deletePet } from './deletePet.ts' -import { findPetsByStatus } from './findPetsByStatus.ts' -import { findPetsByTags } from './findPetsByTags.ts' -import { getPetById } from './getPetById.ts' -import { updatePet } from './updatePet.ts' -import { updatePetWithForm } from './updatePetWithForm.ts' -import { uploadFile } from './uploadFile.ts' - -export function petService() { - return { updatePet, addPet, findPetsByStatus, findPetsByTags, getPetById, updatePetWithForm, deletePet, uploadFile } -} diff --git a/examples/advanced/src/gen/clients/axios/petService/updatePet.ts b/examples/advanced/src/gen/clients/axios/petService/updatePet.ts deleted file mode 100644 index 53da3c3ff..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/updatePet.ts +++ /dev/null @@ -1,25 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { - UpdatePetMutationRequest, - UpdatePetMutationResponse, - UpdatePet400, - UpdatePet404, - UpdatePet405, -} from '../../../models/ts/petController/UpdatePet.ts' - -/** - * @description Update an existing pet by Id - * @summary Update an existing pet - * {@link /pet} - */ -export async function updatePet({ data }: { data: UpdatePetMutationRequest }, config: Partial> = {}) { - const res = await client({ - method: 'PUT', - url: '/pet', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petService/updatePetWithForm.ts b/examples/advanced/src/gen/clients/axios/petService/updatePetWithForm.ts deleted file mode 100644 index 655fd1e66..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/updatePetWithForm.ts +++ /dev/null @@ -1,26 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { - UpdatePetWithFormMutationResponse, - UpdatePetWithFormPathParams, - UpdatePetWithFormQueryParams, - UpdatePetWithForm405, -} from '../../../models/ts/petController/UpdatePetWithForm.ts' - -/** - * @summary Updates a pet in the store with form data - * {@link /pet/:petId} - */ -export async function updatePetWithForm( - { petId, params }: { petId: UpdatePetWithFormPathParams['petId']; params?: UpdatePetWithFormQueryParams }, - config: Partial = {}, -) { - const res = await client({ - method: 'POST', - url: `/pet/${petId}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petService/uploadFile.ts b/examples/advanced/src/gen/clients/axios/petService/uploadFile.ts deleted file mode 100644 index 24f03b491..000000000 --- a/examples/advanced/src/gen/clients/axios/petService/uploadFile.ts +++ /dev/null @@ -1,28 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { - UploadFileMutationRequest, - UploadFileMutationResponse, - UploadFilePathParams, - UploadFileQueryParams, -} from '../../../models/ts/petController/UploadFile.ts' - -/** - * @summary uploads an image - * {@link /pet/:petId/uploadImage} - */ -export async function uploadFile( - { petId, data, params }: { petId: UploadFilePathParams['petId']; data?: UploadFileMutationRequest; params?: UploadFileQueryParams }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: `/pet/${petId}/uploadImage`, - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - data, - headers: { 'Content-Type': 'application/octet-stream', ...config.headers }, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petsService/createPets.ts b/examples/advanced/src/gen/clients/axios/petsService/createPets.ts deleted file mode 100644 index 20fe180c2..000000000 --- a/examples/advanced/src/gen/clients/axios/petsService/createPets.ts +++ /dev/null @@ -1,34 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { - CreatePetsMutationRequest, - CreatePetsMutationResponse, - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParams, -} from '../../../models/ts/petsController/CreatePets.ts' - -/** - * @summary Create a pet - * {@link /pets/:uuid} - */ -export async function createPets( - { - uuid, - data, - headers, - params, - }: { uuid: CreatePetsPathParams['uuid']; data: CreatePetsMutationRequest; headers: CreatePetsHeaderParams; params?: CreatePetsQueryParams }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: `/pets/${uuid}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - data, - headers: { ...headers, ...config.headers }, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/petsService/index.ts b/examples/advanced/src/gen/clients/axios/petsService/index.ts deleted file mode 100644 index 73b5fe6ac..000000000 --- a/examples/advanced/src/gen/clients/axios/petsService/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { createPets } from './createPets.ts' -export { petsService } from './petsService.ts' diff --git a/examples/advanced/src/gen/clients/axios/petsService/petsService.ts b/examples/advanced/src/gen/clients/axios/petsService/petsService.ts deleted file mode 100644 index aecfa5bdf..000000000 --- a/examples/advanced/src/gen/clients/axios/petsService/petsService.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createPets } from './createPets.ts' - -export function petsService() { - return { createPets } -} diff --git a/examples/advanced/src/gen/clients/axios/userService/createUser.ts b/examples/advanced/src/gen/clients/axios/userService/createUser.ts deleted file mode 100644 index 2be4a741b..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/createUser.ts +++ /dev/null @@ -1,19 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { CreateUserMutationRequest, CreateUserMutationResponse } from '../../../models/ts/userController/CreateUser.ts' - -/** - * @description This can only be done by the logged in user. - * @summary Create user - * {@link /user} - */ -export async function createUser({ data }: { data?: CreateUserMutationRequest }, config: Partial> = {}) { - const res = await client({ - method: 'POST', - url: '/user', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/userService/createUsersWithListInput.ts b/examples/advanced/src/gen/clients/axios/userService/createUsersWithListInput.ts deleted file mode 100644 index dd842f434..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/createUsersWithListInput.ts +++ /dev/null @@ -1,25 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, -} from '../../../models/ts/userController/CreateUsersWithListInput.ts' - -/** - * @description Creates list of users with given input array - * @summary Creates list of users with given input array - * {@link /user/createWithList} - */ -export async function createUsersWithListInput( - { data }: { data?: CreateUsersWithListInputMutationRequest }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: '/user/createWithList', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/userService/deleteUser.ts b/examples/advanced/src/gen/clients/axios/userService/deleteUser.ts deleted file mode 100644 index bcdc6b19d..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/deleteUser.ts +++ /dev/null @@ -1,18 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { DeleteUserMutationResponse, DeleteUserPathParams, DeleteUser400, DeleteUser404 } from '../../../models/ts/userController/DeleteUser.ts' - -/** - * @description This can only be done by the logged in user. - * @summary Delete user - * {@link /user/:username} - */ -export async function deleteUser({ username }: { username: DeleteUserPathParams['username'] }, config: Partial = {}) { - const res = await client({ - method: 'DELETE', - url: `/user/${username}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/userService/getUserByName.ts b/examples/advanced/src/gen/clients/axios/userService/getUserByName.ts deleted file mode 100644 index c41e0e3cc..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/getUserByName.ts +++ /dev/null @@ -1,22 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { - GetUserByNameQueryResponse, - GetUserByNamePathParams, - GetUserByName400, - GetUserByName404, -} from '../../../models/ts/userController/GetUserByName.ts' - -/** - * @summary Get user by user name - * {@link /user/:username} - */ -export async function getUserByName({ username }: { username: GetUserByNamePathParams['username'] }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: `/user/${username}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/userService/index.ts b/examples/advanced/src/gen/clients/axios/userService/index.ts deleted file mode 100644 index d5ce5b29d..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { createUser } from './createUser.ts' -export { createUsersWithListInput } from './createUsersWithListInput.ts' -export { deleteUser } from './deleteUser.ts' -export { getUserByName } from './getUserByName.ts' -export { loginUser } from './loginUser.ts' -export { logoutUser } from './logoutUser.ts' -export { updateUser } from './updateUser.ts' -export { userService } from './userService.ts' diff --git a/examples/advanced/src/gen/clients/axios/userService/loginUser.ts b/examples/advanced/src/gen/clients/axios/userService/loginUser.ts deleted file mode 100644 index 1dcce985d..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/loginUser.ts +++ /dev/null @@ -1,18 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { LoginUserQueryResponse, LoginUserQueryParams, LoginUser400 } from '../../../models/ts/userController/LoginUser.ts' - -/** - * @summary Logs user into the system - * {@link /user/login} - */ -export async function loginUser({ params }: { params?: LoginUserQueryParams }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: '/user/login', - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/userService/logoutUser.ts b/examples/advanced/src/gen/clients/axios/userService/logoutUser.ts deleted file mode 100644 index 613e99a89..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/logoutUser.ts +++ /dev/null @@ -1,17 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { LogoutUserQueryResponse } from '../../../models/ts/userController/LogoutUser.ts' - -/** - * @summary Logs out current logged in user session - * {@link /user/logout} - */ -export async function logoutUser(config: Partial = {}) { - const res = await client({ - method: 'GET', - url: '/user/logout', - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/userService/updateUser.ts b/examples/advanced/src/gen/clients/axios/userService/updateUser.ts deleted file mode 100644 index bf79bd6b2..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/updateUser.ts +++ /dev/null @@ -1,22 +0,0 @@ -import client from '../../../../axios-client.ts' -import type { RequestConfig } from '../../../../axios-client.ts' -import type { UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserPathParams } from '../../../models/ts/userController/UpdateUser.ts' - -/** - * @description This can only be done by the logged in user. - * @summary Update user - * {@link /user/:username} - */ -export async function updateUser( - { username, data }: { username: UpdateUserPathParams['username']; data?: UpdateUserMutationRequest }, - config: Partial> = {}, -) { - const res = await client({ - method: 'PUT', - url: `/user/${username}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return res -} diff --git a/examples/advanced/src/gen/clients/axios/userService/userService.ts b/examples/advanced/src/gen/clients/axios/userService/userService.ts deleted file mode 100644 index feeabc7b4..000000000 --- a/examples/advanced/src/gen/clients/axios/userService/userService.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createUser } from './createUser.ts' -import { createUsersWithListInput } from './createUsersWithListInput.ts' -import { deleteUser } from './deleteUser.ts' -import { getUserByName } from './getUserByName.ts' -import { loginUser } from './loginUser.ts' -import { logoutUser } from './logoutUser.ts' -import { updateUser } from './updateUser.ts' - -export function userService() { - return { createUser, createUsersWithListInput, loginUser, logoutUser, getUserByName, updateUser, deleteUser } -} diff --git a/examples/advanced/src/gen/clients/hooks/index.ts b/examples/advanced/src/gen/clients/hooks/index.ts deleted file mode 100644 index 6ba2ef9e3..000000000 --- a/examples/advanced/src/gen/clients/hooks/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -export type { AddPetMutationKey } from './petController/useAddPet.ts' -export type { DeletePetMutationKey } from './petController/useDeletePet.ts' -export type { FindPetsByStatusQueryKey } from './petController/useFindPetsByStatus.ts' -export type { FindPetsByTagsQueryKey } from './petController/useFindPetsByTags.ts' -export type { FindPetsByTagsInfiniteQueryKey } from './petController/useFindPetsByTagsInfinite.ts' -export type { GetPetByIdQueryKey } from './petController/useGetPetById.ts' -export type { UpdatePetMutationKey } from './petController/useUpdatePet.ts' -export type { UpdatePetWithFormMutationKey } from './petController/useUpdatePetWithForm.ts' -export type { UploadFileMutationKey } from './petController/useUploadFile.ts' -export type { CreatePetsMutationKey } from './petsController/useCreatePets.ts' -export type { CreateUserMutationKey } from './userController/useCreateUser.ts' -export type { CreateUsersWithListInputMutationKey } from './userController/useCreateUsersWithListInput.ts' -export type { DeleteUserMutationKey } from './userController/useDeleteUser.ts' -export type { GetUserByNameQueryKey } from './userController/useGetUserByName.ts' -export type { LoginUserQueryKey } from './userController/useLoginUser.ts' -export type { LogoutUserQueryKey } from './userController/useLogoutUser.ts' -export type { UpdateUserMutationKey } from './userController/useUpdateUser.ts' -export { addPetMutationKey, useAddPet } from './petController/useAddPet.ts' -export { deletePetMutationKey, useDeletePet } from './petController/useDeletePet.ts' -export { findPetsByStatusQueryKey, findPetsByStatusQueryOptions, useFindPetsByStatus } from './petController/useFindPetsByStatus.ts' -export { findPetsByTagsQueryKey, findPetsByTagsQueryOptions, useFindPetsByTags } from './petController/useFindPetsByTags.ts' -export { findPetsByTagsInfiniteQueryKey, findPetsByTagsInfiniteQueryOptions, useFindPetsByTagsInfinite } from './petController/useFindPetsByTagsInfinite.ts' -export { getPetByIdQueryKey, getPetByIdQueryOptions, useGetPetById } from './petController/useGetPetById.ts' -export { updatePetMutationKey, useUpdatePet } from './petController/useUpdatePet.ts' -export { updatePetWithFormMutationKey, useUpdatePetWithForm } from './petController/useUpdatePetWithForm.ts' -export { uploadFileMutationKey, useUploadFile } from './petController/useUploadFile.ts' -export { createPetsMutationKey, useCreatePets } from './petsController/useCreatePets.ts' -export { createUserMutationKey, useCreateUser } from './userController/useCreateUser.ts' -export { createUsersWithListInputMutationKey, useCreateUsersWithListInput } from './userController/useCreateUsersWithListInput.ts' -export { deleteUserMutationKey, useDeleteUser } from './userController/useDeleteUser.ts' -export { getUserByNameQueryKey, getUserByNameQueryOptions, useGetUserByName } from './userController/useGetUserByName.ts' -export { loginUserQueryKey, loginUserQueryOptions, useLoginUser } from './userController/useLoginUser.ts' -export { logoutUserQueryKey, logoutUserQueryOptions, useLogoutUser } from './userController/useLogoutUser.ts' -export { updateUserMutationKey, useUpdateUser } from './userController/useUpdateUser.ts' diff --git a/examples/advanced/src/gen/clients/hooks/petController/index.ts b/examples/advanced/src/gen/clients/hooks/petController/index.ts deleted file mode 100644 index 642717f93..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -export type { AddPetMutationKey } from './useAddPet.ts' -export type { DeletePetMutationKey } from './useDeletePet.ts' -export type { FindPetsByStatusQueryKey } from './useFindPetsByStatus.ts' -export type { FindPetsByTagsQueryKey } from './useFindPetsByTags.ts' -export type { FindPetsByTagsInfiniteQueryKey } from './useFindPetsByTagsInfinite.ts' -export type { GetPetByIdQueryKey } from './useGetPetById.ts' -export type { UpdatePetMutationKey } from './useUpdatePet.ts' -export type { UpdatePetWithFormMutationKey } from './useUpdatePetWithForm.ts' -export type { UploadFileMutationKey } from './useUploadFile.ts' -export { addPetMutationKey, useAddPet } from './useAddPet.ts' -export { deletePetMutationKey, useDeletePet } from './useDeletePet.ts' -export { findPetsByStatusQueryKey, findPetsByStatusQueryOptions, useFindPetsByStatus } from './useFindPetsByStatus.ts' -export { findPetsByTagsQueryKey, findPetsByTagsQueryOptions, useFindPetsByTags } from './useFindPetsByTags.ts' -export { findPetsByTagsInfiniteQueryKey, findPetsByTagsInfiniteQueryOptions, useFindPetsByTagsInfinite } from './useFindPetsByTagsInfinite.ts' -export { getPetByIdQueryKey, getPetByIdQueryOptions, useGetPetById } from './useGetPetById.ts' -export { updatePetMutationKey, useUpdatePet } from './useUpdatePet.ts' -export { updatePetWithFormMutationKey, useUpdatePetWithForm } from './useUpdatePetWithForm.ts' -export { uploadFileMutationKey, useUploadFile } from './useUploadFile.ts' diff --git a/examples/advanced/src/gen/clients/hooks/petController/useAddPet.ts b/examples/advanced/src/gen/clients/hooks/petController/useAddPet.ts deleted file mode 100644 index 2460c68d7..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useAddPet.ts +++ /dev/null @@ -1,43 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { AddPetMutationRequest, AddPetMutationResponse, AddPet405 } from '../../../models/ts/petController/AddPet.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { addPetMutationResponseSchema } from '../../../zod/petController/addPetSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const addPetMutationKey = () => [{ url: '/pet' }] as const - -export type AddPetMutationKey = ReturnType - -/** - * @description Add a new pet to the store - * @summary Add a new pet to the store - * {@link /pet} - */ -async function addPet({ data }: { data: AddPetMutationRequest }, config: Partial> = {}) { - const res = await client({ method: 'POST', url: '/pet', data, ...config }) - return { ...res, data: addPetMutationResponseSchema.parse(res.data) } -} - -/** - * @description Add a new pet to the store - * @summary Add a new pet to the store - * {@link /pet} - */ -export function useAddPet( - options: { - mutation?: UseMutationOptions, AddPet405, { data: AddPetMutationRequest }> - client?: Partial> - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? addPetMutationKey() - - return useMutation, AddPet405, { data: AddPetMutationRequest }>({ - mutationFn: async ({ data }) => { - return addPet({ data }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useDeletePet.ts b/examples/advanced/src/gen/clients/hooks/petController/useDeletePet.ts deleted file mode 100644 index 559dd3b02..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useDeletePet.ts +++ /dev/null @@ -1,52 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { DeletePetMutationResponse, DeletePetPathParams, DeletePetHeaderParams, DeletePet400 } from '../../../models/ts/petController/DeletePet.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { deletePetMutationResponseSchema } from '../../../zod/petController/deletePetSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const deletePetMutationKey = () => [{ url: '/pet/{petId}' }] as const - -export type DeletePetMutationKey = ReturnType - -/** - * @description delete a pet - * @summary Deletes a pet - * {@link /pet/:petId} - */ -async function deletePet({ petId, headers }: { petId: DeletePetPathParams['petId']; headers?: DeletePetHeaderParams }, config: Partial = {}) { - const res = await client({ - method: 'DELETE', - url: `/pet/${petId}`, - headers: { ...headers, ...config.headers }, - ...config, - }) - return { ...res, data: deletePetMutationResponseSchema.parse(res.data) } -} - -/** - * @description delete a pet - * @summary Deletes a pet - * {@link /pet/:petId} - */ -export function useDeletePet( - options: { - mutation?: UseMutationOptions< - ResponseConfig, - DeletePet400, - { petId: DeletePetPathParams['petId']; headers?: DeletePetHeaderParams } - > - client?: Partial - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? deletePetMutationKey() - - return useMutation, DeletePet400, { petId: DeletePetPathParams['petId']; headers?: DeletePetHeaderParams }>({ - mutationFn: async ({ petId, headers }) => { - return deletePet({ petId, headers }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByStatus.ts b/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByStatus.ts deleted file mode 100644 index 1f55d4d41..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByStatus.ts +++ /dev/null @@ -1,63 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { QueryKey, QueryObserverOptions, UseQueryResult } from '../../../../tanstack-query-hook.ts' -import type { FindPetsByStatusQueryResponse, FindPetsByStatusPathParams, FindPetsByStatus400 } from '../../../models/ts/petController/FindPetsByStatus.ts' -import { queryOptions, useQuery } from '../../../../tanstack-query-hook.ts' -import { findPetsByStatusQueryResponseSchema } from '../../../zod/petController/findPetsByStatusSchema.ts' - -export const findPetsByStatusQueryKey = ({ step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }) => - [{ url: '/pet/findByStatus/:step_id', params: { step_id: step_id } }] as const - -export type FindPetsByStatusQueryKey = ReturnType - -/** - * @description Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - * {@link /pet/findByStatus/:step_id} - */ -async function findPetsByStatus({ step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }, config: Partial = {}) { - const res = await client({ method: 'GET', url: `/pet/findByStatus/${step_id}`, ...config }) - return { ...res, data: findPetsByStatusQueryResponseSchema.parse(res.data) } -} - -export function findPetsByStatusQueryOptions({ step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }, config: Partial = {}) { - const queryKey = findPetsByStatusQueryKey({ step_id }) - return queryOptions({ - enabled: !!step_id, - queryKey, - queryFn: async ({ signal }) => { - config.signal = signal - return findPetsByStatus({ step_id }, config) - }, - }) -} - -/** - * @description Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - * {@link /pet/findByStatus/:step_id} - */ -export function useFindPetsByStatus< - TData = ResponseConfig, - TQueryData = ResponseConfig, - TQueryKey extends QueryKey = FindPetsByStatusQueryKey, ->( - { step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }, - options: { - query?: Partial, FindPetsByStatus400, TData, TQueryData, TQueryKey>> - client?: Partial - } = {}, -) { - const { query: queryOptions, client: config = {} } = options ?? {} - const queryKey = queryOptions?.queryKey ?? findPetsByStatusQueryKey({ step_id }) - - const query = useQuery({ - ...(findPetsByStatusQueryOptions({ step_id }, config) as unknown as QueryObserverOptions), - queryKey, - ...(queryOptions as unknown as Omit), - }) as UseQueryResult & { queryKey: TQueryKey } - - query.queryKey = queryKey as TQueryKey - - return query -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTags.ts b/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTags.ts deleted file mode 100644 index 1cfabdb5f..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTags.ts +++ /dev/null @@ -1,78 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { QueryKey, QueryObserverOptions, UseQueryResult } from '../../../../tanstack-query-hook.ts' -import type { - FindPetsByTagsQueryResponse, - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParams, - FindPetsByTags400, -} from '../../../models/ts/petController/FindPetsByTags.ts' -import { queryOptions, useQuery } from '../../../../tanstack-query-hook.ts' -import { findPetsByTagsQueryResponseSchema } from '../../../zod/petController/findPetsByTagsSchema.ts' - -export const findPetsByTagsQueryKey = (params?: FindPetsByTagsQueryParams) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const - -export type FindPetsByTagsQueryKey = ReturnType - -/** - * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * {@link /pet/findByTags} - */ -async function findPetsByTags( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - config: Partial = {}, -) { - const res = await client({ - method: 'GET', - url: '/pet/findByTags', - params, - headers: { ...headers, ...config.headers }, - ...config, - }) - return { ...res, data: findPetsByTagsQueryResponseSchema.parse(res.data) } -} - -export function findPetsByTagsQueryOptions( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - config: Partial = {}, -) { - const queryKey = findPetsByTagsQueryKey(params) - return queryOptions({ - queryKey, - queryFn: async ({ signal }) => { - config.signal = signal - return findPetsByTags({ headers, params }, config) - }, - }) -} - -/** - * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * {@link /pet/findByTags} - */ -export function useFindPetsByTags< - TData = ResponseConfig, - TQueryData = ResponseConfig, - TQueryKey extends QueryKey = FindPetsByTagsQueryKey, ->( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - options: { - query?: Partial, FindPetsByTags400, TData, TQueryData, TQueryKey>> - client?: Partial - } = {}, -) { - const { query: queryOptions, client: config = {} } = options ?? {} - const queryKey = queryOptions?.queryKey ?? findPetsByTagsQueryKey(params) - - const query = useQuery({ - ...(findPetsByTagsQueryOptions({ headers, params }, config) as unknown as QueryObserverOptions), - queryKey, - ...(queryOptions as unknown as Omit), - }) as UseQueryResult & { queryKey: TQueryKey } - - query.queryKey = queryKey as TQueryKey - - return query -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTagsInfinite.ts b/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTagsInfinite.ts deleted file mode 100644 index 1ad543aa0..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useFindPetsByTagsInfinite.ts +++ /dev/null @@ -1,85 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { InfiniteData, QueryKey, InfiniteQueryObserverOptions, UseInfiniteQueryResult } from '../../../../tanstack-query-hook.ts' -import type { - FindPetsByTagsQueryResponse, - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParams, - FindPetsByTags400, -} from '../../../models/ts/petController/FindPetsByTags.ts' -import { infiniteQueryOptions, useInfiniteQuery } from '../../../../tanstack-query-hook.ts' -import { findPetsByTagsQueryResponseSchema } from '../../../zod/petController/findPetsByTagsSchema.ts' - -export const findPetsByTagsInfiniteQueryKey = (params?: FindPetsByTagsQueryParams) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const - -export type FindPetsByTagsInfiniteQueryKey = ReturnType - -/** - * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * {@link /pet/findByTags} - */ -async function findPetsByTags( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - config: Partial = {}, -) { - const res = await client({ - method: 'GET', - url: '/pet/findByTags', - params, - headers: { ...headers, ...config.headers }, - ...config, - }) - return { ...res, data: findPetsByTagsQueryResponseSchema.parse(res.data) } -} - -export function findPetsByTagsInfiniteQueryOptions( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - config: Partial = {}, -) { - const queryKey = findPetsByTagsInfiniteQueryKey(params) - return infiniteQueryOptions({ - queryKey, - queryFn: async ({ signal, pageParam }) => { - config.signal = signal - - if (params) { - params['pageSize'] = pageParam as unknown as FindPetsByTagsQueryParams['pageSize'] - } - return findPetsByTags({ headers, params }, config) - }, - initialPageParam: 0, - getNextPageParam: (lastPage, _allPages, lastPageParam) => (Array.isArray(lastPage.data) && lastPage.data.length === 0 ? undefined : lastPageParam + 1), - getPreviousPageParam: (_firstPage, _allPages, firstPageParam) => (firstPageParam <= 1 ? undefined : firstPageParam - 1), - }) -} - -/** - * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * {@link /pet/findByTags} - */ -export function useFindPetsByTagsInfinite< - TData = InfiniteData>, - TQueryData = ResponseConfig, - TQueryKey extends QueryKey = FindPetsByTagsInfiniteQueryKey, ->( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - options: { - query?: Partial, FindPetsByTags400, TData, TQueryData, TQueryKey>> - client?: Partial - } = {}, -) { - const { query: queryOptions, client: config = {} } = options ?? {} - const queryKey = queryOptions?.queryKey ?? findPetsByTagsInfiniteQueryKey(params) - - const query = useInfiniteQuery({ - ...(findPetsByTagsInfiniteQueryOptions({ headers, params }, config) as unknown as InfiniteQueryObserverOptions), - queryKey, - ...(queryOptions as unknown as Omit), - }) as UseInfiniteQueryResult & { queryKey: TQueryKey } - - query.queryKey = queryKey as TQueryKey - - return query -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useGetPetById.ts b/examples/advanced/src/gen/clients/hooks/petController/useGetPetById.ts deleted file mode 100644 index f724a6189..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useGetPetById.ts +++ /dev/null @@ -1,62 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { QueryKey, QueryObserverOptions, UseQueryResult } from '../../../../tanstack-query-hook.ts' -import type { GetPetByIdQueryResponse, GetPetByIdPathParams, GetPetById400, GetPetById404 } from '../../../models/ts/petController/GetPetById.ts' -import { queryOptions, useQuery } from '../../../../tanstack-query-hook.ts' -import { getPetByIdQueryResponseSchema } from '../../../zod/petController/getPetByIdSchema.ts' - -export const getPetByIdQueryKey = ({ petId }: { petId: GetPetByIdPathParams['petId'] }) => [{ url: '/pet/:petId', params: { petId: petId } }] as const - -export type GetPetByIdQueryKey = ReturnType - -/** - * @description Returns a single pet - * @summary Find pet by ID - * {@link /pet/:petId} - */ -async function getPetById({ petId }: { petId: GetPetByIdPathParams['petId'] }, config: Partial = {}) { - const res = await client({ method: 'GET', url: `/pet/${petId}`, ...config }) - return { ...res, data: getPetByIdQueryResponseSchema.parse(res.data) } -} - -export function getPetByIdQueryOptions({ petId }: { petId: GetPetByIdPathParams['petId'] }, config: Partial = {}) { - const queryKey = getPetByIdQueryKey({ petId }) - return queryOptions({ - enabled: !!petId, - queryKey, - queryFn: async ({ signal }) => { - config.signal = signal - return getPetById({ petId }, config) - }, - }) -} - -/** - * @description Returns a single pet - * @summary Find pet by ID - * {@link /pet/:petId} - */ -export function useGetPetById< - TData = ResponseConfig, - TQueryData = ResponseConfig, - TQueryKey extends QueryKey = GetPetByIdQueryKey, ->( - { petId }: { petId: GetPetByIdPathParams['petId'] }, - options: { - query?: Partial, GetPetById400 | GetPetById404, TData, TQueryData, TQueryKey>> - client?: Partial - } = {}, -) { - const { query: queryOptions, client: config = {} } = options ?? {} - const queryKey = queryOptions?.queryKey ?? getPetByIdQueryKey({ petId }) - - const query = useQuery({ - ...(getPetByIdQueryOptions({ petId }, config) as unknown as QueryObserverOptions), - queryKey, - ...(queryOptions as unknown as Omit), - }) as UseQueryResult & { queryKey: TQueryKey } - - query.queryKey = queryKey as TQueryKey - - return query -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePet.ts b/examples/advanced/src/gen/clients/hooks/petController/useUpdatePet.ts deleted file mode 100644 index 31cb0a177..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePet.ts +++ /dev/null @@ -1,54 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { - UpdatePetMutationRequest, - UpdatePetMutationResponse, - UpdatePet400, - UpdatePet404, - UpdatePet405, -} from '../../../models/ts/petController/UpdatePet.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { updatePetMutationResponseSchema } from '../../../zod/petController/updatePetSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const updatePetMutationKey = () => [{ url: '/pet' }] as const - -export type UpdatePetMutationKey = ReturnType - -/** - * @description Update an existing pet by Id - * @summary Update an existing pet - * {@link /pet} - */ -async function updatePet({ data }: { data: UpdatePetMutationRequest }, config: Partial> = {}) { - const res = await client({ - method: 'PUT', - url: '/pet', - data, - ...config, - }) - return { ...res, data: updatePetMutationResponseSchema.parse(res.data) } -} - -/** - * @description Update an existing pet by Id - * @summary Update an existing pet - * {@link /pet} - */ -export function useUpdatePet( - options: { - mutation?: UseMutationOptions, UpdatePet400 | UpdatePet404 | UpdatePet405, { data: UpdatePetMutationRequest }> - client?: Partial> - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? updatePetMutationKey() - - return useMutation, UpdatePet400 | UpdatePet404 | UpdatePet405, { data: UpdatePetMutationRequest }>({ - mutationFn: async ({ data }) => { - return updatePet({ data }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePetWithForm.ts b/examples/advanced/src/gen/clients/hooks/petController/useUpdatePetWithForm.ts deleted file mode 100644 index a5f5d41de..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useUpdatePetWithForm.ts +++ /dev/null @@ -1,57 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { - UpdatePetWithFormMutationResponse, - UpdatePetWithFormPathParams, - UpdatePetWithFormQueryParams, - UpdatePetWithForm405, -} from '../../../models/ts/petController/UpdatePetWithForm.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { updatePetWithFormMutationResponseSchema } from '../../../zod/petController/updatePetWithFormSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const updatePetWithFormMutationKey = () => [{ url: '/pet/{petId}' }] as const - -export type UpdatePetWithFormMutationKey = ReturnType - -/** - * @summary Updates a pet in the store with form data - * {@link /pet/:petId} - */ -async function updatePetWithForm( - { petId, params }: { petId: UpdatePetWithFormPathParams['petId']; params?: UpdatePetWithFormQueryParams }, - config: Partial = {}, -) { - const res = await client({ method: 'POST', url: `/pet/${petId}`, params, ...config }) - return { ...res, data: updatePetWithFormMutationResponseSchema.parse(res.data) } -} - -/** - * @summary Updates a pet in the store with form data - * {@link /pet/:petId} - */ -export function useUpdatePetWithForm( - options: { - mutation?: UseMutationOptions< - ResponseConfig, - UpdatePetWithForm405, - { petId: UpdatePetWithFormPathParams['petId']; params?: UpdatePetWithFormQueryParams } - > - client?: Partial - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? updatePetWithFormMutationKey() - - return useMutation< - ResponseConfig, - UpdatePetWithForm405, - { petId: UpdatePetWithFormPathParams['petId']; params?: UpdatePetWithFormQueryParams } - >({ - mutationFn: async ({ petId, params }) => { - return updatePetWithForm({ petId, params }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/petController/useUploadFile.ts b/examples/advanced/src/gen/clients/hooks/petController/useUploadFile.ts deleted file mode 100644 index f5b0ba45b..000000000 --- a/examples/advanced/src/gen/clients/hooks/petController/useUploadFile.ts +++ /dev/null @@ -1,64 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { - UploadFileMutationRequest, - UploadFileMutationResponse, - UploadFilePathParams, - UploadFileQueryParams, -} from '../../../models/ts/petController/UploadFile.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { uploadFileMutationResponseSchema } from '../../../zod/petController/uploadFileSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const uploadFileMutationKey = () => [{ url: '/pet/{petId}/uploadImage' }] as const - -export type UploadFileMutationKey = ReturnType - -/** - * @summary uploads an image - * {@link /pet/:petId/uploadImage} - */ -async function uploadFile( - { petId, data, params }: { petId: UploadFilePathParams['petId']; data?: UploadFileMutationRequest; params?: UploadFileQueryParams }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: `/pet/${petId}/uploadImage`, - params, - data, - headers: { 'Content-Type': 'application/octet-stream', ...config.headers }, - ...config, - }) - return { ...res, data: uploadFileMutationResponseSchema.parse(res.data) } -} - -/** - * @summary uploads an image - * {@link /pet/:petId/uploadImage} - */ -export function useUploadFile( - options: { - mutation?: UseMutationOptions< - ResponseConfig, - Error, - { petId: UploadFilePathParams['petId']; data?: UploadFileMutationRequest; params?: UploadFileQueryParams } - > - client?: Partial> - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? uploadFileMutationKey() - - return useMutation< - ResponseConfig, - Error, - { petId: UploadFilePathParams['petId']; data?: UploadFileMutationRequest; params?: UploadFileQueryParams } - >({ - mutationFn: async ({ petId, data, params }) => { - return uploadFile({ petId, data, params }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/petsController/index.ts b/examples/advanced/src/gen/clients/hooks/petsController/index.ts deleted file mode 100644 index e193c903e..000000000 --- a/examples/advanced/src/gen/clients/hooks/petsController/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type { CreatePetsMutationKey } from './useCreatePets.ts' -export { createPetsMutationKey, useCreatePets } from './useCreatePets.ts' diff --git a/examples/advanced/src/gen/clients/hooks/petsController/useCreatePets.ts b/examples/advanced/src/gen/clients/hooks/petsController/useCreatePets.ts deleted file mode 100644 index d379e6cf7..000000000 --- a/examples/advanced/src/gen/clients/hooks/petsController/useCreatePets.ts +++ /dev/null @@ -1,70 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { - CreatePetsMutationRequest, - CreatePetsMutationResponse, - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParams, -} from '../../../models/ts/petsController/CreatePets.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { createPetsMutationResponseSchema } from '../../../zod/petsController/createPetsSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const createPetsMutationKey = () => [{ url: '/pets/{uuid}' }] as const - -export type CreatePetsMutationKey = ReturnType - -/** - * @summary Create a pet - * {@link /pets/:uuid} - */ -async function createPets( - { - uuid, - data, - headers, - params, - }: { uuid: CreatePetsPathParams['uuid']; data: CreatePetsMutationRequest; headers: CreatePetsHeaderParams; params?: CreatePetsQueryParams }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: `/pets/${uuid}`, - params, - data, - headers: { ...headers, ...config.headers }, - ...config, - }) - return { ...res, data: createPetsMutationResponseSchema.parse(res.data) } -} - -/** - * @summary Create a pet - * {@link /pets/:uuid} - */ -export function useCreatePets( - options: { - mutation?: UseMutationOptions< - ResponseConfig, - Error, - { uuid: CreatePetsPathParams['uuid']; data: CreatePetsMutationRequest; headers: CreatePetsHeaderParams; params?: CreatePetsQueryParams } - > - client?: Partial> - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? createPetsMutationKey() - - return useMutation< - ResponseConfig, - Error, - { uuid: CreatePetsPathParams['uuid']; data: CreatePetsMutationRequest; headers: CreatePetsHeaderParams; params?: CreatePetsQueryParams } - >({ - mutationFn: async ({ uuid, data, headers, params }) => { - return createPets({ uuid, data, headers, params }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/userController/index.ts b/examples/advanced/src/gen/clients/hooks/userController/index.ts deleted file mode 100644 index 774ad272c..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export type { CreateUserMutationKey } from './useCreateUser.ts' -export type { CreateUsersWithListInputMutationKey } from './useCreateUsersWithListInput.ts' -export type { DeleteUserMutationKey } from './useDeleteUser.ts' -export type { GetUserByNameQueryKey } from './useGetUserByName.ts' -export type { LoginUserQueryKey } from './useLoginUser.ts' -export type { LogoutUserQueryKey } from './useLogoutUser.ts' -export type { UpdateUserMutationKey } from './useUpdateUser.ts' -export { createUserMutationKey, useCreateUser } from './useCreateUser.ts' -export { createUsersWithListInputMutationKey, useCreateUsersWithListInput } from './useCreateUsersWithListInput.ts' -export { deleteUserMutationKey, useDeleteUser } from './useDeleteUser.ts' -export { getUserByNameQueryKey, getUserByNameQueryOptions, useGetUserByName } from './useGetUserByName.ts' -export { loginUserQueryKey, loginUserQueryOptions, useLoginUser } from './useLoginUser.ts' -export { logoutUserQueryKey, logoutUserQueryOptions, useLogoutUser } from './useLogoutUser.ts' -export { updateUserMutationKey, useUpdateUser } from './useUpdateUser.ts' diff --git a/examples/advanced/src/gen/clients/hooks/userController/useCreateUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useCreateUser.ts deleted file mode 100644 index 7870bfd09..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/useCreateUser.ts +++ /dev/null @@ -1,43 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { CreateUserMutationRequest, CreateUserMutationResponse } from '../../../models/ts/userController/CreateUser.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { createUserMutationResponseSchema } from '../../../zod/userController/createUserSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const createUserMutationKey = () => [{ url: '/user' }] as const - -export type CreateUserMutationKey = ReturnType - -/** - * @description This can only be done by the logged in user. - * @summary Create user - * {@link /user} - */ -async function createUser({ data }: { data?: CreateUserMutationRequest }, config: Partial> = {}) { - const res = await client({ method: 'POST', url: '/user', data, ...config }) - return { ...res, data: createUserMutationResponseSchema.parse(res.data) } -} - -/** - * @description This can only be done by the logged in user. - * @summary Create user - * {@link /user} - */ -export function useCreateUser( - options: { - mutation?: UseMutationOptions, Error, { data?: CreateUserMutationRequest }> - client?: Partial> - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? createUserMutationKey() - - return useMutation, Error, { data?: CreateUserMutationRequest }>({ - mutationFn: async ({ data }) => { - return createUser({ data }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/userController/useCreateUsersWithListInput.ts b/examples/advanced/src/gen/clients/hooks/userController/useCreateUsersWithListInput.ts deleted file mode 100644 index 36021700b..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/useCreateUsersWithListInput.ts +++ /dev/null @@ -1,54 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, -} from '../../../models/ts/userController/CreateUsersWithListInput.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { createUsersWithListInputMutationResponseSchema } from '../../../zod/userController/createUsersWithListInputSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const createUsersWithListInputMutationKey = () => [{ url: '/user/createWithList' }] as const - -export type CreateUsersWithListInputMutationKey = ReturnType - -/** - * @description Creates list of users with given input array - * @summary Creates list of users with given input array - * {@link /user/createWithList} - */ -async function createUsersWithListInput( - { data }: { data?: CreateUsersWithListInputMutationRequest }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: '/user/createWithList', - data, - ...config, - }) - return { ...res, data: createUsersWithListInputMutationResponseSchema.parse(res.data) } -} - -/** - * @description Creates list of users with given input array - * @summary Creates list of users with given input array - * {@link /user/createWithList} - */ -export function useCreateUsersWithListInput( - options: { - mutation?: UseMutationOptions, Error, { data?: CreateUsersWithListInputMutationRequest }> - client?: Partial> - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? createUsersWithListInputMutationKey() - - return useMutation, Error, { data?: CreateUsersWithListInputMutationRequest }>({ - mutationFn: async ({ data }) => { - return createUsersWithListInput({ data }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/userController/useDeleteUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useDeleteUser.ts deleted file mode 100644 index 4342f0656..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/useDeleteUser.ts +++ /dev/null @@ -1,43 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { DeleteUserMutationResponse, DeleteUserPathParams, DeleteUser400, DeleteUser404 } from '../../../models/ts/userController/DeleteUser.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { deleteUserMutationResponseSchema } from '../../../zod/userController/deleteUserSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const deleteUserMutationKey = () => [{ url: '/user/{username}' }] as const - -export type DeleteUserMutationKey = ReturnType - -/** - * @description This can only be done by the logged in user. - * @summary Delete user - * {@link /user/:username} - */ -async function deleteUser({ username }: { username: DeleteUserPathParams['username'] }, config: Partial = {}) { - const res = await client({ method: 'DELETE', url: `/user/${username}`, ...config }) - return { ...res, data: deleteUserMutationResponseSchema.parse(res.data) } -} - -/** - * @description This can only be done by the logged in user. - * @summary Delete user - * {@link /user/:username} - */ -export function useDeleteUser( - options: { - mutation?: UseMutationOptions, DeleteUser400 | DeleteUser404, { username: DeleteUserPathParams['username'] }> - client?: Partial - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? deleteUserMutationKey() - - return useMutation, DeleteUser400 | DeleteUser404, { username: DeleteUserPathParams['username'] }>({ - mutationFn: async ({ username }) => { - return deleteUser({ username }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/hooks/userController/useGetUserByName.ts b/examples/advanced/src/gen/clients/hooks/userController/useGetUserByName.ts deleted file mode 100644 index 5a41257ee..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/useGetUserByName.ts +++ /dev/null @@ -1,66 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { QueryKey, QueryObserverOptions, UseQueryResult } from '../../../../tanstack-query-hook.ts' -import type { - GetUserByNameQueryResponse, - GetUserByNamePathParams, - GetUserByName400, - GetUserByName404, -} from '../../../models/ts/userController/GetUserByName.ts' -import { queryOptions, useQuery } from '../../../../tanstack-query-hook.ts' -import { getUserByNameQueryResponseSchema } from '../../../zod/userController/getUserByNameSchema.ts' - -export const getUserByNameQueryKey = ({ username }: { username: GetUserByNamePathParams['username'] }) => - [{ url: '/user/:username', params: { username: username } }] as const - -export type GetUserByNameQueryKey = ReturnType - -/** - * @summary Get user by user name - * {@link /user/:username} - */ -async function getUserByName({ username }: { username: GetUserByNamePathParams['username'] }, config: Partial = {}) { - const res = await client({ method: 'GET', url: `/user/${username}`, ...config }) - return { ...res, data: getUserByNameQueryResponseSchema.parse(res.data) } -} - -export function getUserByNameQueryOptions({ username }: { username: GetUserByNamePathParams['username'] }, config: Partial = {}) { - const queryKey = getUserByNameQueryKey({ username }) - return queryOptions({ - enabled: !!username, - queryKey, - queryFn: async ({ signal }) => { - config.signal = signal - return getUserByName({ username }, config) - }, - }) -} - -/** - * @summary Get user by user name - * {@link /user/:username} - */ -export function useGetUserByName< - TData = ResponseConfig, - TQueryData = ResponseConfig, - TQueryKey extends QueryKey = GetUserByNameQueryKey, ->( - { username }: { username: GetUserByNamePathParams['username'] }, - options: { - query?: Partial, GetUserByName400 | GetUserByName404, TData, TQueryData, TQueryKey>> - client?: Partial - } = {}, -) { - const { query: queryOptions, client: config = {} } = options ?? {} - const queryKey = queryOptions?.queryKey ?? getUserByNameQueryKey({ username }) - - const query = useQuery({ - ...(getUserByNameQueryOptions({ username }, config) as unknown as QueryObserverOptions), - queryKey, - ...(queryOptions as unknown as Omit), - }) as UseQueryResult & { queryKey: TQueryKey } - - query.queryKey = queryKey as TQueryKey - - return query -} diff --git a/examples/advanced/src/gen/clients/hooks/userController/useLoginUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useLoginUser.ts deleted file mode 100644 index a87bdd24f..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/useLoginUser.ts +++ /dev/null @@ -1,59 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { QueryKey, QueryObserverOptions, UseQueryResult } from '../../../../tanstack-query-hook.ts' -import type { LoginUserQueryResponse, LoginUserQueryParams, LoginUser400 } from '../../../models/ts/userController/LoginUser.ts' -import { queryOptions, useQuery } from '../../../../tanstack-query-hook.ts' -import { loginUserQueryResponseSchema } from '../../../zod/userController/loginUserSchema.ts' - -export const loginUserQueryKey = (params?: LoginUserQueryParams) => [{ url: '/user/login' }, ...(params ? [params] : [])] as const - -export type LoginUserQueryKey = ReturnType - -/** - * @summary Logs user into the system - * {@link /user/login} - */ -async function loginUser({ params }: { params?: LoginUserQueryParams }, config: Partial = {}) { - const res = await client({ method: 'GET', url: '/user/login', params, ...config }) - return { ...res, data: loginUserQueryResponseSchema.parse(res.data) } -} - -export function loginUserQueryOptions({ params }: { params?: LoginUserQueryParams }, config: Partial = {}) { - const queryKey = loginUserQueryKey(params) - return queryOptions({ - queryKey, - queryFn: async ({ signal }) => { - config.signal = signal - return loginUser({ params }, config) - }, - }) -} - -/** - * @summary Logs user into the system - * {@link /user/login} - */ -export function useLoginUser< - TData = ResponseConfig, - TQueryData = ResponseConfig, - TQueryKey extends QueryKey = LoginUserQueryKey, ->( - { params }: { params?: LoginUserQueryParams }, - options: { - query?: Partial, LoginUser400, TData, TQueryData, TQueryKey>> - client?: Partial - } = {}, -) { - const { query: queryOptions, client: config = {} } = options ?? {} - const queryKey = queryOptions?.queryKey ?? loginUserQueryKey(params) - - const query = useQuery({ - ...(loginUserQueryOptions({ params }, config) as unknown as QueryObserverOptions), - queryKey, - ...(queryOptions as unknown as Omit), - }) as UseQueryResult & { queryKey: TQueryKey } - - query.queryKey = queryKey as TQueryKey - - return query -} diff --git a/examples/advanced/src/gen/clients/hooks/userController/useLogoutUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useLogoutUser.ts deleted file mode 100644 index a0a291c96..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/useLogoutUser.ts +++ /dev/null @@ -1,58 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { QueryKey, QueryObserverOptions, UseQueryResult } from '../../../../tanstack-query-hook.ts' -import type { LogoutUserQueryResponse } from '../../../models/ts/userController/LogoutUser.ts' -import { queryOptions, useQuery } from '../../../../tanstack-query-hook.ts' -import { logoutUserQueryResponseSchema } from '../../../zod/userController/logoutUserSchema.ts' - -export const logoutUserQueryKey = () => [{ url: '/user/logout' }] as const - -export type LogoutUserQueryKey = ReturnType - -/** - * @summary Logs out current logged in user session - * {@link /user/logout} - */ -async function logoutUser(config: Partial = {}) { - const res = await client({ method: 'GET', url: '/user/logout', ...config }) - return { ...res, data: logoutUserQueryResponseSchema.parse(res.data) } -} - -export function logoutUserQueryOptions(config: Partial = {}) { - const queryKey = logoutUserQueryKey() - return queryOptions({ - queryKey, - queryFn: async ({ signal }) => { - config.signal = signal - return logoutUser(config) - }, - }) -} - -/** - * @summary Logs out current logged in user session - * {@link /user/logout} - */ -export function useLogoutUser< - TData = ResponseConfig, - TQueryData = ResponseConfig, - TQueryKey extends QueryKey = LogoutUserQueryKey, ->( - options: { - query?: Partial, Error, TData, TQueryData, TQueryKey>> - client?: Partial - } = {}, -) { - const { query: queryOptions, client: config = {} } = options ?? {} - const queryKey = queryOptions?.queryKey ?? logoutUserQueryKey() - - const query = useQuery({ - ...(logoutUserQueryOptions(config) as unknown as QueryObserverOptions), - queryKey, - ...(queryOptions as unknown as Omit), - }) as UseQueryResult & { queryKey: TQueryKey } - - query.queryKey = queryKey as TQueryKey - - return query -} diff --git a/examples/advanced/src/gen/clients/hooks/userController/useUpdateUser.ts b/examples/advanced/src/gen/clients/hooks/userController/useUpdateUser.ts deleted file mode 100644 index 6339b55d9..000000000 --- a/examples/advanced/src/gen/clients/hooks/userController/useUpdateUser.ts +++ /dev/null @@ -1,50 +0,0 @@ -import client from '../../../../tanstack-query-client.ts' -import type { RequestConfig, ResponseConfig } from '../../../../tanstack-query-client.ts' -import type { UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserPathParams } from '../../../models/ts/userController/UpdateUser.ts' -import type { UseMutationOptions } from '@tanstack/react-query' -import { updateUserMutationResponseSchema } from '../../../zod/userController/updateUserSchema.ts' -import { useMutation } from '@tanstack/react-query' - -export const updateUserMutationKey = () => [{ url: '/user/{username}' }] as const - -export type UpdateUserMutationKey = ReturnType - -/** - * @description This can only be done by the logged in user. - * @summary Update user - * {@link /user/:username} - */ -async function updateUser( - { username, data }: { username: UpdateUserPathParams['username']; data?: UpdateUserMutationRequest }, - config: Partial> = {}, -) { - const res = await client({ method: 'PUT', url: `/user/${username}`, data, ...config }) - return { ...res, data: updateUserMutationResponseSchema.parse(res.data) } -} - -/** - * @description This can only be done by the logged in user. - * @summary Update user - * {@link /user/:username} - */ -export function useUpdateUser( - options: { - mutation?: UseMutationOptions< - ResponseConfig, - Error, - { username: UpdateUserPathParams['username']; data?: UpdateUserMutationRequest } - > - client?: Partial> - } = {}, -) { - const { mutation: mutationOptions, client: config = {} } = options ?? {} - const mutationKey = mutationOptions?.mutationKey ?? updateUserMutationKey() - - return useMutation, Error, { username: UpdateUserPathParams['username']; data?: UpdateUserMutationRequest }>({ - mutationFn: async ({ username, data }) => { - return updateUser({ username, data }, config) - }, - mutationKey, - ...mutationOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/swr/index.ts b/examples/advanced/src/gen/clients/swr/index.ts deleted file mode 100644 index d21d4e46f..000000000 --- a/examples/advanced/src/gen/clients/swr/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -export type { AddPetMutationKeySWR } from './petController/useAddPetSWR.ts' -export type { DeletePetMutationKeySWR } from './petController/useDeletePetSWR.ts' -export type { FindPetsByStatusQueryKeySWR } from './petController/useFindPetsByStatusSWR.ts' -export type { FindPetsByTagsQueryKeySWR } from './petController/useFindPetsByTagsSWR.ts' -export type { GetPetByIdQueryKeySWR } from './petController/useGetPetByIdSWR.ts' -export type { UpdatePetMutationKeySWR } from './petController/useUpdatePetSWR.ts' -export type { UpdatePetWithFormMutationKeySWR } from './petController/useUpdatePetWithFormSWR.ts' -export type { UploadFileMutationKeySWR } from './petController/useUploadFileSWR.ts' -export type { CreatePetsMutationKeySWR } from './petsController/useCreatePetsSWR.ts' -export type { CreateUsersWithListInputMutationKeySWR } from './userController/useCreateUsersWithListInputSWR.ts' -export type { CreateUserMutationKeySWR } from './userController/useCreateUserSWR.ts' -export type { DeleteUserMutationKeySWR } from './userController/useDeleteUserSWR.ts' -export type { GetUserByNameQueryKeySWR } from './userController/useGetUserByNameSWR.ts' -export type { LoginUserQueryKeySWR } from './userController/useLoginUserSWR.ts' -export type { LogoutUserQueryKeySWR } from './userController/useLogoutUserSWR.ts' -export type { UpdateUserMutationKeySWR } from './userController/useUpdateUserSWR.ts' -export { addPetMutationKeySWR, useAddPetSWR } from './petController/useAddPetSWR.ts' -export { deletePetMutationKeySWR, useDeletePetSWR } from './petController/useDeletePetSWR.ts' -export { findPetsByStatusQueryKeySWR, findPetsByStatusQueryOptionsSWR, useFindPetsByStatusSWR } from './petController/useFindPetsByStatusSWR.ts' -export { findPetsByTagsQueryKeySWR, findPetsByTagsQueryOptionsSWR, useFindPetsByTagsSWR } from './petController/useFindPetsByTagsSWR.ts' -export { getPetByIdQueryKeySWR, getPetByIdQueryOptionsSWR, useGetPetByIdSWR } from './petController/useGetPetByIdSWR.ts' -export { updatePetMutationKeySWR, useUpdatePetSWR } from './petController/useUpdatePetSWR.ts' -export { updatePetWithFormMutationKeySWR, useUpdatePetWithFormSWR } from './petController/useUpdatePetWithFormSWR.ts' -export { uploadFileMutationKeySWR, useUploadFileSWR } from './petController/useUploadFileSWR.ts' -export { createPetsMutationKeySWR, useCreatePetsSWR } from './petsController/useCreatePetsSWR.ts' -export { createUsersWithListInputMutationKeySWR, useCreateUsersWithListInputSWR } from './userController/useCreateUsersWithListInputSWR.ts' -export { createUserMutationKeySWR, useCreateUserSWR } from './userController/useCreateUserSWR.ts' -export { deleteUserMutationKeySWR, useDeleteUserSWR } from './userController/useDeleteUserSWR.ts' -export { getUserByNameQueryKeySWR, getUserByNameQueryOptionsSWR, useGetUserByNameSWR } from './userController/useGetUserByNameSWR.ts' -export { loginUserQueryKeySWR, loginUserQueryOptionsSWR, useLoginUserSWR } from './userController/useLoginUserSWR.ts' -export { logoutUserQueryKeySWR, logoutUserQueryOptionsSWR, useLogoutUserSWR } from './userController/useLogoutUserSWR.ts' -export { updateUserMutationKeySWR, useUpdateUserSWR } from './userController/useUpdateUserSWR.ts' diff --git a/examples/advanced/src/gen/clients/swr/petController/index.ts b/examples/advanced/src/gen/clients/swr/petController/index.ts deleted file mode 100644 index 2c9fd0aaa..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -export type { AddPetMutationKeySWR } from './useAddPetSWR.ts' -export type { DeletePetMutationKeySWR } from './useDeletePetSWR.ts' -export type { FindPetsByStatusQueryKeySWR } from './useFindPetsByStatusSWR.ts' -export type { FindPetsByTagsQueryKeySWR } from './useFindPetsByTagsSWR.ts' -export type { GetPetByIdQueryKeySWR } from './useGetPetByIdSWR.ts' -export type { UpdatePetMutationKeySWR } from './useUpdatePetSWR.ts' -export type { UpdatePetWithFormMutationKeySWR } from './useUpdatePetWithFormSWR.ts' -export type { UploadFileMutationKeySWR } from './useUploadFileSWR.ts' -export { addPetMutationKeySWR, useAddPetSWR } from './useAddPetSWR.ts' -export { deletePetMutationKeySWR, useDeletePetSWR } from './useDeletePetSWR.ts' -export { findPetsByStatusQueryKeySWR, findPetsByStatusQueryOptionsSWR, useFindPetsByStatusSWR } from './useFindPetsByStatusSWR.ts' -export { findPetsByTagsQueryKeySWR, findPetsByTagsQueryOptionsSWR, useFindPetsByTagsSWR } from './useFindPetsByTagsSWR.ts' -export { getPetByIdQueryKeySWR, getPetByIdQueryOptionsSWR, useGetPetByIdSWR } from './useGetPetByIdSWR.ts' -export { updatePetMutationKeySWR, useUpdatePetSWR } from './useUpdatePetSWR.ts' -export { updatePetWithFormMutationKeySWR, useUpdatePetWithFormSWR } from './useUpdatePetWithFormSWR.ts' -export { uploadFileMutationKeySWR, useUploadFileSWR } from './useUploadFileSWR.ts' diff --git a/examples/advanced/src/gen/clients/swr/petController/useAddPetSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useAddPetSWR.ts deleted file mode 100644 index 9dd6d7e37..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useAddPetSWR.ts +++ /dev/null @@ -1,49 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { AddPetMutationRequest, AddPetMutationResponse, AddPet405 } from '../../../models/ts/petController/AddPet.ts' -import { addPetMutationResponseSchema } from '../../../zod/petController/addPetSchema.ts' - -export const addPetMutationKeySWR = () => [{ url: '/pet' }] as const - -export type AddPetMutationKeySWR = ReturnType - -/** - * @description Add a new pet to the store - * @summary Add a new pet to the store - * {@link /pet} - */ -async function addPetSWR({ data }: { data: AddPetMutationRequest }, config: Partial> = {}) { - const res = await client({ - method: 'POST', - url: '/pet', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return addPetMutationResponseSchema.parse(res.data) -} - -/** - * @description Add a new pet to the store - * @summary Add a new pet to the store - * {@link /pet} - */ -export function useAddPetSWR( - options: { - mutation?: Parameters>[2] - client?: Partial> - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = addPetMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url, { arg: data }) => { - return addPetSWR({ data }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/petController/useDeletePetSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useDeletePetSWR.ts deleted file mode 100644 index 61c2f968e..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useDeletePetSWR.ts +++ /dev/null @@ -1,51 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { DeletePetMutationResponse, DeletePetPathParams, DeletePetHeaderParams, DeletePet400 } from '../../../models/ts/petController/DeletePet.ts' -import { deletePetMutationResponseSchema } from '../../../zod/petController/deletePetSchema.ts' - -export const deletePetMutationKeySWR = () => [{ url: '/pet/{petId}' }] as const - -export type DeletePetMutationKeySWR = ReturnType - -/** - * @description delete a pet - * @summary Deletes a pet - * {@link /pet/:petId} - */ -async function deletePetSWR({ petId, headers }: { petId: DeletePetPathParams['petId']; headers?: DeletePetHeaderParams }, config: Partial = {}) { - const res = await client({ - method: 'DELETE', - url: `/pet/${petId}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - headers: { ...headers, ...config.headers }, - ...config, - }) - return deletePetMutationResponseSchema.parse(res.data) -} - -/** - * @description delete a pet - * @summary Deletes a pet - * {@link /pet/:petId} - */ -export function useDeletePetSWR( - { petId }: { petId: DeletePetPathParams['petId'] }, - headers?: DeletePetHeaderParams, - options: { - mutation?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = deletePetMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url) => { - return deletePetSWR({ petId, headers }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/petController/useFindPetsByStatusSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useFindPetsByStatusSWR.ts deleted file mode 100644 index da9646d5a..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useFindPetsByStatusSWR.ts +++ /dev/null @@ -1,56 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWR from 'swr' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { FindPetsByStatusQueryResponse, FindPetsByStatusPathParams, FindPetsByStatus400 } from '../../../models/ts/petController/FindPetsByStatus.ts' -import { findPetsByStatusQueryResponseSchema } from '../../../zod/petController/findPetsByStatusSchema.ts' - -export const findPetsByStatusQueryKeySWR = ({ step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }) => - [{ url: '/pet/findByStatus/:step_id', params: { step_id: step_id } }] as const - -export type FindPetsByStatusQueryKeySWR = ReturnType - -/** - * @description Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - * {@link /pet/findByStatus/:step_id} - */ -async function findPetsByStatusSWR({ step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: `/pet/findByStatus/${step_id}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return findPetsByStatusQueryResponseSchema.parse(res.data) -} - -export function findPetsByStatusQueryOptionsSWR({ step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }, config: Partial = {}) { - return { - fetcher: async () => { - return findPetsByStatusSWR({ step_id }, config) - }, - } -} - -/** - * @description Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - * {@link /pet/findByStatus/:step_id} - */ -export function useFindPetsByStatusSWR( - { step_id }: { step_id: FindPetsByStatusPathParams['step_id'] }, - options: { - query?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { query: queryOptions, client: config = {}, shouldFetch = true } = options ?? {} - - const queryKey = findPetsByStatusQueryKeySWR({ step_id }) - - return useSWR(shouldFetch ? queryKey : null, { - ...findPetsByStatusQueryOptionsSWR({ step_id }, config), - ...queryOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/swr/petController/useFindPetsByTagsSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useFindPetsByTagsSWR.ts deleted file mode 100644 index 8810650f9..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useFindPetsByTagsSWR.ts +++ /dev/null @@ -1,68 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWR from 'swr' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { - FindPetsByTagsQueryResponse, - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParams, - FindPetsByTags400, -} from '../../../models/ts/petController/FindPetsByTags.ts' -import { findPetsByTagsQueryResponseSchema } from '../../../zod/petController/findPetsByTagsSchema.ts' - -export const findPetsByTagsQueryKeySWR = (params?: FindPetsByTagsQueryParams) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const - -export type FindPetsByTagsQueryKeySWR = ReturnType - -/** - * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * {@link /pet/findByTags} - */ -async function findPetsByTagsSWR( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - config: Partial = {}, -) { - const res = await client({ - method: 'GET', - url: '/pet/findByTags', - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - headers: { ...headers, ...config.headers }, - ...config, - }) - return findPetsByTagsQueryResponseSchema.parse(res.data) -} - -export function findPetsByTagsQueryOptionsSWR( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - config: Partial = {}, -) { - return { - fetcher: async () => { - return findPetsByTagsSWR({ headers, params }, config) - }, - } -} - -/** - * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * {@link /pet/findByTags} - */ -export function useFindPetsByTagsSWR( - { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams }, - options: { - query?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { query: queryOptions, client: config = {}, shouldFetch = true } = options ?? {} - - const queryKey = findPetsByTagsQueryKeySWR(params) - - return useSWR(shouldFetch ? queryKey : null, { - ...findPetsByTagsQueryOptionsSWR({ headers, params }, config), - ...queryOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/swr/petController/useGetPetByIdSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useGetPetByIdSWR.ts deleted file mode 100644 index 8c9aca06e..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useGetPetByIdSWR.ts +++ /dev/null @@ -1,55 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWR from 'swr' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { GetPetByIdQueryResponse, GetPetByIdPathParams, GetPetById400, GetPetById404 } from '../../../models/ts/petController/GetPetById.ts' -import { getPetByIdQueryResponseSchema } from '../../../zod/petController/getPetByIdSchema.ts' - -export const getPetByIdQueryKeySWR = ({ petId }: { petId: GetPetByIdPathParams['petId'] }) => [{ url: '/pet/:petId', params: { petId: petId } }] as const - -export type GetPetByIdQueryKeySWR = ReturnType - -/** - * @description Returns a single pet - * @summary Find pet by ID - * {@link /pet/:petId} - */ -async function getPetByIdSWR({ petId }: { petId: GetPetByIdPathParams['petId'] }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: `/pet/${petId}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return getPetByIdQueryResponseSchema.parse(res.data) -} - -export function getPetByIdQueryOptionsSWR({ petId }: { petId: GetPetByIdPathParams['petId'] }, config: Partial = {}) { - return { - fetcher: async () => { - return getPetByIdSWR({ petId }, config) - }, - } -} - -/** - * @description Returns a single pet - * @summary Find pet by ID - * {@link /pet/:petId} - */ -export function useGetPetByIdSWR( - { petId }: { petId: GetPetByIdPathParams['petId'] }, - options: { - query?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { query: queryOptions, client: config = {}, shouldFetch = true } = options ?? {} - - const queryKey = getPetByIdQueryKeySWR({ petId }) - - return useSWR(shouldFetch ? queryKey : null, { - ...getPetByIdQueryOptionsSWR({ petId }, config), - ...queryOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/swr/petController/useUpdatePetSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useUpdatePetSWR.ts deleted file mode 100644 index fc87e73bb..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useUpdatePetSWR.ts +++ /dev/null @@ -1,57 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { - UpdatePetMutationRequest, - UpdatePetMutationResponse, - UpdatePet400, - UpdatePet404, - UpdatePet405, -} from '../../../models/ts/petController/UpdatePet.ts' -import { updatePetMutationResponseSchema } from '../../../zod/petController/updatePetSchema.ts' - -export const updatePetMutationKeySWR = () => [{ url: '/pet' }] as const - -export type UpdatePetMutationKeySWR = ReturnType - -/** - * @description Update an existing pet by Id - * @summary Update an existing pet - * {@link /pet} - */ -async function updatePetSWR({ data }: { data: UpdatePetMutationRequest }, config: Partial> = {}) { - const res = await client({ - method: 'PUT', - url: '/pet', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return updatePetMutationResponseSchema.parse(res.data) -} - -/** - * @description Update an existing pet by Id - * @summary Update an existing pet - * {@link /pet} - */ -export function useUpdatePetSWR( - options: { - mutation?: Parameters< - typeof useSWRMutation - >[2] - client?: Partial> - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = updatePetMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url, { arg: data }) => { - return updatePetSWR({ data }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/petController/useUpdatePetWithFormSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useUpdatePetWithFormSWR.ts deleted file mode 100644 index 3b23e5947..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useUpdatePetWithFormSWR.ts +++ /dev/null @@ -1,57 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { - UpdatePetWithFormMutationResponse, - UpdatePetWithFormPathParams, - UpdatePetWithFormQueryParams, - UpdatePetWithForm405, -} from '../../../models/ts/petController/UpdatePetWithForm.ts' -import { updatePetWithFormMutationResponseSchema } from '../../../zod/petController/updatePetWithFormSchema.ts' - -export const updatePetWithFormMutationKeySWR = () => [{ url: '/pet/{petId}' }] as const - -export type UpdatePetWithFormMutationKeySWR = ReturnType - -/** - * @summary Updates a pet in the store with form data - * {@link /pet/:petId} - */ -async function updatePetWithFormSWR( - { petId, params }: { petId: UpdatePetWithFormPathParams['petId']; params?: UpdatePetWithFormQueryParams }, - config: Partial = {}, -) { - const res = await client({ - method: 'POST', - url: `/pet/${petId}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - ...config, - }) - return updatePetWithFormMutationResponseSchema.parse(res.data) -} - -/** - * @summary Updates a pet in the store with form data - * {@link /pet/:petId} - */ -export function useUpdatePetWithFormSWR( - { petId }: { petId: UpdatePetWithFormPathParams['petId'] }, - params?: UpdatePetWithFormQueryParams, - options: { - mutation?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = updatePetWithFormMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url) => { - return updatePetWithFormSWR({ petId, params }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/petController/useUploadFileSWR.ts b/examples/advanced/src/gen/clients/swr/petController/useUploadFileSWR.ts deleted file mode 100644 index 336bc1d4f..000000000 --- a/examples/advanced/src/gen/clients/swr/petController/useUploadFileSWR.ts +++ /dev/null @@ -1,59 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { - UploadFileMutationRequest, - UploadFileMutationResponse, - UploadFilePathParams, - UploadFileQueryParams, -} from '../../../models/ts/petController/UploadFile.ts' -import { uploadFileMutationResponseSchema } from '../../../zod/petController/uploadFileSchema.ts' - -export const uploadFileMutationKeySWR = () => [{ url: '/pet/{petId}/uploadImage' }] as const - -export type UploadFileMutationKeySWR = ReturnType - -/** - * @summary uploads an image - * {@link /pet/:petId/uploadImage} - */ -async function uploadFileSWR( - { petId, data, params }: { petId: UploadFilePathParams['petId']; data?: UploadFileMutationRequest; params?: UploadFileQueryParams }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: `/pet/${petId}/uploadImage`, - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - data, - headers: { 'Content-Type': 'application/octet-stream', ...config.headers }, - ...config, - }) - return uploadFileMutationResponseSchema.parse(res.data) -} - -/** - * @summary uploads an image - * {@link /pet/:petId/uploadImage} - */ -export function useUploadFileSWR( - { petId }: { petId: UploadFilePathParams['petId'] }, - params?: UploadFileQueryParams, - options: { - mutation?: Parameters>[2] - client?: Partial> - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = uploadFileMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url, { arg: data }) => { - return uploadFileSWR({ petId, data, params }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/petsController/index.ts b/examples/advanced/src/gen/clients/swr/petsController/index.ts deleted file mode 100644 index 13b8c62bc..000000000 --- a/examples/advanced/src/gen/clients/swr/petsController/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type { CreatePetsMutationKeySWR } from './useCreatePetsSWR.ts' -export { createPetsMutationKeySWR, useCreatePetsSWR } from './useCreatePetsSWR.ts' diff --git a/examples/advanced/src/gen/clients/swr/petsController/useCreatePetsSWR.ts b/examples/advanced/src/gen/clients/swr/petsController/useCreatePetsSWR.ts deleted file mode 100644 index 01c13d6c3..000000000 --- a/examples/advanced/src/gen/clients/swr/petsController/useCreatePetsSWR.ts +++ /dev/null @@ -1,66 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { - CreatePetsMutationRequest, - CreatePetsMutationResponse, - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParams, -} from '../../../models/ts/petsController/CreatePets.ts' -import { createPetsMutationResponseSchema } from '../../../zod/petsController/createPetsSchema.ts' - -export const createPetsMutationKeySWR = () => [{ url: '/pets/{uuid}' }] as const - -export type CreatePetsMutationKeySWR = ReturnType - -/** - * @summary Create a pet - * {@link /pets/:uuid} - */ -async function createPetsSWR( - { - uuid, - data, - headers, - params, - }: { uuid: CreatePetsPathParams['uuid']; data: CreatePetsMutationRequest; headers: CreatePetsHeaderParams; params?: CreatePetsQueryParams }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: `/pets/${uuid}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - data, - headers: { ...headers, ...config.headers }, - ...config, - }) - return createPetsMutationResponseSchema.parse(res.data) -} - -/** - * @summary Create a pet - * {@link /pets/:uuid} - */ -export function useCreatePetsSWR( - { uuid }: { uuid: CreatePetsPathParams['uuid'] }, - headers: CreatePetsHeaderParams, - params?: CreatePetsQueryParams, - options: { - mutation?: Parameters>[2] - client?: Partial> - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = createPetsMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url, { arg: data }) => { - return createPetsSWR({ uuid, data, headers, params }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/userController/index.ts b/examples/advanced/src/gen/clients/swr/userController/index.ts deleted file mode 100644 index b782961f7..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export type { CreateUsersWithListInputMutationKeySWR } from './useCreateUsersWithListInputSWR.ts' -export type { CreateUserMutationKeySWR } from './useCreateUserSWR.ts' -export type { DeleteUserMutationKeySWR } from './useDeleteUserSWR.ts' -export type { GetUserByNameQueryKeySWR } from './useGetUserByNameSWR.ts' -export type { LoginUserQueryKeySWR } from './useLoginUserSWR.ts' -export type { LogoutUserQueryKeySWR } from './useLogoutUserSWR.ts' -export type { UpdateUserMutationKeySWR } from './useUpdateUserSWR.ts' -export { createUsersWithListInputMutationKeySWR, useCreateUsersWithListInputSWR } from './useCreateUsersWithListInputSWR.ts' -export { createUserMutationKeySWR, useCreateUserSWR } from './useCreateUserSWR.ts' -export { deleteUserMutationKeySWR, useDeleteUserSWR } from './useDeleteUserSWR.ts' -export { getUserByNameQueryKeySWR, getUserByNameQueryOptionsSWR, useGetUserByNameSWR } from './useGetUserByNameSWR.ts' -export { loginUserQueryKeySWR, loginUserQueryOptionsSWR, useLoginUserSWR } from './useLoginUserSWR.ts' -export { logoutUserQueryKeySWR, logoutUserQueryOptionsSWR, useLogoutUserSWR } from './useLogoutUserSWR.ts' -export { updateUserMutationKeySWR, useUpdateUserSWR } from './useUpdateUserSWR.ts' diff --git a/examples/advanced/src/gen/clients/swr/userController/useCreateUserSWR.ts b/examples/advanced/src/gen/clients/swr/userController/useCreateUserSWR.ts deleted file mode 100644 index 65cf2d324..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/useCreateUserSWR.ts +++ /dev/null @@ -1,49 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { CreateUserMutationRequest, CreateUserMutationResponse } from '../../../models/ts/userController/CreateUser.ts' -import { createUserMutationResponseSchema } from '../../../zod/userController/createUserSchema.ts' - -export const createUserMutationKeySWR = () => [{ url: '/user' }] as const - -export type CreateUserMutationKeySWR = ReturnType - -/** - * @description This can only be done by the logged in user. - * @summary Create user - * {@link /user} - */ -async function createUserSWR({ data }: { data?: CreateUserMutationRequest }, config: Partial> = {}) { - const res = await client({ - method: 'POST', - url: '/user', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return createUserMutationResponseSchema.parse(res.data) -} - -/** - * @description This can only be done by the logged in user. - * @summary Create user - * {@link /user} - */ -export function useCreateUserSWR( - options: { - mutation?: Parameters>[2] - client?: Partial> - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = createUserMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url, { arg: data }) => { - return createUserSWR({ data }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/userController/useCreateUsersWithListInputSWR.ts b/examples/advanced/src/gen/clients/swr/userController/useCreateUsersWithListInputSWR.ts deleted file mode 100644 index ae46da944..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/useCreateUsersWithListInputSWR.ts +++ /dev/null @@ -1,62 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, -} from '../../../models/ts/userController/CreateUsersWithListInput.ts' -import { createUsersWithListInputMutationResponseSchema } from '../../../zod/userController/createUsersWithListInputSchema.ts' - -export const createUsersWithListInputMutationKeySWR = () => [{ url: '/user/createWithList' }] as const - -export type CreateUsersWithListInputMutationKeySWR = ReturnType - -/** - * @description Creates list of users with given input array - * @summary Creates list of users with given input array - * {@link /user/createWithList} - */ -async function createUsersWithListInputSWR( - { data }: { data?: CreateUsersWithListInputMutationRequest }, - config: Partial> = {}, -) { - const res = await client({ - method: 'POST', - url: '/user/createWithList', - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return createUsersWithListInputMutationResponseSchema.parse(res.data) -} - -/** - * @description Creates list of users with given input array - * @summary Creates list of users with given input array - * {@link /user/createWithList} - */ -export function useCreateUsersWithListInputSWR( - options: { - mutation?: Parameters< - typeof useSWRMutation - >[2] - client?: Partial> - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = createUsersWithListInputMutationKeySWR() - - return useSWRMutation< - CreateUsersWithListInputMutationResponse, - Error, - CreateUsersWithListInputMutationKeySWR | null, - CreateUsersWithListInputMutationRequest - >( - shouldFetch ? mutationKey : null, - async (_url, { arg: data }) => { - return createUsersWithListInputSWR({ data }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/userController/useDeleteUserSWR.ts b/examples/advanced/src/gen/clients/swr/userController/useDeleteUserSWR.ts deleted file mode 100644 index a418f7dcd..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/useDeleteUserSWR.ts +++ /dev/null @@ -1,49 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { DeleteUserMutationResponse, DeleteUserPathParams, DeleteUser400, DeleteUser404 } from '../../../models/ts/userController/DeleteUser.ts' -import { deleteUserMutationResponseSchema } from '../../../zod/userController/deleteUserSchema.ts' - -export const deleteUserMutationKeySWR = () => [{ url: '/user/{username}' }] as const - -export type DeleteUserMutationKeySWR = ReturnType - -/** - * @description This can only be done by the logged in user. - * @summary Delete user - * {@link /user/:username} - */ -async function deleteUserSWR({ username }: { username: DeleteUserPathParams['username'] }, config: Partial = {}) { - const res = await client({ - method: 'DELETE', - url: `/user/${username}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return deleteUserMutationResponseSchema.parse(res.data) -} - -/** - * @description This can only be done by the logged in user. - * @summary Delete user - * {@link /user/:username} - */ -export function useDeleteUserSWR( - { username }: { username: DeleteUserPathParams['username'] }, - options: { - mutation?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = deleteUserMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url) => { - return deleteUserSWR({ username }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/clients/swr/userController/useGetUserByNameSWR.ts b/examples/advanced/src/gen/clients/swr/userController/useGetUserByNameSWR.ts deleted file mode 100644 index 583f107ae..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/useGetUserByNameSWR.ts +++ /dev/null @@ -1,59 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWR from 'swr' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { - GetUserByNameQueryResponse, - GetUserByNamePathParams, - GetUserByName400, - GetUserByName404, -} from '../../../models/ts/userController/GetUserByName.ts' -import { getUserByNameQueryResponseSchema } from '../../../zod/userController/getUserByNameSchema.ts' - -export const getUserByNameQueryKeySWR = ({ username }: { username: GetUserByNamePathParams['username'] }) => - [{ url: '/user/:username', params: { username: username } }] as const - -export type GetUserByNameQueryKeySWR = ReturnType - -/** - * @summary Get user by user name - * {@link /user/:username} - */ -async function getUserByNameSWR({ username }: { username: GetUserByNamePathParams['username'] }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: `/user/${username}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return getUserByNameQueryResponseSchema.parse(res.data) -} - -export function getUserByNameQueryOptionsSWR({ username }: { username: GetUserByNamePathParams['username'] }, config: Partial = {}) { - return { - fetcher: async () => { - return getUserByNameSWR({ username }, config) - }, - } -} - -/** - * @summary Get user by user name - * {@link /user/:username} - */ -export function useGetUserByNameSWR( - { username }: { username: GetUserByNamePathParams['username'] }, - options: { - query?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { query: queryOptions, client: config = {}, shouldFetch = true } = options ?? {} - - const queryKey = getUserByNameQueryKeySWR({ username }) - - return useSWR(shouldFetch ? queryKey : null, { - ...getUserByNameQueryOptionsSWR({ username }, config), - ...queryOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/swr/userController/useLoginUserSWR.ts b/examples/advanced/src/gen/clients/swr/userController/useLoginUserSWR.ts deleted file mode 100644 index ad6c9851b..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/useLoginUserSWR.ts +++ /dev/null @@ -1,54 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWR from 'swr' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { LoginUserQueryResponse, LoginUserQueryParams, LoginUser400 } from '../../../models/ts/userController/LoginUser.ts' -import { loginUserQueryResponseSchema } from '../../../zod/userController/loginUserSchema.ts' - -export const loginUserQueryKeySWR = (params?: LoginUserQueryParams) => [{ url: '/user/login' }, ...(params ? [params] : [])] as const - -export type LoginUserQueryKeySWR = ReturnType - -/** - * @summary Logs user into the system - * {@link /user/login} - */ -async function loginUserSWR({ params }: { params?: LoginUserQueryParams }, config: Partial = {}) { - const res = await client({ - method: 'GET', - url: '/user/login', - baseURL: 'https://petstore3.swagger.io/api/v3', - params, - ...config, - }) - return loginUserQueryResponseSchema.parse(res.data) -} - -export function loginUserQueryOptionsSWR({ params }: { params?: LoginUserQueryParams }, config: Partial = {}) { - return { - fetcher: async () => { - return loginUserSWR({ params }, config) - }, - } -} - -/** - * @summary Logs user into the system - * {@link /user/login} - */ -export function useLoginUserSWR( - { params }: { params?: LoginUserQueryParams }, - options: { - query?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { query: queryOptions, client: config = {}, shouldFetch = true } = options ?? {} - - const queryKey = loginUserQueryKeySWR(params) - - return useSWR(shouldFetch ? queryKey : null, { - ...loginUserQueryOptionsSWR({ params }, config), - ...queryOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/swr/userController/useLogoutUserSWR.ts b/examples/advanced/src/gen/clients/swr/userController/useLogoutUserSWR.ts deleted file mode 100644 index 73dc33a09..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/useLogoutUserSWR.ts +++ /dev/null @@ -1,52 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWR from 'swr' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { LogoutUserQueryResponse } from '../../../models/ts/userController/LogoutUser.ts' -import { logoutUserQueryResponseSchema } from '../../../zod/userController/logoutUserSchema.ts' - -export const logoutUserQueryKeySWR = () => [{ url: '/user/logout' }] as const - -export type LogoutUserQueryKeySWR = ReturnType - -/** - * @summary Logs out current logged in user session - * {@link /user/logout} - */ -async function logoutUserSWR(config: Partial = {}) { - const res = await client({ - method: 'GET', - url: '/user/logout', - baseURL: 'https://petstore3.swagger.io/api/v3', - ...config, - }) - return logoutUserQueryResponseSchema.parse(res.data) -} - -export function logoutUserQueryOptionsSWR(config: Partial = {}) { - return { - fetcher: async () => { - return logoutUserSWR(config) - }, - } -} - -/** - * @summary Logs out current logged in user session - * {@link /user/logout} - */ -export function useLogoutUserSWR( - options: { - query?: Parameters>[2] - client?: Partial - shouldFetch?: boolean - } = {}, -) { - const { query: queryOptions, client: config = {}, shouldFetch = true } = options ?? {} - - const queryKey = logoutUserQueryKeySWR() - - return useSWR(shouldFetch ? queryKey : null, { - ...logoutUserQueryOptionsSWR(config), - ...queryOptions, - }) -} diff --git a/examples/advanced/src/gen/clients/swr/userController/useUpdateUserSWR.ts b/examples/advanced/src/gen/clients/swr/userController/useUpdateUserSWR.ts deleted file mode 100644 index f82b32857..000000000 --- a/examples/advanced/src/gen/clients/swr/userController/useUpdateUserSWR.ts +++ /dev/null @@ -1,53 +0,0 @@ -import client from '../../../../swr-client.ts' -import useSWRMutation from 'swr/mutation' -import type { RequestConfig } from '../../../../swr-client.ts' -import type { UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserPathParams } from '../../../models/ts/userController/UpdateUser.ts' -import { updateUserMutationResponseSchema } from '../../../zod/userController/updateUserSchema.ts' - -export const updateUserMutationKeySWR = () => [{ url: '/user/{username}' }] as const - -export type UpdateUserMutationKeySWR = ReturnType - -/** - * @description This can only be done by the logged in user. - * @summary Update user - * {@link /user/:username} - */ -async function updateUserSWR( - { username, data }: { username: UpdateUserPathParams['username']; data?: UpdateUserMutationRequest }, - config: Partial> = {}, -) { - const res = await client({ - method: 'PUT', - url: `/user/${username}`, - baseURL: 'https://petstore3.swagger.io/api/v3', - data, - ...config, - }) - return updateUserMutationResponseSchema.parse(res.data) -} - -/** - * @description This can only be done by the logged in user. - * @summary Update user - * {@link /user/:username} - */ -export function useUpdateUserSWR( - { username }: { username: UpdateUserPathParams['username'] }, - options: { - mutation?: Parameters>[2] - client?: Partial> - shouldFetch?: boolean - } = {}, -) { - const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {} - const mutationKey = updateUserMutationKeySWR() - - return useSWRMutation( - shouldFetch ? mutationKey : null, - async (_url, { arg: data }) => { - return updateUserSWR({ username, data }, config) - }, - mutationOptions, - ) -} diff --git a/examples/advanced/src/gen/index.ts b/examples/advanced/src/gen/index.ts deleted file mode 100644 index 0abda07c2..000000000 --- a/examples/advanced/src/gen/index.ts +++ /dev/null @@ -1,558 +0,0 @@ -export type { AddPetMutationKey } from './clients/hooks/petController/useAddPet.ts' -export type { DeletePetMutationKey } from './clients/hooks/petController/useDeletePet.ts' -export type { FindPetsByStatusQueryKey } from './clients/hooks/petController/useFindPetsByStatus.ts' -export type { FindPetsByTagsQueryKey } from './clients/hooks/petController/useFindPetsByTags.ts' -export type { FindPetsByTagsInfiniteQueryKey } from './clients/hooks/petController/useFindPetsByTagsInfinite.ts' -export type { GetPetByIdQueryKey } from './clients/hooks/petController/useGetPetById.ts' -export type { UpdatePetMutationKey } from './clients/hooks/petController/useUpdatePet.ts' -export type { UpdatePetWithFormMutationKey } from './clients/hooks/petController/useUpdatePetWithForm.ts' -export type { UploadFileMutationKey } from './clients/hooks/petController/useUploadFile.ts' -export type { CreatePetsMutationKey } from './clients/hooks/petsController/useCreatePets.ts' -export type { CreateUserMutationKey } from './clients/hooks/userController/useCreateUser.ts' -export type { CreateUsersWithListInputMutationKey } from './clients/hooks/userController/useCreateUsersWithListInput.ts' -export type { DeleteUserMutationKey } from './clients/hooks/userController/useDeleteUser.ts' -export type { GetUserByNameQueryKey } from './clients/hooks/userController/useGetUserByName.ts' -export type { LoginUserQueryKey } from './clients/hooks/userController/useLoginUser.ts' -export type { LogoutUserQueryKey } from './clients/hooks/userController/useLogoutUser.ts' -export type { UpdateUserMutationKey } from './clients/hooks/userController/useUpdateUser.ts' -export type { AddPetMutationKeySWR } from './clients/swr/petController/useAddPetSWR.ts' -export type { DeletePetMutationKeySWR } from './clients/swr/petController/useDeletePetSWR.ts' -export type { FindPetsByStatusQueryKeySWR } from './clients/swr/petController/useFindPetsByStatusSWR.ts' -export type { FindPetsByTagsQueryKeySWR } from './clients/swr/petController/useFindPetsByTagsSWR.ts' -export type { GetPetByIdQueryKeySWR } from './clients/swr/petController/useGetPetByIdSWR.ts' -export type { UpdatePetMutationKeySWR } from './clients/swr/petController/useUpdatePetSWR.ts' -export type { UpdatePetWithFormMutationKeySWR } from './clients/swr/petController/useUpdatePetWithFormSWR.ts' -export type { UploadFileMutationKeySWR } from './clients/swr/petController/useUploadFileSWR.ts' -export type { CreatePetsMutationKeySWR } from './clients/swr/petsController/useCreatePetsSWR.ts' -export type { CreateUsersWithListInputMutationKeySWR } from './clients/swr/userController/useCreateUsersWithListInputSWR.ts' -export type { CreateUserMutationKeySWR } from './clients/swr/userController/useCreateUserSWR.ts' -export type { DeleteUserMutationKeySWR } from './clients/swr/userController/useDeleteUserSWR.ts' -export type { GetUserByNameQueryKeySWR } from './clients/swr/userController/useGetUserByNameSWR.ts' -export type { LoginUserQueryKeySWR } from './clients/swr/userController/useLoginUserSWR.ts' -export type { LogoutUserQueryKeySWR } from './clients/swr/userController/useLogoutUserSWR.ts' -export type { UpdateUserMutationKeySWR } from './clients/swr/userController/useUpdateUserSWR.ts' -export type { AddPetRequestStatusEnum, AddPetRequest } from './models/ts/AddPetRequest.ts' -export type { Address } from './models/ts/Address.ts' -export type { ApiResponse } from './models/ts/ApiResponse.ts' -export type { Category } from './models/ts/Category.ts' -export type { Customer } from './models/ts/Customer.ts' -export type { OrderOrderTypeEnum, OrderStatusEnum, OrderHttpStatusEnum, Order } from './models/ts/Order.ts' -export type { PetStatusEnum, Pet } from './models/ts/Pet.ts' -export type { AddPet200, AddPet405, AddPetMutationRequest, AddPetMutationResponse, AddPetMutation } from './models/ts/petController/AddPet.ts' -export type { - DeletePetPathParams, - DeletePetHeaderParams, - DeletePet400, - DeletePetMutationResponse, - DeletePetMutation, -} from './models/ts/petController/DeletePet.ts' -export type { - FindPetsByStatusPathParams, - FindPetsByStatus200, - FindPetsByStatus400, - FindPetsByStatusQueryResponse, - FindPetsByStatusQuery, -} from './models/ts/petController/FindPetsByStatus.ts' -export type { - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParamsXExampleEnum, - FindPetsByTagsHeaderParams, - FindPetsByTags200, - FindPetsByTags400, - FindPetsByTagsQueryResponse, - FindPetsByTagsQuery, -} from './models/ts/petController/FindPetsByTags.ts' -export type { - GetPetByIdPathParams, - GetPetById200, - GetPetById400, - GetPetById404, - GetPetByIdQueryResponse, - GetPetByIdQuery, -} from './models/ts/petController/GetPetById.ts' -export type { - UpdatePet200, - UpdatePet202, - UpdatePet400, - UpdatePet404, - UpdatePet405, - UpdatePetMutationRequest, - UpdatePetMutationResponse, - UpdatePetMutation, -} from './models/ts/petController/UpdatePet.ts' -export type { - UpdatePetWithFormPathParams, - UpdatePetWithFormQueryParams, - UpdatePetWithForm405, - UpdatePetWithFormMutationResponse, - UpdatePetWithFormMutation, -} from './models/ts/petController/UpdatePetWithForm.ts' -export type { - UploadFilePathParams, - UploadFileQueryParams, - UploadFile200, - UploadFileMutationRequest, - UploadFileMutationResponse, - UploadFileMutation, -} from './models/ts/petController/UploadFile.ts' -export type { PetNotFound } from './models/ts/PetNotFound.ts' -export type { - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParamsXExampleEnum, - CreatePetsHeaderParams, - CreatePets201, - CreatePetsError, - CreatePetsMutationRequest, - CreatePetsMutationResponse, - CreatePetsMutation, -} from './models/ts/petsController/CreatePets.ts' -export type { - DeleteOrderPathParams, - DeleteOrder400, - DeleteOrder404, - DeleteOrderMutationResponse, - DeleteOrderMutation, -} from './models/ts/storeController/DeleteOrder.ts' -export type { GetInventory200, GetInventoryQueryResponse, GetInventoryQuery } from './models/ts/storeController/GetInventory.ts' -export type { - GetOrderByIdPathParams, - GetOrderById200, - GetOrderById400, - GetOrderById404, - GetOrderByIdQueryResponse, - GetOrderByIdQuery, -} from './models/ts/storeController/GetOrderById.ts' -export type { - PlaceOrder200, - PlaceOrder405, - PlaceOrderMutationRequest, - PlaceOrderMutationResponse, - PlaceOrderMutation, -} from './models/ts/storeController/PlaceOrder.ts' -export type { - PlaceOrderPatch200, - PlaceOrderPatch405, - PlaceOrderPatchMutationRequest, - PlaceOrderPatchMutationResponse, - PlaceOrderPatchMutation, -} from './models/ts/storeController/PlaceOrderPatch.ts' -export type { TagTag } from './models/ts/tag/Tag.ts' -export type { User } from './models/ts/User.ts' -export type { UserArray } from './models/ts/UserArray.ts' -export type { CreateUserError, CreateUserMutationRequest, CreateUserMutationResponse, CreateUserMutation } from './models/ts/userController/CreateUser.ts' -export type { - CreateUsersWithListInput200, - CreateUsersWithListInputError, - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, - CreateUsersWithListInputMutation, -} from './models/ts/userController/CreateUsersWithListInput.ts' -export type { - DeleteUserPathParams, - DeleteUser400, - DeleteUser404, - DeleteUserMutationResponse, - DeleteUserMutation, -} from './models/ts/userController/DeleteUser.ts' -export type { - GetUserByNamePathParams, - GetUserByName200, - GetUserByName400, - GetUserByName404, - GetUserByNameQueryResponse, - GetUserByNameQuery, -} from './models/ts/userController/GetUserByName.ts' -export type { LoginUserQueryParams, LoginUser200, LoginUser400, LoginUserQueryResponse, LoginUserQuery } from './models/ts/userController/LoginUser.ts' -export type { LogoutUserError, LogoutUserQueryResponse, LogoutUserQuery } from './models/ts/userController/LogoutUser.ts' -export type { - UpdateUserPathParams, - UpdateUserError, - UpdateUserMutationRequest, - UpdateUserMutationResponse, - UpdateUserMutation, -} from './models/ts/userController/UpdateUser.ts' -export type { AddPetRequestSchema } from './zod/addPetRequestSchema.ts' -export type { AddressSchema } from './zod/addressSchema.ts' -export type { ApiResponseSchema } from './zod/apiResponseSchema.ts' -export type { CategorySchema } from './zod/categorySchema.ts' -export type { CustomerSchema } from './zod/customerSchema.ts' -export type { OrderSchema } from './zod/orderSchema.ts' -export type { AddPet200Schema, AddPet405Schema, AddPetMutationRequestSchema, AddPetMutationResponseSchema } from './zod/petController/addPetSchema.ts' -export type { - DeletePetPathParamsSchema, - DeletePetHeaderParamsSchema, - DeletePet400Schema, - DeletePetMutationResponseSchema, -} from './zod/petController/deletePetSchema.ts' -export type { - FindPetsByStatusPathParamsSchema, - FindPetsByStatus200Schema, - FindPetsByStatus400Schema, - FindPetsByStatusQueryResponseSchema, -} from './zod/petController/findPetsByStatusSchema.ts' -export type { - FindPetsByTagsQueryParamsSchema, - FindPetsByTagsHeaderParamsSchema, - FindPetsByTags200Schema, - FindPetsByTags400Schema, - FindPetsByTagsQueryResponseSchema, -} from './zod/petController/findPetsByTagsSchema.ts' -export type { - GetPetByIdPathParamsSchema, - GetPetById200Schema, - GetPetById400Schema, - GetPetById404Schema, - GetPetByIdQueryResponseSchema, -} from './zod/petController/getPetByIdSchema.ts' -export type { - UpdatePet200Schema, - UpdatePet202Schema, - UpdatePet400Schema, - UpdatePet404Schema, - UpdatePet405Schema, - UpdatePetMutationRequestSchema, - UpdatePetMutationResponseSchema, -} from './zod/petController/updatePetSchema.ts' -export type { - UpdatePetWithFormPathParamsSchema, - UpdatePetWithFormQueryParamsSchema, - UpdatePetWithForm405Schema, - UpdatePetWithFormMutationResponseSchema, -} from './zod/petController/updatePetWithFormSchema.ts' -export type { - UploadFilePathParamsSchema, - UploadFileQueryParamsSchema, - UploadFile200Schema, - UploadFileMutationRequestSchema, - UploadFileMutationResponseSchema, -} from './zod/petController/uploadFileSchema.ts' -export type { PetNotFoundSchema } from './zod/petNotFoundSchema.ts' -export type { PetSchema } from './zod/petSchema.ts' -export type { - CreatePetsPathParamsSchema, - CreatePetsQueryParamsSchema, - CreatePetsHeaderParamsSchema, - CreatePets201Schema, - CreatePetsErrorSchema, - CreatePetsMutationRequestSchema, - CreatePetsMutationResponseSchema, -} from './zod/petsController/createPetsSchema.ts' -export type { TagTagSchema } from './zod/tag/tagSchema.ts' -export type { UserArraySchema } from './zod/userArraySchema.ts' -export type { CreateUserErrorSchema, CreateUserMutationRequestSchema, CreateUserMutationResponseSchema } from './zod/userController/createUserSchema.ts' -export type { - CreateUsersWithListInput200Schema, - CreateUsersWithListInputErrorSchema, - CreateUsersWithListInputMutationRequestSchema, - CreateUsersWithListInputMutationResponseSchema, -} from './zod/userController/createUsersWithListInputSchema.ts' -export type { - DeleteUserPathParamsSchema, - DeleteUser400Schema, - DeleteUser404Schema, - DeleteUserMutationResponseSchema, -} from './zod/userController/deleteUserSchema.ts' -export type { - GetUserByNamePathParamsSchema, - GetUserByName200Schema, - GetUserByName400Schema, - GetUserByName404Schema, - GetUserByNameQueryResponseSchema, -} from './zod/userController/getUserByNameSchema.ts' -export type { LoginUserQueryParamsSchema, LoginUser200Schema, LoginUser400Schema, LoginUserQueryResponseSchema } from './zod/userController/loginUserSchema.ts' -export type { LogoutUserErrorSchema, LogoutUserQueryResponseSchema } from './zod/userController/logoutUserSchema.ts' -export type { - UpdateUserPathParamsSchema, - UpdateUserErrorSchema, - UpdateUserMutationRequestSchema, - UpdateUserMutationResponseSchema, -} from './zod/userController/updateUserSchema.ts' -export type { UserSchema } from './zod/userSchema.ts' -export { operations } from './clients/axios/operations.ts' -export { addPet } from './clients/axios/petService/addPet.ts' -export { deletePet } from './clients/axios/petService/deletePet.ts' -export { findPetsByStatus } from './clients/axios/petService/findPetsByStatus.ts' -export { findPetsByTags } from './clients/axios/petService/findPetsByTags.ts' -export { getPetById } from './clients/axios/petService/getPetById.ts' -export { petService } from './clients/axios/petService/petService.ts' -export { updatePet } from './clients/axios/petService/updatePet.ts' -export { updatePetWithForm } from './clients/axios/petService/updatePetWithForm.ts' -export { uploadFile } from './clients/axios/petService/uploadFile.ts' -export { createPets } from './clients/axios/petsService/createPets.ts' -export { petsService } from './clients/axios/petsService/petsService.ts' -export { createUser } from './clients/axios/userService/createUser.ts' -export { createUsersWithListInput } from './clients/axios/userService/createUsersWithListInput.ts' -export { deleteUser } from './clients/axios/userService/deleteUser.ts' -export { getUserByName } from './clients/axios/userService/getUserByName.ts' -export { loginUser } from './clients/axios/userService/loginUser.ts' -export { logoutUser } from './clients/axios/userService/logoutUser.ts' -export { updateUser } from './clients/axios/userService/updateUser.ts' -export { userService } from './clients/axios/userService/userService.ts' -export { addPetMutationKey, useAddPet } from './clients/hooks/petController/useAddPet.ts' -export { deletePetMutationKey, useDeletePet } from './clients/hooks/petController/useDeletePet.ts' -export { findPetsByStatusQueryKey, findPetsByStatusQueryOptions, useFindPetsByStatus } from './clients/hooks/petController/useFindPetsByStatus.ts' -export { findPetsByTagsQueryKey, findPetsByTagsQueryOptions, useFindPetsByTags } from './clients/hooks/petController/useFindPetsByTags.ts' -export { - findPetsByTagsInfiniteQueryKey, - findPetsByTagsInfiniteQueryOptions, - useFindPetsByTagsInfinite, -} from './clients/hooks/petController/useFindPetsByTagsInfinite.ts' -export { getPetByIdQueryKey, getPetByIdQueryOptions, useGetPetById } from './clients/hooks/petController/useGetPetById.ts' -export { updatePetMutationKey, useUpdatePet } from './clients/hooks/petController/useUpdatePet.ts' -export { updatePetWithFormMutationKey, useUpdatePetWithForm } from './clients/hooks/petController/useUpdatePetWithForm.ts' -export { uploadFileMutationKey, useUploadFile } from './clients/hooks/petController/useUploadFile.ts' -export { createPetsMutationKey, useCreatePets } from './clients/hooks/petsController/useCreatePets.ts' -export { createUserMutationKey, useCreateUser } from './clients/hooks/userController/useCreateUser.ts' -export { createUsersWithListInputMutationKey, useCreateUsersWithListInput } from './clients/hooks/userController/useCreateUsersWithListInput.ts' -export { deleteUserMutationKey, useDeleteUser } from './clients/hooks/userController/useDeleteUser.ts' -export { getUserByNameQueryKey, getUserByNameQueryOptions, useGetUserByName } from './clients/hooks/userController/useGetUserByName.ts' -export { loginUserQueryKey, loginUserQueryOptions, useLoginUser } from './clients/hooks/userController/useLoginUser.ts' -export { logoutUserQueryKey, logoutUserQueryOptions, useLogoutUser } from './clients/hooks/userController/useLogoutUser.ts' -export { updateUserMutationKey, useUpdateUser } from './clients/hooks/userController/useUpdateUser.ts' -export { addPetMutationKeySWR, useAddPetSWR } from './clients/swr/petController/useAddPetSWR.ts' -export { deletePetMutationKeySWR, useDeletePetSWR } from './clients/swr/petController/useDeletePetSWR.ts' -export { findPetsByStatusQueryKeySWR, findPetsByStatusQueryOptionsSWR, useFindPetsByStatusSWR } from './clients/swr/petController/useFindPetsByStatusSWR.ts' -export { findPetsByTagsQueryKeySWR, findPetsByTagsQueryOptionsSWR, useFindPetsByTagsSWR } from './clients/swr/petController/useFindPetsByTagsSWR.ts' -export { getPetByIdQueryKeySWR, getPetByIdQueryOptionsSWR, useGetPetByIdSWR } from './clients/swr/petController/useGetPetByIdSWR.ts' -export { updatePetMutationKeySWR, useUpdatePetSWR } from './clients/swr/petController/useUpdatePetSWR.ts' -export { updatePetWithFormMutationKeySWR, useUpdatePetWithFormSWR } from './clients/swr/petController/useUpdatePetWithFormSWR.ts' -export { uploadFileMutationKeySWR, useUploadFileSWR } from './clients/swr/petController/useUploadFileSWR.ts' -export { createPetsMutationKeySWR, useCreatePetsSWR } from './clients/swr/petsController/useCreatePetsSWR.ts' -export { createUsersWithListInputMutationKeySWR, useCreateUsersWithListInputSWR } from './clients/swr/userController/useCreateUsersWithListInputSWR.ts' -export { createUserMutationKeySWR, useCreateUserSWR } from './clients/swr/userController/useCreateUserSWR.ts' -export { deleteUserMutationKeySWR, useDeleteUserSWR } from './clients/swr/userController/useDeleteUserSWR.ts' -export { getUserByNameQueryKeySWR, getUserByNameQueryOptionsSWR, useGetUserByNameSWR } from './clients/swr/userController/useGetUserByNameSWR.ts' -export { loginUserQueryKeySWR, loginUserQueryOptionsSWR, useLoginUserSWR } from './clients/swr/userController/useLoginUserSWR.ts' -export { logoutUserQueryKeySWR, logoutUserQueryOptionsSWR, useLogoutUserSWR } from './clients/swr/userController/useLogoutUserSWR.ts' -export { updateUserMutationKeySWR, useUpdateUserSWR } from './clients/swr/userController/useUpdateUserSWR.ts' -export { createAddPetRequestFaker } from './mocks/createAddPetRequestFaker.ts' -export { createAddressFaker } from './mocks/createAddressFaker.ts' -export { createApiResponseFaker } from './mocks/createApiResponseFaker.ts' -export { createCategoryFaker } from './mocks/createCategoryFaker.ts' -export { createCustomerFaker } from './mocks/createCustomerFaker.ts' -export { createOrderFaker } from './mocks/createOrderFaker.ts' -export { createPetFaker } from './mocks/createPetFaker.ts' -export { createPetNotFoundFaker } from './mocks/createPetNotFoundFaker.ts' -export { createUserArrayFaker } from './mocks/createUserArrayFaker.ts' -export { createUserFaker } from './mocks/createUserFaker.ts' -export { - createAddPet200Faker, - createAddPet405Faker, - createAddPetMutationRequestFaker, - createAddPetMutationResponseFaker, -} from './mocks/petController/createAddPetFaker.ts' -export { - createDeletePetPathParamsFaker, - createDeletePetHeaderParamsFaker, - createDeletePet400Faker, - createDeletePetMutationResponseFaker, -} from './mocks/petController/createDeletePetFaker.ts' -export { - createFindPetsByStatusPathParamsFaker, - createFindPetsByStatus200Faker, - createFindPetsByStatus400Faker, - createFindPetsByStatusQueryResponseFaker, -} from './mocks/petController/createFindPetsByStatusFaker.ts' -export { - createFindPetsByTagsQueryParamsFaker, - createFindPetsByTagsHeaderParamsFaker, - createFindPetsByTags200Faker, - createFindPetsByTags400Faker, - createFindPetsByTagsQueryResponseFaker, -} from './mocks/petController/createFindPetsByTagsFaker.ts' -export { - createGetPetByIdPathParamsFaker, - createGetPetById200Faker, - createGetPetById400Faker, - createGetPetById404Faker, - createGetPetByIdQueryResponseFaker, -} from './mocks/petController/createGetPetByIdFaker.ts' -export { - createUpdatePet200Faker, - createUpdatePet202Faker, - createUpdatePet400Faker, - createUpdatePet404Faker, - createUpdatePet405Faker, - createUpdatePetMutationRequestFaker, - createUpdatePetMutationResponseFaker, -} from './mocks/petController/createUpdatePetFaker.ts' -export { - createUpdatePetWithFormPathParamsFaker, - createUpdatePetWithFormQueryParamsFaker, - createUpdatePetWithForm405Faker, - createUpdatePetWithFormMutationResponseFaker, -} from './mocks/petController/createUpdatePetWithFormFaker.ts' -export { - createUploadFilePathParamsFaker, - createUploadFileQueryParamsFaker, - createUploadFile200Faker, - createUploadFileMutationRequestFaker, - createUploadFileMutationResponseFaker, -} from './mocks/petController/createUploadFileFaker.ts' -export { - createCreatePetsPathParamsFaker, - createCreatePetsQueryParamsFaker, - createCreatePetsHeaderParamsFaker, - createCreatePets201Faker, - createCreatePetsErrorFaker, - createCreatePetsMutationRequestFaker, - createCreatePetsMutationResponseFaker, -} from './mocks/petsController/createCreatePetsFaker.ts' -export { createTagTagFaker } from './mocks/tag/createTagFaker.ts' -export { - createCreateUserErrorFaker, - createCreateUserMutationRequestFaker, - createCreateUserMutationResponseFaker, -} from './mocks/userController/createCreateUserFaker.ts' -export { - createCreateUsersWithListInput200Faker, - createCreateUsersWithListInputErrorFaker, - createCreateUsersWithListInputMutationRequestFaker, - createCreateUsersWithListInputMutationResponseFaker, -} from './mocks/userController/createCreateUsersWithListInputFaker.ts' -export { - createDeleteUserPathParamsFaker, - createDeleteUser400Faker, - createDeleteUser404Faker, - createDeleteUserMutationResponseFaker, -} from './mocks/userController/createDeleteUserFaker.ts' -export { - createGetUserByNamePathParamsFaker, - createGetUserByName200Faker, - createGetUserByName400Faker, - createGetUserByName404Faker, - createGetUserByNameQueryResponseFaker, -} from './mocks/userController/createGetUserByNameFaker.ts' -export { - createLoginUserQueryParamsFaker, - createLoginUser200Faker, - createLoginUser400Faker, - createLoginUserQueryResponseFaker, -} from './mocks/userController/createLoginUserFaker.ts' -export { createLogoutUserErrorFaker, createLogoutUserQueryResponseFaker } from './mocks/userController/createLogoutUserFaker.ts' -export { - createUpdateUserPathParamsFaker, - createUpdateUserErrorFaker, - createUpdateUserMutationRequestFaker, - createUpdateUserMutationResponseFaker, -} from './mocks/userController/createUpdateUserFaker.ts' -export { addPetRequestStatusEnum } from './models/ts/AddPetRequest.ts' -export { orderOrderTypeEnum, orderStatusEnum, orderHttpStatusEnum } from './models/ts/Order.ts' -export { petStatusEnum } from './models/ts/Pet.ts' -export { findPetsByTagsHeaderParamsXExampleEnum } from './models/ts/petController/FindPetsByTags.ts' -export { createPetsHeaderParamsXExampleEnum } from './models/ts/petsController/CreatePets.ts' -export { handlers } from './msw/handlers.ts' -export { addPetHandler } from './msw/petController/addPetHandler.ts' -export { deletePetHandler } from './msw/petController/deletePetHandler.ts' -export { findPetsByStatusHandler } from './msw/petController/findPetsByStatusHandler.ts' -export { findPetsByTagsHandler } from './msw/petController/findPetsByTagsHandler.ts' -export { getPetByIdHandler } from './msw/petController/getPetByIdHandler.ts' -export { updatePetHandler } from './msw/petController/updatePetHandler.ts' -export { updatePetWithFormHandler } from './msw/petController/updatePetWithFormHandler.ts' -export { uploadFileHandler } from './msw/petController/uploadFileHandler.ts' -export { createPetsHandler } from './msw/petsController/createPetsHandler.ts' -export { createUserHandler } from './msw/userController/createUserHandler.ts' -export { createUsersWithListInputHandler } from './msw/userController/createUsersWithListInputHandler.ts' -export { deleteUserHandler } from './msw/userController/deleteUserHandler.ts' -export { getUserByNameHandler } from './msw/userController/getUserByNameHandler.ts' -export { loginUserHandler } from './msw/userController/loginUserHandler.ts' -export { logoutUserHandler } from './msw/userController/logoutUserHandler.ts' -export { updateUserHandler } from './msw/userController/updateUserHandler.ts' -export { addPetRequestSchema } from './zod/addPetRequestSchema.ts' -export { addressSchema } from './zod/addressSchema.ts' -export { apiResponseSchema } from './zod/apiResponseSchema.ts' -export { categorySchema } from './zod/categorySchema.ts' -export { customerSchema } from './zod/customerSchema.ts' -export { orderSchema } from './zod/orderSchema.ts' -export { addPet200Schema, addPet405Schema, addPetMutationRequestSchema, addPetMutationResponseSchema } from './zod/petController/addPetSchema.ts' -export { - deletePetPathParamsSchema, - deletePetHeaderParamsSchema, - deletePet400Schema, - deletePetMutationResponseSchema, -} from './zod/petController/deletePetSchema.ts' -export { - findPetsByStatusPathParamsSchema, - findPetsByStatus200Schema, - findPetsByStatus400Schema, - findPetsByStatusQueryResponseSchema, -} from './zod/petController/findPetsByStatusSchema.ts' -export { - findPetsByTagsQueryParamsSchema, - findPetsByTagsHeaderParamsSchema, - findPetsByTags200Schema, - findPetsByTags400Schema, - findPetsByTagsQueryResponseSchema, -} from './zod/petController/findPetsByTagsSchema.ts' -export { - getPetByIdPathParamsSchema, - getPetById200Schema, - getPetById400Schema, - getPetById404Schema, - getPetByIdQueryResponseSchema, -} from './zod/petController/getPetByIdSchema.ts' -export { - updatePet200Schema, - updatePet202Schema, - updatePet400Schema, - updatePet404Schema, - updatePet405Schema, - updatePetMutationRequestSchema, - updatePetMutationResponseSchema, -} from './zod/petController/updatePetSchema.ts' -export { - updatePetWithFormPathParamsSchema, - updatePetWithFormQueryParamsSchema, - updatePetWithForm405Schema, - updatePetWithFormMutationResponseSchema, -} from './zod/petController/updatePetWithFormSchema.ts' -export { - uploadFilePathParamsSchema, - uploadFileQueryParamsSchema, - uploadFile200Schema, - uploadFileMutationRequestSchema, - uploadFileMutationResponseSchema, -} from './zod/petController/uploadFileSchema.ts' -export { petNotFoundSchema } from './zod/petNotFoundSchema.ts' -export { petSchema } from './zod/petSchema.ts' -export { - createPetsPathParamsSchema, - createPetsQueryParamsSchema, - createPetsHeaderParamsSchema, - createPets201Schema, - createPetsErrorSchema, - createPetsMutationRequestSchema, - createPetsMutationResponseSchema, -} from './zod/petsController/createPetsSchema.ts' -export { tagTagSchema } from './zod/tag/tagSchema.ts' -export { userArraySchema } from './zod/userArraySchema.ts' -export { createUserErrorSchema, createUserMutationRequestSchema, createUserMutationResponseSchema } from './zod/userController/createUserSchema.ts' -export { - createUsersWithListInput200Schema, - createUsersWithListInputErrorSchema, - createUsersWithListInputMutationRequestSchema, - createUsersWithListInputMutationResponseSchema, -} from './zod/userController/createUsersWithListInputSchema.ts' -export { - deleteUserPathParamsSchema, - deleteUser400Schema, - deleteUser404Schema, - deleteUserMutationResponseSchema, -} from './zod/userController/deleteUserSchema.ts' -export { - getUserByNamePathParamsSchema, - getUserByName200Schema, - getUserByName400Schema, - getUserByName404Schema, - getUserByNameQueryResponseSchema, -} from './zod/userController/getUserByNameSchema.ts' -export { loginUserQueryParamsSchema, loginUser200Schema, loginUser400Schema, loginUserQueryResponseSchema } from './zod/userController/loginUserSchema.ts' -export { logoutUserErrorSchema, logoutUserQueryResponseSchema } from './zod/userController/logoutUserSchema.ts' -export { - updateUserPathParamsSchema, - updateUserErrorSchema, - updateUserMutationRequestSchema, - updateUserMutationResponseSchema, -} from './zod/userController/updateUserSchema.ts' -export { userSchema } from './zod/userSchema.ts' diff --git a/examples/advanced/src/gen/mocks/createAddPetRequestFaker.ts b/examples/advanced/src/gen/mocks/createAddPetRequestFaker.ts deleted file mode 100644 index b132e3e67..000000000 --- a/examples/advanced/src/gen/mocks/createAddPetRequestFaker.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { AddPetRequest } from '../models/ts/AddPetRequest.ts' -import { createCategoryFaker } from './createCategoryFaker.ts' -import { createTagTagFaker } from './tag/createTagFaker.ts' -import { faker } from '@faker-js/faker' - -export function createAddPetRequestFaker(data?: Partial) { - return { - ...{ - id: faker.number.int(), - name: faker.string.alpha(), - category: createCategoryFaker(), - photoUrls: faker.helpers.multiple(() => faker.string.alpha()) as any, - tags: faker.helpers.multiple(() => createTagTagFaker()) as any, - status: faker.helpers.arrayElement(['working', 'idle']) as any, - }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createAddressFaker.ts b/examples/advanced/src/gen/mocks/createAddressFaker.ts deleted file mode 100644 index 4aacff1cf..000000000 --- a/examples/advanced/src/gen/mocks/createAddressFaker.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Address } from '../models/ts/Address.ts' -import { faker } from '@faker-js/faker' - -export function createAddressFaker(data?: Partial
) { - return { - ...{ street: faker.string.alpha(), city: faker.string.alpha(), state: faker.string.alpha(), zip: faker.string.alpha() }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createApiResponseFaker.ts b/examples/advanced/src/gen/mocks/createApiResponseFaker.ts deleted file mode 100644 index 4b26efc68..000000000 --- a/examples/advanced/src/gen/mocks/createApiResponseFaker.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { ApiResponse } from '../models/ts/ApiResponse.ts' -import { faker } from '@faker-js/faker' - -export function createApiResponseFaker(data?: Partial) { - return { - ...{ code: faker.number.int(), type: faker.string.alpha(), message: faker.string.alpha() }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createCategoryFaker.ts b/examples/advanced/src/gen/mocks/createCategoryFaker.ts deleted file mode 100644 index f11ac4255..000000000 --- a/examples/advanced/src/gen/mocks/createCategoryFaker.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Category } from '../models/ts/Category.ts' -import { faker } from '@faker-js/faker' - -export function createCategoryFaker(data?: Partial) { - return { - ...{ id: faker.number.int(), name: faker.string.alpha() }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createCustomerFaker.ts b/examples/advanced/src/gen/mocks/createCustomerFaker.ts deleted file mode 100644 index 6af869085..000000000 --- a/examples/advanced/src/gen/mocks/createCustomerFaker.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Customer } from '../models/ts/Customer.ts' -import { createAddressFaker } from './createAddressFaker.ts' -import { faker } from '@faker-js/faker' - -export function createCustomerFaker(data?: Partial) { - return { - ...{ id: faker.number.int(), username: faker.string.alpha(), address: faker.helpers.multiple(() => createAddressFaker()) as any }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createOrderFaker.ts b/examples/advanced/src/gen/mocks/createOrderFaker.ts deleted file mode 100644 index 6170d81ca..000000000 --- a/examples/advanced/src/gen/mocks/createOrderFaker.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Order } from '../models/ts/Order.ts' -import { faker } from '@faker-js/faker' - -export function createOrderFaker(data?: Partial) { - return { - ...{ - id: faker.number.int(), - petId: faker.number.int(), - quantity: faker.number.int(), - orderType: faker.helpers.arrayElement(['foo', 'bar']), - type: faker.string.alpha(), - shipDate: faker.date.anytime(), - status: faker.helpers.arrayElement(['working', 'idle']) as any, - http_status: faker.helpers.arrayElement(['ok', 'not_found']), - complete: faker.datatype.boolean(), - }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createPetFaker.ts b/examples/advanced/src/gen/mocks/createPetFaker.ts deleted file mode 100644 index 384c0d8f7..000000000 --- a/examples/advanced/src/gen/mocks/createPetFaker.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Pet } from '../models/ts/Pet.ts' -import { createCategoryFaker } from './createCategoryFaker.ts' -import { createTagTagFaker } from './tag/createTagFaker.ts' -import { faker } from '@faker-js/faker' - -export function createPetFaker(data?: Partial) { - return { - ...{ - id: faker.number.int(), - name: faker.string.alpha(), - category: createCategoryFaker(), - photoUrls: faker.helpers.multiple(() => faker.string.alpha()) as any, - tags: faker.helpers.multiple(() => createTagTagFaker()) as any, - status: faker.helpers.arrayElement(['working', 'idle']) as any, - }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createPetNotFoundFaker.ts b/examples/advanced/src/gen/mocks/createPetNotFoundFaker.ts deleted file mode 100644 index d0054045c..000000000 --- a/examples/advanced/src/gen/mocks/createPetNotFoundFaker.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { PetNotFound } from '../models/ts/PetNotFound.ts' -import { faker } from '@faker-js/faker' - -export function createPetNotFoundFaker(data?: Partial) { - return { - ...{ code: faker.number.int(), message: faker.string.alpha() }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/createUserArrayFaker.ts b/examples/advanced/src/gen/mocks/createUserArrayFaker.ts deleted file mode 100644 index f600fadf0..000000000 --- a/examples/advanced/src/gen/mocks/createUserArrayFaker.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { UserArray } from '../models/ts/UserArray.ts' -import { createUserFaker } from './createUserFaker.ts' -import { faker } from '@faker-js/faker' - -export function createUserArrayFaker(data?: Partial) { - return [...(faker.helpers.multiple(() => createUserFaker()) as any), ...(data || [])] -} diff --git a/examples/advanced/src/gen/mocks/createUserFaker.ts b/examples/advanced/src/gen/mocks/createUserFaker.ts deleted file mode 100644 index 1687a5832..000000000 --- a/examples/advanced/src/gen/mocks/createUserFaker.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { User } from '../models/ts/User.ts' -import { faker } from '@faker-js/faker' - -export function createUserFaker(data?: Partial) { - return { - ...{ - id: faker.number.int(), - username: faker.string.alpha(), - uuid: faker.string.uuid(), - firstName: faker.string.alpha(), - lastName: faker.string.alpha(), - email: faker.internet.email(), - password: faker.string.alpha(), - phone: faker.string.alpha(), - userStatus: faker.number.int(), - }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/index.ts b/examples/advanced/src/gen/mocks/index.ts deleted file mode 100644 index 3745a16ee..000000000 --- a/examples/advanced/src/gen/mocks/index.ts +++ /dev/null @@ -1,111 +0,0 @@ -export { createAddPetRequestFaker } from './createAddPetRequestFaker.ts' -export { createAddressFaker } from './createAddressFaker.ts' -export { createApiResponseFaker } from './createApiResponseFaker.ts' -export { createCategoryFaker } from './createCategoryFaker.ts' -export { createCustomerFaker } from './createCustomerFaker.ts' -export { createOrderFaker } from './createOrderFaker.ts' -export { createPetFaker } from './createPetFaker.ts' -export { createPetNotFoundFaker } from './createPetNotFoundFaker.ts' -export { createUserArrayFaker } from './createUserArrayFaker.ts' -export { createUserFaker } from './createUserFaker.ts' -export { - createAddPet200Faker, - createAddPet405Faker, - createAddPetMutationRequestFaker, - createAddPetMutationResponseFaker, -} from './petController/createAddPetFaker.ts' -export { - createDeletePetPathParamsFaker, - createDeletePetHeaderParamsFaker, - createDeletePet400Faker, - createDeletePetMutationResponseFaker, -} from './petController/createDeletePetFaker.ts' -export { - createFindPetsByStatusPathParamsFaker, - createFindPetsByStatus200Faker, - createFindPetsByStatus400Faker, - createFindPetsByStatusQueryResponseFaker, -} from './petController/createFindPetsByStatusFaker.ts' -export { - createFindPetsByTagsQueryParamsFaker, - createFindPetsByTagsHeaderParamsFaker, - createFindPetsByTags200Faker, - createFindPetsByTags400Faker, - createFindPetsByTagsQueryResponseFaker, -} from './petController/createFindPetsByTagsFaker.ts' -export { - createGetPetByIdPathParamsFaker, - createGetPetById200Faker, - createGetPetById400Faker, - createGetPetById404Faker, - createGetPetByIdQueryResponseFaker, -} from './petController/createGetPetByIdFaker.ts' -export { - createUpdatePet200Faker, - createUpdatePet202Faker, - createUpdatePet400Faker, - createUpdatePet404Faker, - createUpdatePet405Faker, - createUpdatePetMutationRequestFaker, - createUpdatePetMutationResponseFaker, -} from './petController/createUpdatePetFaker.ts' -export { - createUpdatePetWithFormPathParamsFaker, - createUpdatePetWithFormQueryParamsFaker, - createUpdatePetWithForm405Faker, - createUpdatePetWithFormMutationResponseFaker, -} from './petController/createUpdatePetWithFormFaker.ts' -export { - createUploadFilePathParamsFaker, - createUploadFileQueryParamsFaker, - createUploadFile200Faker, - createUploadFileMutationRequestFaker, - createUploadFileMutationResponseFaker, -} from './petController/createUploadFileFaker.ts' -export { - createCreatePetsPathParamsFaker, - createCreatePetsQueryParamsFaker, - createCreatePetsHeaderParamsFaker, - createCreatePets201Faker, - createCreatePetsErrorFaker, - createCreatePetsMutationRequestFaker, - createCreatePetsMutationResponseFaker, -} from './petsController/createCreatePetsFaker.ts' -export { createTagTagFaker } from './tag/createTagFaker.ts' -export { - createCreateUserErrorFaker, - createCreateUserMutationRequestFaker, - createCreateUserMutationResponseFaker, -} from './userController/createCreateUserFaker.ts' -export { - createCreateUsersWithListInput200Faker, - createCreateUsersWithListInputErrorFaker, - createCreateUsersWithListInputMutationRequestFaker, - createCreateUsersWithListInputMutationResponseFaker, -} from './userController/createCreateUsersWithListInputFaker.ts' -export { - createDeleteUserPathParamsFaker, - createDeleteUser400Faker, - createDeleteUser404Faker, - createDeleteUserMutationResponseFaker, -} from './userController/createDeleteUserFaker.ts' -export { - createGetUserByNamePathParamsFaker, - createGetUserByName200Faker, - createGetUserByName400Faker, - createGetUserByName404Faker, - createGetUserByNameQueryResponseFaker, -} from './userController/createGetUserByNameFaker.ts' -export { - createLoginUserQueryParamsFaker, - createLoginUser200Faker, - createLoginUser400Faker, - createLoginUserQueryResponseFaker, -} from './userController/createLoginUserFaker.ts' -export { createLogoutUserErrorFaker, createLogoutUserQueryResponseFaker } from './userController/createLogoutUserFaker.ts' -export { - createUpdateUserPathParamsFaker, - createUpdateUserErrorFaker, - createUpdateUserMutationRequestFaker, - createUpdateUserMutationResponseFaker, -} from './userController/createUpdateUserFaker.ts' diff --git a/examples/advanced/src/gen/mocks/petController/createAddPetFaker.ts b/examples/advanced/src/gen/mocks/petController/createAddPetFaker.ts deleted file mode 100644 index b8aef1eb2..000000000 --- a/examples/advanced/src/gen/mocks/petController/createAddPetFaker.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { AddPet405, AddPetMutationResponse } from '../../models/ts/petController/AddPet.ts' -import { createAddPetRequestFaker } from '../createAddPetRequestFaker.ts' -import { createPetFaker } from '../createPetFaker.ts' -import { faker } from '@faker-js/faker' - -/** - * @description Successful operation - */ -export function createAddPet200Faker() { - return createPetFaker() -} - -/** - * @description Pet not found - */ -export function createAddPet405Faker(data?: Partial) { - return { - ...{ code: faker.number.int(), message: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description Create a new pet in the store - */ -export function createAddPetMutationRequestFaker() { - return createAddPetRequestFaker() -} - -export function createAddPetMutationResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createAddPet200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/petController/createDeletePetFaker.ts b/examples/advanced/src/gen/mocks/petController/createDeletePetFaker.ts deleted file mode 100644 index 678a3d0ed..000000000 --- a/examples/advanced/src/gen/mocks/petController/createDeletePetFaker.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DeletePetPathParams, DeletePetHeaderParams } from '../../models/ts/petController/DeletePet.ts' -import { faker } from '@faker-js/faker' - -export function createDeletePetPathParamsFaker(data?: Partial) { - return { - ...{ petId: faker.number.int() }, - ...(data || {}), - } -} - -export function createDeletePetHeaderParamsFaker(data?: Partial) { - return { - ...{ api_key: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description Invalid pet value - */ -export function createDeletePet400Faker() { - return undefined -} - -export function createDeletePetMutationResponseFaker() { - return undefined -} diff --git a/examples/advanced/src/gen/mocks/petController/createFindPetsByStatusFaker.ts b/examples/advanced/src/gen/mocks/petController/createFindPetsByStatusFaker.ts deleted file mode 100644 index fad11a902..000000000 --- a/examples/advanced/src/gen/mocks/petController/createFindPetsByStatusFaker.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { FindPetsByStatusPathParams, FindPetsByStatus200, FindPetsByStatusQueryResponse } from '../../models/ts/petController/FindPetsByStatus.ts' -import { createPetFaker } from '../createPetFaker.ts' -import { faker } from '@faker-js/faker' - -export function createFindPetsByStatusPathParamsFaker(data?: Partial) { - return { - ...{ step_id: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description successful operation - */ -export function createFindPetsByStatus200Faker(data?: Partial) { - return [...(faker.helpers.multiple(() => createPetFaker(), { count: { min: 1, max: 3 } }) as any), ...(data || [])] -} - -/** - * @description Invalid status value - */ -export function createFindPetsByStatus400Faker() { - return undefined -} - -export function createFindPetsByStatusQueryResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createFindPetsByStatus200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/petController/createFindPetsByTagsFaker.ts b/examples/advanced/src/gen/mocks/petController/createFindPetsByTagsFaker.ts deleted file mode 100644 index 4e5fdde22..000000000 --- a/examples/advanced/src/gen/mocks/petController/createFindPetsByTagsFaker.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParams, - FindPetsByTags200, - FindPetsByTagsQueryResponse, -} from '../../models/ts/petController/FindPetsByTags.ts' -import { createPetFaker } from '../createPetFaker.ts' -import { faker } from '@faker-js/faker' - -export function createFindPetsByTagsQueryParamsFaker(data?: Partial) { - return { - ...{ tags: faker.helpers.multiple(() => faker.string.alpha()) as any, page: faker.string.alpha(), pageSize: faker.string.alpha() }, - ...(data || {}), - } -} - -export function createFindPetsByTagsHeaderParamsFaker(data?: Partial) { - return { - ...{ 'X-EXAMPLE': faker.helpers.arrayElement(['ONE', 'TWO', 'THREE']) }, - ...(data || {}), - } -} - -/** - * @description successful operation - */ -export function createFindPetsByTags200Faker(data?: Partial) { - return [...(faker.helpers.multiple(() => createPetFaker()) as any), ...(data || [])] -} - -/** - * @description Invalid tag value - */ -export function createFindPetsByTags400Faker() { - return undefined -} - -export function createFindPetsByTagsQueryResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createFindPetsByTags200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/petController/createGetPetByIdFaker.ts b/examples/advanced/src/gen/mocks/petController/createGetPetByIdFaker.ts deleted file mode 100644 index cd48dbeeb..000000000 --- a/examples/advanced/src/gen/mocks/petController/createGetPetByIdFaker.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { GetPetByIdPathParams, GetPetByIdQueryResponse } from '../../models/ts/petController/GetPetById.ts' -import { createPetFaker } from '../createPetFaker.ts' -import { faker } from '@faker-js/faker' - -export function createGetPetByIdPathParamsFaker(data?: Partial) { - return { - ...{ petId: faker.number.int() }, - ...(data || {}), - } -} - -/** - * @description successful operation - */ -export function createGetPetById200Faker() { - return createPetFaker() -} - -/** - * @description Invalid ID supplied - */ -export function createGetPetById400Faker() { - return undefined -} - -/** - * @description Pet not found - */ -export function createGetPetById404Faker() { - return undefined -} - -export function createGetPetByIdQueryResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createGetPetById200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/petController/createUpdatePetFaker.ts b/examples/advanced/src/gen/mocks/petController/createUpdatePetFaker.ts deleted file mode 100644 index 47c9c1ec8..000000000 --- a/examples/advanced/src/gen/mocks/petController/createUpdatePetFaker.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { UpdatePet202, UpdatePetMutationResponse } from '../../models/ts/petController/UpdatePet.ts' -import { createPetFaker } from '../createPetFaker.ts' -import { faker } from '@faker-js/faker' - -/** - * @description Successful operation - */ -export function createUpdatePet200Faker() { - return createPetFaker() -} - -/** - * @description accepted operation - */ -export function createUpdatePet202Faker(data?: Partial) { - return { - ...{ id: faker.number.int() }, - ...(data || {}), - } -} - -/** - * @description Invalid ID supplied - */ -export function createUpdatePet400Faker() { - return undefined -} - -/** - * @description Pet not found - */ -export function createUpdatePet404Faker() { - return undefined -} - -/** - * @description Validation exception - */ -export function createUpdatePet405Faker() { - return undefined -} - -/** - * @description Update an existent pet in the store - */ -export function createUpdatePetMutationRequestFaker() { - return createPetFaker() -} - -export function createUpdatePetMutationResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createUpdatePet200Faker(), createUpdatePet202Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/petController/createUpdatePetWithFormFaker.ts b/examples/advanced/src/gen/mocks/petController/createUpdatePetWithFormFaker.ts deleted file mode 100644 index bc38678c9..000000000 --- a/examples/advanced/src/gen/mocks/petController/createUpdatePetWithFormFaker.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { UpdatePetWithFormPathParams, UpdatePetWithFormQueryParams } from '../../models/ts/petController/UpdatePetWithForm.ts' -import { faker } from '@faker-js/faker' - -export function createUpdatePetWithFormPathParamsFaker(data?: Partial) { - return { - ...{ petId: faker.number.int() }, - ...(data || {}), - } -} - -export function createUpdatePetWithFormQueryParamsFaker(data?: Partial) { - return { - ...{ name: faker.string.alpha(), status: faker.helpers.arrayElement(['working', 'idle']) as any }, - ...(data || {}), - } -} - -/** - * @description Invalid input - */ -export function createUpdatePetWithForm405Faker() { - return undefined -} - -export function createUpdatePetWithFormMutationResponseFaker() { - return undefined -} diff --git a/examples/advanced/src/gen/mocks/petController/createUploadFileFaker.ts b/examples/advanced/src/gen/mocks/petController/createUploadFileFaker.ts deleted file mode 100644 index 60bb193ab..000000000 --- a/examples/advanced/src/gen/mocks/petController/createUploadFileFaker.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { UploadFilePathParams, UploadFileQueryParams, UploadFileMutationResponse } from '../../models/ts/petController/UploadFile.ts' -import { createApiResponseFaker } from '../createApiResponseFaker.ts' -import { faker } from '@faker-js/faker' - -export function createUploadFilePathParamsFaker(data?: Partial) { - return { - ...{ petId: faker.number.int() }, - ...(data || {}), - } -} - -export function createUploadFileQueryParamsFaker(data?: Partial) { - return { - ...{ additionalMetadata: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description successful operation - */ -export function createUploadFile200Faker() { - return createApiResponseFaker() -} - -export function createUploadFileMutationRequestFaker() { - return faker.image.url() as unknown as Blob -} - -export function createUploadFileMutationResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createUploadFile200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/petController/index.ts b/examples/advanced/src/gen/mocks/petController/index.ts deleted file mode 100644 index f1cee63b4..000000000 --- a/examples/advanced/src/gen/mocks/petController/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -export { createAddPet200Faker, createAddPet405Faker, createAddPetMutationRequestFaker, createAddPetMutationResponseFaker } from './createAddPetFaker.ts' -export { - createDeletePetPathParamsFaker, - createDeletePetHeaderParamsFaker, - createDeletePet400Faker, - createDeletePetMutationResponseFaker, -} from './createDeletePetFaker.ts' -export { - createFindPetsByStatusPathParamsFaker, - createFindPetsByStatus200Faker, - createFindPetsByStatus400Faker, - createFindPetsByStatusQueryResponseFaker, -} from './createFindPetsByStatusFaker.ts' -export { - createFindPetsByTagsQueryParamsFaker, - createFindPetsByTagsHeaderParamsFaker, - createFindPetsByTags200Faker, - createFindPetsByTags400Faker, - createFindPetsByTagsQueryResponseFaker, -} from './createFindPetsByTagsFaker.ts' -export { - createGetPetByIdPathParamsFaker, - createGetPetById200Faker, - createGetPetById400Faker, - createGetPetById404Faker, - createGetPetByIdQueryResponseFaker, -} from './createGetPetByIdFaker.ts' -export { - createUpdatePet200Faker, - createUpdatePet202Faker, - createUpdatePet400Faker, - createUpdatePet404Faker, - createUpdatePet405Faker, - createUpdatePetMutationRequestFaker, - createUpdatePetMutationResponseFaker, -} from './createUpdatePetFaker.ts' -export { - createUpdatePetWithFormPathParamsFaker, - createUpdatePetWithFormQueryParamsFaker, - createUpdatePetWithForm405Faker, - createUpdatePetWithFormMutationResponseFaker, -} from './createUpdatePetWithFormFaker.ts' -export { - createUploadFilePathParamsFaker, - createUploadFileQueryParamsFaker, - createUploadFile200Faker, - createUploadFileMutationRequestFaker, - createUploadFileMutationResponseFaker, -} from './createUploadFileFaker.ts' diff --git a/examples/advanced/src/gen/mocks/petsController/createCreatePetsFaker.ts b/examples/advanced/src/gen/mocks/petsController/createCreatePetsFaker.ts deleted file mode 100644 index 2a7259192..000000000 --- a/examples/advanced/src/gen/mocks/petsController/createCreatePetsFaker.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParams, - CreatePetsMutationRequest, - CreatePetsMutationResponse, -} from '../../models/ts/petsController/CreatePets.ts' -import { createPetNotFoundFaker } from '../createPetNotFoundFaker.ts' -import { faker } from '@faker-js/faker' - -export function createCreatePetsPathParamsFaker(data?: Partial) { - return { - ...{ uuid: faker.string.alpha() }, - ...(data || {}), - } -} - -export function createCreatePetsQueryParamsFaker(data?: Partial) { - return { - ...{ offset: faker.number.int() }, - ...(data || {}), - } -} - -export function createCreatePetsHeaderParamsFaker(data?: Partial) { - return { - ...{ 'X-EXAMPLE': faker.helpers.arrayElement(['ONE', 'TWO', 'THREE']) }, - ...(data || {}), - } -} - -/** - * @description Null response - */ -export function createCreatePets201Faker() { - return undefined -} - -/** - * @description unexpected error - */ -export function createCreatePetsErrorFaker() { - return createPetNotFoundFaker() -} - -export function createCreatePetsMutationRequestFaker(data?: Partial) { - return { - ...{ name: faker.string.alpha(), tag: faker.string.alpha() }, - ...(data || {}), - } -} - -export function createCreatePetsMutationResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createCreatePets201Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/petsController/index.ts b/examples/advanced/src/gen/mocks/petsController/index.ts deleted file mode 100644 index c433a19bc..000000000 --- a/examples/advanced/src/gen/mocks/petsController/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { - createCreatePetsPathParamsFaker, - createCreatePetsQueryParamsFaker, - createCreatePetsHeaderParamsFaker, - createCreatePets201Faker, - createCreatePetsErrorFaker, - createCreatePetsMutationRequestFaker, - createCreatePetsMutationResponseFaker, -} from './createCreatePetsFaker.ts' diff --git a/examples/advanced/src/gen/mocks/tag/createTagFaker.ts b/examples/advanced/src/gen/mocks/tag/createTagFaker.ts deleted file mode 100644 index 842f069c9..000000000 --- a/examples/advanced/src/gen/mocks/tag/createTagFaker.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { TagTag } from '../../models/ts/tag/Tag.ts' -import { faker } from '@faker-js/faker' - -export function createTagTagFaker(data?: Partial) { - return { - ...{ id: faker.number.int(), name: faker.string.alpha() }, - ...(data || {}), - } -} diff --git a/examples/advanced/src/gen/mocks/tag/index.ts b/examples/advanced/src/gen/mocks/tag/index.ts deleted file mode 100644 index 49611d3de..000000000 --- a/examples/advanced/src/gen/mocks/tag/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { createTagTagFaker } from './createTagFaker.ts' diff --git a/examples/advanced/src/gen/mocks/userController/createCreateUserFaker.ts b/examples/advanced/src/gen/mocks/userController/createCreateUserFaker.ts deleted file mode 100644 index 61eacef2e..000000000 --- a/examples/advanced/src/gen/mocks/userController/createCreateUserFaker.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { createUserFaker } from '../createUserFaker.ts' - -/** - * @description successful operation - */ -export function createCreateUserErrorFaker() { - return createUserFaker() -} - -/** - * @description Created user object - */ -export function createCreateUserMutationRequestFaker() { - return createUserFaker() -} - -export function createCreateUserMutationResponseFaker() { - return undefined -} diff --git a/examples/advanced/src/gen/mocks/userController/createCreateUsersWithListInputFaker.ts b/examples/advanced/src/gen/mocks/userController/createCreateUsersWithListInputFaker.ts deleted file mode 100644 index befb36eb1..000000000 --- a/examples/advanced/src/gen/mocks/userController/createCreateUsersWithListInputFaker.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, -} from '../../models/ts/userController/CreateUsersWithListInput.ts' -import { createUserFaker } from '../createUserFaker.ts' -import { faker } from '@faker-js/faker' - -/** - * @description Successful operation - */ -export function createCreateUsersWithListInput200Faker() { - return createUserFaker() -} - -/** - * @description successful operation - */ -export function createCreateUsersWithListInputErrorFaker() { - return undefined -} - -export function createCreateUsersWithListInputMutationRequestFaker(data?: Partial) { - return [...(faker.helpers.multiple(() => createUserFaker()) as any), ...(data || [])] -} - -export function createCreateUsersWithListInputMutationResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createCreateUsersWithListInput200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/userController/createDeleteUserFaker.ts b/examples/advanced/src/gen/mocks/userController/createDeleteUserFaker.ts deleted file mode 100644 index f82ce87a8..000000000 --- a/examples/advanced/src/gen/mocks/userController/createDeleteUserFaker.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DeleteUserPathParams } from '../../models/ts/userController/DeleteUser.ts' -import { faker } from '@faker-js/faker' - -export function createDeleteUserPathParamsFaker(data?: Partial) { - return { - ...{ username: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description Invalid username supplied - */ -export function createDeleteUser400Faker() { - return undefined -} - -/** - * @description User not found - */ -export function createDeleteUser404Faker() { - return undefined -} - -export function createDeleteUserMutationResponseFaker() { - return undefined -} diff --git a/examples/advanced/src/gen/mocks/userController/createGetUserByNameFaker.ts b/examples/advanced/src/gen/mocks/userController/createGetUserByNameFaker.ts deleted file mode 100644 index eeedc39cc..000000000 --- a/examples/advanced/src/gen/mocks/userController/createGetUserByNameFaker.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { GetUserByNamePathParams, GetUserByNameQueryResponse } from '../../models/ts/userController/GetUserByName.ts' -import { createUserFaker } from '../createUserFaker.ts' -import { faker } from '@faker-js/faker' - -export function createGetUserByNamePathParamsFaker(data?: Partial) { - return { - ...{ username: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description successful operation - */ -export function createGetUserByName200Faker() { - return createUserFaker() -} - -/** - * @description Invalid username supplied - */ -export function createGetUserByName400Faker() { - return undefined -} - -/** - * @description User not found - */ -export function createGetUserByName404Faker() { - return undefined -} - -export function createGetUserByNameQueryResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createGetUserByName200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/userController/createLoginUserFaker.ts b/examples/advanced/src/gen/mocks/userController/createLoginUserFaker.ts deleted file mode 100644 index 1f8d5c182..000000000 --- a/examples/advanced/src/gen/mocks/userController/createLoginUserFaker.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { LoginUserQueryParams, LoginUserQueryResponse } from '../../models/ts/userController/LoginUser.ts' -import { faker } from '@faker-js/faker' - -export function createLoginUserQueryParamsFaker(data?: Partial) { - return { - ...{ username: faker.string.alpha(), password: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description successful operation - */ -export function createLoginUser200Faker() { - return faker.string.alpha() -} - -/** - * @description Invalid username/password supplied - */ -export function createLoginUser400Faker() { - return undefined -} - -export function createLoginUserQueryResponseFaker(data?: Partial) { - return data || faker.helpers.arrayElement([createLoginUser200Faker()]) -} diff --git a/examples/advanced/src/gen/mocks/userController/createLogoutUserFaker.ts b/examples/advanced/src/gen/mocks/userController/createLogoutUserFaker.ts deleted file mode 100644 index 7bfcf509c..000000000 --- a/examples/advanced/src/gen/mocks/userController/createLogoutUserFaker.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @description successful operation - */ -export function createLogoutUserErrorFaker() { - return undefined -} - -export function createLogoutUserQueryResponseFaker() { - return undefined -} diff --git a/examples/advanced/src/gen/mocks/userController/createUpdateUserFaker.ts b/examples/advanced/src/gen/mocks/userController/createUpdateUserFaker.ts deleted file mode 100644 index f1c428561..000000000 --- a/examples/advanced/src/gen/mocks/userController/createUpdateUserFaker.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { UpdateUserPathParams } from '../../models/ts/userController/UpdateUser.ts' -import { createUserFaker } from '../createUserFaker.ts' -import { faker } from '@faker-js/faker' - -export function createUpdateUserPathParamsFaker(data?: Partial) { - return { - ...{ username: faker.string.alpha() }, - ...(data || {}), - } -} - -/** - * @description successful operation - */ -export function createUpdateUserErrorFaker() { - return undefined -} - -/** - * @description Update an existent user in the store - */ -export function createUpdateUserMutationRequestFaker() { - return createUserFaker() -} - -export function createUpdateUserMutationResponseFaker() { - return undefined -} diff --git a/examples/advanced/src/gen/mocks/userController/index.ts b/examples/advanced/src/gen/mocks/userController/index.ts deleted file mode 100644 index 5d7536149..000000000 --- a/examples/advanced/src/gen/mocks/userController/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -export { createCreateUserErrorFaker, createCreateUserMutationRequestFaker, createCreateUserMutationResponseFaker } from './createCreateUserFaker.ts' -export { - createCreateUsersWithListInput200Faker, - createCreateUsersWithListInputErrorFaker, - createCreateUsersWithListInputMutationRequestFaker, - createCreateUsersWithListInputMutationResponseFaker, -} from './createCreateUsersWithListInputFaker.ts' -export { - createDeleteUserPathParamsFaker, - createDeleteUser400Faker, - createDeleteUser404Faker, - createDeleteUserMutationResponseFaker, -} from './createDeleteUserFaker.ts' -export { - createGetUserByNamePathParamsFaker, - createGetUserByName200Faker, - createGetUserByName400Faker, - createGetUserByName404Faker, - createGetUserByNameQueryResponseFaker, -} from './createGetUserByNameFaker.ts' -export { createLoginUserQueryParamsFaker, createLoginUser200Faker, createLoginUser400Faker, createLoginUserQueryResponseFaker } from './createLoginUserFaker.ts' -export { createLogoutUserErrorFaker, createLogoutUserQueryResponseFaker } from './createLogoutUserFaker.ts' -export { - createUpdateUserPathParamsFaker, - createUpdateUserErrorFaker, - createUpdateUserMutationRequestFaker, - createUpdateUserMutationResponseFaker, -} from './createUpdateUserFaker.ts' diff --git a/examples/advanced/src/gen/models/ts/AddPetRequest.ts b/examples/advanced/src/gen/models/ts/AddPetRequest.ts deleted file mode 100644 index 92ed6dba7..000000000 --- a/examples/advanced/src/gen/models/ts/AddPetRequest.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { Category } from './Category.ts' -import type { TagTag } from './tag/Tag.ts' - -export const addPetRequestStatusEnum = { - available: 'available', - pending: 'pending', - sold: 'sold', -} as const - -export type AddPetRequestStatusEnum = (typeof addPetRequestStatusEnum)[keyof typeof addPetRequestStatusEnum] - -export type AddPetRequest = { - /** - * @type integer | undefined, int64 - */ - id?: number - /** - * @type string - */ - name: string - /** - * @type object | undefined - */ - category?: Category - /** - * @type array - */ - photoUrls: string[] - /** - * @type array | undefined - */ - tags?: TagTag[] - /** - * @description pet status in the store - * @type string | undefined - */ - status?: AddPetRequestStatusEnum -} diff --git a/examples/advanced/src/gen/models/ts/Address.ts b/examples/advanced/src/gen/models/ts/Address.ts deleted file mode 100644 index eb578826d..000000000 --- a/examples/advanced/src/gen/models/ts/Address.ts +++ /dev/null @@ -1,18 +0,0 @@ -export type Address = { - /** - * @type string | undefined - */ - street?: string - /** - * @type string | undefined - */ - city?: string - /** - * @type string | undefined - */ - state?: string - /** - * @type string | undefined - */ - zip?: string -} diff --git a/examples/advanced/src/gen/models/ts/ApiResponse.ts b/examples/advanced/src/gen/models/ts/ApiResponse.ts deleted file mode 100644 index 3a6dae779..000000000 --- a/examples/advanced/src/gen/models/ts/ApiResponse.ts +++ /dev/null @@ -1,14 +0,0 @@ -export type ApiResponse = { - /** - * @type integer | undefined, int32 - */ - code?: number - /** - * @type string | undefined - */ - type?: string - /** - * @type string | undefined - */ - message?: string -} diff --git a/examples/advanced/src/gen/models/ts/Category.ts b/examples/advanced/src/gen/models/ts/Category.ts deleted file mode 100644 index 3b48c48f3..000000000 --- a/examples/advanced/src/gen/models/ts/Category.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type Category = { - /** - * @type integer | undefined, int64 - */ - id?: number - /** - * @type string | undefined - */ - name?: string -} diff --git a/examples/advanced/src/gen/models/ts/Customer.ts b/examples/advanced/src/gen/models/ts/Customer.ts deleted file mode 100644 index dea157e6e..000000000 --- a/examples/advanced/src/gen/models/ts/Customer.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Address } from './Address.ts' - -export type Customer = { - /** - * @type integer | undefined, int64 - */ - id?: number - /** - * @type string | undefined - */ - username?: string - /** - * @type array | undefined - */ - address?: Address[] -} diff --git a/examples/advanced/src/gen/models/ts/Order.ts b/examples/advanced/src/gen/models/ts/Order.ts deleted file mode 100644 index 0ab5189c0..000000000 --- a/examples/advanced/src/gen/models/ts/Order.ts +++ /dev/null @@ -1,63 +0,0 @@ -export const orderOrderTypeEnum = { - foo: 'foo', - bar: 'bar', -} as const - -export type OrderOrderTypeEnum = (typeof orderOrderTypeEnum)[keyof typeof orderOrderTypeEnum] - -export const orderStatusEnum = { - placed: 'placed', - approved: 'approved', - delivered: 'delivered', -} as const - -export type OrderStatusEnum = (typeof orderStatusEnum)[keyof typeof orderStatusEnum] - -export const orderHttpStatusEnum = { - ok: 200, - not_found: 400, -} as const - -export type OrderHttpStatusEnum = (typeof orderHttpStatusEnum)[keyof typeof orderHttpStatusEnum] - -export type Order = { - /** - * @type integer | undefined, int64 - */ - id?: number - /** - * @type integer | undefined, int64 - */ - petId?: number - /** - * @type integer | undefined, int32 - */ - quantity?: number - /** - * @type string | undefined - */ - orderType?: OrderOrderTypeEnum - /** - * @description Order Status - * @type string | undefined - */ - type?: string - /** - * @type string | undefined, date-time - */ - shipDate?: string - /** - * @description Order Status - * @type string | undefined - */ - status?: OrderStatusEnum - /** - * @description HTTP Status - * @type number | undefined - */ - http_status?: OrderHttpStatusEnum - /** - * @type boolean | undefined - */ - complete?: boolean -} diff --git a/examples/advanced/src/gen/models/ts/Pet.ts b/examples/advanced/src/gen/models/ts/Pet.ts deleted file mode 100644 index 24516fd05..000000000 --- a/examples/advanced/src/gen/models/ts/Pet.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { Category } from './Category.ts' -import type { TagTag } from './tag/Tag.ts' - -export const petStatusEnum = { - available: 'available', - pending: 'pending', - sold: 'sold', -} as const - -export type PetStatusEnum = (typeof petStatusEnum)[keyof typeof petStatusEnum] - -export type Pet = { - /** - * @type integer | undefined, int64 - */ - readonly id?: number - /** - * @type string - */ - name: string - /** - * @type object | undefined - */ - category?: Category - /** - * @type array - */ - photoUrls: string[] - /** - * @type array | undefined - */ - tags?: TagTag[] - /** - * @description pet status in the store - * @type string | undefined - */ - status?: PetStatusEnum -} diff --git a/examples/advanced/src/gen/models/ts/PetNotFound.ts b/examples/advanced/src/gen/models/ts/PetNotFound.ts deleted file mode 100644 index adad1616d..000000000 --- a/examples/advanced/src/gen/models/ts/PetNotFound.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type PetNotFound = { - /** - * @type integer | undefined, int32 - */ - code?: number - /** - * @type string | undefined - */ - message?: string -} diff --git a/examples/advanced/src/gen/models/ts/User.ts b/examples/advanced/src/gen/models/ts/User.ts deleted file mode 100644 index 4aa4d6eec..000000000 --- a/examples/advanced/src/gen/models/ts/User.ts +++ /dev/null @@ -1,40 +0,0 @@ -export type User = { - /** - * @type integer | undefined, int64 - */ - id?: number - /** - * @type string | undefined - */ - username?: string - /** - * @deprecated - * @type string | undefined, uuid - */ - uuid?: string - /** - * @type string | undefined - */ - firstName?: string - /** - * @type string | undefined - */ - lastName?: string - /** - * @type string | undefined, email - */ - email?: string - /** - * @type string | undefined - */ - password?: string - /** - * @type string | undefined - */ - phone?: string - /** - * @description User Status - * @type integer | undefined, int32 - */ - userStatus?: number -} diff --git a/examples/advanced/src/gen/models/ts/UserArray.ts b/examples/advanced/src/gen/models/ts/UserArray.ts deleted file mode 100644 index 3b7eef0e8..000000000 --- a/examples/advanced/src/gen/models/ts/UserArray.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { User } from './User.ts' - -export type UserArray = User[] diff --git a/examples/advanced/src/gen/models/ts/index.ts b/examples/advanced/src/gen/models/ts/index.ts deleted file mode 100644 index 5aa967db2..000000000 --- a/examples/advanced/src/gen/models/ts/index.ts +++ /dev/null @@ -1,115 +0,0 @@ -export type { AddPetRequestStatusEnum, AddPetRequest } from './AddPetRequest.ts' -export type { Address } from './Address.ts' -export type { ApiResponse } from './ApiResponse.ts' -export type { Category } from './Category.ts' -export type { Customer } from './Customer.ts' -export type { OrderOrderTypeEnum, OrderStatusEnum, OrderHttpStatusEnum, Order } from './Order.ts' -export type { PetStatusEnum, Pet } from './Pet.ts' -export type { AddPet200, AddPet405, AddPetMutationRequest, AddPetMutationResponse, AddPetMutation } from './petController/AddPet.ts' -export type { DeletePetPathParams, DeletePetHeaderParams, DeletePet400, DeletePetMutationResponse, DeletePetMutation } from './petController/DeletePet.ts' -export type { - FindPetsByStatusPathParams, - FindPetsByStatus200, - FindPetsByStatus400, - FindPetsByStatusQueryResponse, - FindPetsByStatusQuery, -} from './petController/FindPetsByStatus.ts' -export type { - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParamsXExampleEnum, - FindPetsByTagsHeaderParams, - FindPetsByTags200, - FindPetsByTags400, - FindPetsByTagsQueryResponse, - FindPetsByTagsQuery, -} from './petController/FindPetsByTags.ts' -export type { GetPetByIdPathParams, GetPetById200, GetPetById400, GetPetById404, GetPetByIdQueryResponse, GetPetByIdQuery } from './petController/GetPetById.ts' -export type { - UpdatePet200, - UpdatePet202, - UpdatePet400, - UpdatePet404, - UpdatePet405, - UpdatePetMutationRequest, - UpdatePetMutationResponse, - UpdatePetMutation, -} from './petController/UpdatePet.ts' -export type { - UpdatePetWithFormPathParams, - UpdatePetWithFormQueryParams, - UpdatePetWithForm405, - UpdatePetWithFormMutationResponse, - UpdatePetWithFormMutation, -} from './petController/UpdatePetWithForm.ts' -export type { - UploadFilePathParams, - UploadFileQueryParams, - UploadFile200, - UploadFileMutationRequest, - UploadFileMutationResponse, - UploadFileMutation, -} from './petController/UploadFile.ts' -export type { PetNotFound } from './PetNotFound.ts' -export type { - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParamsXExampleEnum, - CreatePetsHeaderParams, - CreatePets201, - CreatePetsError, - CreatePetsMutationRequest, - CreatePetsMutationResponse, - CreatePetsMutation, -} from './petsController/CreatePets.ts' -export type { DeleteOrderPathParams, DeleteOrder400, DeleteOrder404, DeleteOrderMutationResponse, DeleteOrderMutation } from './storeController/DeleteOrder.ts' -export type { GetInventory200, GetInventoryQueryResponse, GetInventoryQuery } from './storeController/GetInventory.ts' -export type { - GetOrderByIdPathParams, - GetOrderById200, - GetOrderById400, - GetOrderById404, - GetOrderByIdQueryResponse, - GetOrderByIdQuery, -} from './storeController/GetOrderById.ts' -export type { PlaceOrder200, PlaceOrder405, PlaceOrderMutationRequest, PlaceOrderMutationResponse, PlaceOrderMutation } from './storeController/PlaceOrder.ts' -export type { - PlaceOrderPatch200, - PlaceOrderPatch405, - PlaceOrderPatchMutationRequest, - PlaceOrderPatchMutationResponse, - PlaceOrderPatchMutation, -} from './storeController/PlaceOrderPatch.ts' -export type { TagTag } from './tag/Tag.ts' -export type { User } from './User.ts' -export type { UserArray } from './UserArray.ts' -export type { CreateUserError, CreateUserMutationRequest, CreateUserMutationResponse, CreateUserMutation } from './userController/CreateUser.ts' -export type { - CreateUsersWithListInput200, - CreateUsersWithListInputError, - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, - CreateUsersWithListInputMutation, -} from './userController/CreateUsersWithListInput.ts' -export type { DeleteUserPathParams, DeleteUser400, DeleteUser404, DeleteUserMutationResponse, DeleteUserMutation } from './userController/DeleteUser.ts' -export type { - GetUserByNamePathParams, - GetUserByName200, - GetUserByName400, - GetUserByName404, - GetUserByNameQueryResponse, - GetUserByNameQuery, -} from './userController/GetUserByName.ts' -export type { LoginUserQueryParams, LoginUser200, LoginUser400, LoginUserQueryResponse, LoginUserQuery } from './userController/LoginUser.ts' -export type { LogoutUserError, LogoutUserQueryResponse, LogoutUserQuery } from './userController/LogoutUser.ts' -export type { - UpdateUserPathParams, - UpdateUserError, - UpdateUserMutationRequest, - UpdateUserMutationResponse, - UpdateUserMutation, -} from './userController/UpdateUser.ts' -export { addPetRequestStatusEnum } from './AddPetRequest.ts' -export { orderOrderTypeEnum, orderStatusEnum, orderHttpStatusEnum } from './Order.ts' -export { petStatusEnum } from './Pet.ts' -export { findPetsByTagsHeaderParamsXExampleEnum } from './petController/FindPetsByTags.ts' -export { createPetsHeaderParamsXExampleEnum } from './petsController/CreatePets.ts' diff --git a/examples/advanced/src/gen/models/ts/petController/AddPet.ts b/examples/advanced/src/gen/models/ts/petController/AddPet.ts deleted file mode 100644 index 5e44859f5..000000000 --- a/examples/advanced/src/gen/models/ts/petController/AddPet.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { AddPetRequest } from '../AddPetRequest.ts' -import type { Pet } from '../Pet.ts' - -/** - * @description Successful operation - */ -export type AddPet200 = Omit, 'name'> - -/** - * @description Pet not found - */ -export type AddPet405 = { - /** - * @type integer | undefined, int32 - */ - code?: number - /** - * @type string | undefined - */ - message?: string -} - -/** - * @description Create a new pet in the store - */ -export type AddPetMutationRequest = AddPetRequest - -export type AddPetMutationResponse = AddPet200 - -export type AddPetMutation = { - Response: AddPet200 - Request: AddPetMutationRequest - Errors: AddPet405 -} diff --git a/examples/advanced/src/gen/models/ts/petController/DeletePet.ts b/examples/advanced/src/gen/models/ts/petController/DeletePet.ts deleted file mode 100644 index ec4506cf7..000000000 --- a/examples/advanced/src/gen/models/ts/petController/DeletePet.ts +++ /dev/null @@ -1,28 +0,0 @@ -export type DeletePetPathParams = { - /** - * @description Pet id to delete - * @type integer, int64 - */ - petId: number -} - -export type DeletePetHeaderParams = { - /** - * @type string | undefined - */ - api_key?: string -} - -/** - * @description Invalid pet value - */ -export type DeletePet400 = any - -export type DeletePetMutationResponse = any - -export type DeletePetMutation = { - Response: any - PathParams: DeletePetPathParams - HeaderParams: DeletePetHeaderParams - Errors: DeletePet400 -} diff --git a/examples/advanced/src/gen/models/ts/petController/FindPetsByStatus.ts b/examples/advanced/src/gen/models/ts/petController/FindPetsByStatus.ts deleted file mode 100644 index f06a34ca3..000000000 --- a/examples/advanced/src/gen/models/ts/petController/FindPetsByStatus.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { Pet } from '../Pet.ts' - -export type FindPetsByStatusPathParams = { - /** - * @type string - */ - step_id: string -} - -/** - * @description successful operation - */ -export type FindPetsByStatus200 = Pet[] - -/** - * @description Invalid status value - */ -export type FindPetsByStatus400 = any - -export type FindPetsByStatusQueryResponse = FindPetsByStatus200 - -export type FindPetsByStatusQuery = { - Response: FindPetsByStatus200 - PathParams: FindPetsByStatusPathParams - Errors: FindPetsByStatus400 -} diff --git a/examples/advanced/src/gen/models/ts/petController/FindPetsByTags.ts b/examples/advanced/src/gen/models/ts/petController/FindPetsByTags.ts deleted file mode 100644 index 173bb7e02..000000000 --- a/examples/advanced/src/gen/models/ts/petController/FindPetsByTags.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { Pet } from '../Pet.ts' - -export type FindPetsByTagsQueryParams = { - /** - * @description Tags to filter by - * @type array | undefined - */ - tags?: string[] - /** - * @description to request with required page number or pagination - * @type string | undefined - */ - page?: string - /** - * @description to request with required page size - * @type string | undefined - */ - pageSize?: string -} - -export const findPetsByTagsHeaderParamsXExampleEnum = { - ONE: 'ONE', - TWO: 'TWO', - THREE: 'THREE', -} as const - -export type FindPetsByTagsHeaderParamsXExampleEnum = (typeof findPetsByTagsHeaderParamsXExampleEnum)[keyof typeof findPetsByTagsHeaderParamsXExampleEnum] - -export type FindPetsByTagsHeaderParams = { - /** - * @description Header parameters - * @type string - */ - 'X-EXAMPLE': FindPetsByTagsHeaderParamsXExampleEnum -} - -/** - * @description successful operation - */ -export type FindPetsByTags200 = Pet[] - -/** - * @description Invalid tag value - */ -export type FindPetsByTags400 = any - -export type FindPetsByTagsQueryResponse = FindPetsByTags200 - -export type FindPetsByTagsQuery = { - Response: FindPetsByTags200 - QueryParams: FindPetsByTagsQueryParams - HeaderParams: FindPetsByTagsHeaderParams - Errors: FindPetsByTags400 -} diff --git a/examples/advanced/src/gen/models/ts/petController/GetPetById.ts b/examples/advanced/src/gen/models/ts/petController/GetPetById.ts deleted file mode 100644 index 25772e5af..000000000 --- a/examples/advanced/src/gen/models/ts/petController/GetPetById.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Pet } from '../Pet.ts' - -export type GetPetByIdPathParams = { - /** - * @description ID of pet to return - * @type integer, int64 - */ - petId: number -} - -/** - * @description successful operation - */ -export type GetPetById200 = Omit, 'name'> - -/** - * @description Invalid ID supplied - */ -export type GetPetById400 = any - -/** - * @description Pet not found - */ -export type GetPetById404 = any - -export type GetPetByIdQueryResponse = GetPetById200 - -export type GetPetByIdQuery = { - Response: GetPetById200 - PathParams: GetPetByIdPathParams - Errors: GetPetById400 | GetPetById404 -} diff --git a/examples/advanced/src/gen/models/ts/petController/UpdatePet.ts b/examples/advanced/src/gen/models/ts/petController/UpdatePet.ts deleted file mode 100644 index b368a362c..000000000 --- a/examples/advanced/src/gen/models/ts/petController/UpdatePet.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { Pet } from '../Pet.ts' - -/** - * @description Successful operation - */ -export type UpdatePet200 = Omit, 'name'> - -/** - * @description accepted operation - */ -export type UpdatePet202 = { - /** - * @type integer | undefined, int64 - */ - id?: number -} - -/** - * @description Invalid ID supplied - */ -export type UpdatePet400 = any - -/** - * @description Pet not found - */ -export type UpdatePet404 = any - -/** - * @description Validation exception - */ -export type UpdatePet405 = any - -/** - * @description Update an existent pet in the store - */ -export type UpdatePetMutationRequest = Omit, 'id'> - -export type UpdatePetMutationResponse = UpdatePet200 | UpdatePet202 - -export type UpdatePetMutation = { - Response: UpdatePet200 | UpdatePet202 - Request: UpdatePetMutationRequest - Errors: UpdatePet400 | UpdatePet404 | UpdatePet405 -} diff --git a/examples/advanced/src/gen/models/ts/petController/UpdatePetWithForm.ts b/examples/advanced/src/gen/models/ts/petController/UpdatePetWithForm.ts deleted file mode 100644 index ca645f500..000000000 --- a/examples/advanced/src/gen/models/ts/petController/UpdatePetWithForm.ts +++ /dev/null @@ -1,34 +0,0 @@ -export type UpdatePetWithFormPathParams = { - /** - * @description ID of pet that needs to be updated - * @type integer, int64 - */ - petId: number -} - -export type UpdatePetWithFormQueryParams = { - /** - * @description Name of pet that needs to be updated - * @type string | undefined - */ - name?: string - /** - * @description Status of pet that needs to be updated - * @type string | undefined - */ - status?: string -} - -/** - * @description Invalid input - */ -export type UpdatePetWithForm405 = any - -export type UpdatePetWithFormMutationResponse = any - -export type UpdatePetWithFormMutation = { - Response: any - PathParams: UpdatePetWithFormPathParams - QueryParams: UpdatePetWithFormQueryParams - Errors: UpdatePetWithForm405 -} diff --git a/examples/advanced/src/gen/models/ts/petController/UploadFile.ts b/examples/advanced/src/gen/models/ts/petController/UploadFile.ts deleted file mode 100644 index 8e446834c..000000000 --- a/examples/advanced/src/gen/models/ts/petController/UploadFile.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { ApiResponse } from '../ApiResponse.ts' - -export type UploadFilePathParams = { - /** - * @description ID of pet to update - * @type integer, int64 - */ - petId: number -} - -export type UploadFileQueryParams = { - /** - * @description Additional Metadata - * @type string | undefined - */ - additionalMetadata?: string -} - -/** - * @description successful operation - */ -export type UploadFile200 = ApiResponse - -export type UploadFileMutationRequest = Blob - -export type UploadFileMutationResponse = UploadFile200 - -export type UploadFileMutation = { - Response: UploadFile200 - Request: UploadFileMutationRequest - PathParams: UploadFilePathParams - QueryParams: UploadFileQueryParams - Errors: any -} diff --git a/examples/advanced/src/gen/models/ts/petController/index.ts b/examples/advanced/src/gen/models/ts/petController/index.ts deleted file mode 100644 index aa0e37449..000000000 --- a/examples/advanced/src/gen/models/ts/petController/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -export type { AddPet200, AddPet405, AddPetMutationRequest, AddPetMutationResponse, AddPetMutation } from './AddPet.ts' -export type { DeletePetPathParams, DeletePetHeaderParams, DeletePet400, DeletePetMutationResponse, DeletePetMutation } from './DeletePet.ts' -export type { - FindPetsByStatusPathParams, - FindPetsByStatus200, - FindPetsByStatus400, - FindPetsByStatusQueryResponse, - FindPetsByStatusQuery, -} from './FindPetsByStatus.ts' -export type { - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParamsXExampleEnum, - FindPetsByTagsHeaderParams, - FindPetsByTags200, - FindPetsByTags400, - FindPetsByTagsQueryResponse, - FindPetsByTagsQuery, -} from './FindPetsByTags.ts' -export type { GetPetByIdPathParams, GetPetById200, GetPetById400, GetPetById404, GetPetByIdQueryResponse, GetPetByIdQuery } from './GetPetById.ts' -export type { - UpdatePet200, - UpdatePet202, - UpdatePet400, - UpdatePet404, - UpdatePet405, - UpdatePetMutationRequest, - UpdatePetMutationResponse, - UpdatePetMutation, -} from './UpdatePet.ts' -export type { - UpdatePetWithFormPathParams, - UpdatePetWithFormQueryParams, - UpdatePetWithForm405, - UpdatePetWithFormMutationResponse, - UpdatePetWithFormMutation, -} from './UpdatePetWithForm.ts' -export type { - UploadFilePathParams, - UploadFileQueryParams, - UploadFile200, - UploadFileMutationRequest, - UploadFileMutationResponse, - UploadFileMutation, -} from './UploadFile.ts' -export { findPetsByTagsHeaderParamsXExampleEnum } from './FindPetsByTags.ts' diff --git a/examples/advanced/src/gen/models/ts/petsController/CreatePets.ts b/examples/advanced/src/gen/models/ts/petsController/CreatePets.ts deleted file mode 100644 index ea4dc387f..000000000 --- a/examples/advanced/src/gen/models/ts/petsController/CreatePets.ts +++ /dev/null @@ -1,65 +0,0 @@ -import type { PetNotFound } from '../PetNotFound.ts' - -export type CreatePetsPathParams = { - /** - * @description UUID - * @type string - */ - uuid: string -} - -export type CreatePetsQueryParams = { - /** - * @description Offset *\/ - * @type integer | undefined - */ - offset?: number -} - -export const createPetsHeaderParamsXExampleEnum = { - ONE: 'ONE', - TWO: 'TWO', - THREE: 'THREE', -} as const - -export type CreatePetsHeaderParamsXExampleEnum = (typeof createPetsHeaderParamsXExampleEnum)[keyof typeof createPetsHeaderParamsXExampleEnum] - -export type CreatePetsHeaderParams = { - /** - * @description Header parameters - * @type string - */ - 'X-EXAMPLE': CreatePetsHeaderParamsXExampleEnum -} - -/** - * @description Null response - */ -export type CreatePets201 = any - -/** - * @description unexpected error - */ -export type CreatePetsError = PetNotFound - -export type CreatePetsMutationRequest = { - /** - * @type string - */ - name: string - /** - * @type string - */ - tag: string -} - -export type CreatePetsMutationResponse = CreatePets201 - -export type CreatePetsMutation = { - Response: CreatePets201 - Request: CreatePetsMutationRequest - PathParams: CreatePetsPathParams - QueryParams: CreatePetsQueryParams - HeaderParams: CreatePetsHeaderParams - Errors: any -} diff --git a/examples/advanced/src/gen/models/ts/petsController/index.ts b/examples/advanced/src/gen/models/ts/petsController/index.ts deleted file mode 100644 index d6636a3cc..000000000 --- a/examples/advanced/src/gen/models/ts/petsController/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export type { - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParamsXExampleEnum, - CreatePetsHeaderParams, - CreatePets201, - CreatePetsError, - CreatePetsMutationRequest, - CreatePetsMutationResponse, - CreatePetsMutation, -} from './CreatePets.ts' -export { createPetsHeaderParamsXExampleEnum } from './CreatePets.ts' diff --git a/examples/advanced/src/gen/models/ts/storeController/DeleteOrder.ts b/examples/advanced/src/gen/models/ts/storeController/DeleteOrder.ts deleted file mode 100644 index 3b22473aa..000000000 --- a/examples/advanced/src/gen/models/ts/storeController/DeleteOrder.ts +++ /dev/null @@ -1,25 +0,0 @@ -export type DeleteOrderPathParams = { - /** - * @description ID of the order that needs to be deleted - * @type integer, int64 - */ - orderId: number -} - -/** - * @description Invalid ID supplied - */ -export type DeleteOrder400 = any - -/** - * @description Order not found - */ -export type DeleteOrder404 = any - -export type DeleteOrderMutationResponse = any - -export type DeleteOrderMutation = { - Response: any - PathParams: DeleteOrderPathParams - Errors: DeleteOrder400 | DeleteOrder404 -} diff --git a/examples/advanced/src/gen/models/ts/storeController/GetInventory.ts b/examples/advanced/src/gen/models/ts/storeController/GetInventory.ts deleted file mode 100644 index 411828e36..000000000 --- a/examples/advanced/src/gen/models/ts/storeController/GetInventory.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @description successful operation - */ -export type GetInventory200 = { - [key: string]: number -} - -export type GetInventoryQueryResponse = GetInventory200 - -export type GetInventoryQuery = { - Response: GetInventory200 - Errors: any -} diff --git a/examples/advanced/src/gen/models/ts/storeController/GetOrderById.ts b/examples/advanced/src/gen/models/ts/storeController/GetOrderById.ts deleted file mode 100644 index 71022041f..000000000 --- a/examples/advanced/src/gen/models/ts/storeController/GetOrderById.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Order } from '../Order.ts' - -export type GetOrderByIdPathParams = { - /** - * @description ID of order that needs to be fetched - * @type integer, int64 - */ - orderId: number -} - -/** - * @description successful operation - */ -export type GetOrderById200 = Order - -/** - * @description Invalid ID supplied - */ -export type GetOrderById400 = any - -/** - * @description Order not found - */ -export type GetOrderById404 = any - -export type GetOrderByIdQueryResponse = GetOrderById200 - -export type GetOrderByIdQuery = { - Response: GetOrderById200 - PathParams: GetOrderByIdPathParams - Errors: GetOrderById400 | GetOrderById404 -} diff --git a/examples/advanced/src/gen/models/ts/storeController/PlaceOrder.ts b/examples/advanced/src/gen/models/ts/storeController/PlaceOrder.ts deleted file mode 100644 index 2224d5312..000000000 --- a/examples/advanced/src/gen/models/ts/storeController/PlaceOrder.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Order } from '../Order.ts' - -/** - * @description successful operation - */ -export type PlaceOrder200 = Order - -/** - * @description Invalid input - */ -export type PlaceOrder405 = any - -export type PlaceOrderMutationRequest = Order - -export type PlaceOrderMutationResponse = PlaceOrder200 - -export type PlaceOrderMutation = { - Response: PlaceOrder200 - Request: PlaceOrderMutationRequest - Errors: PlaceOrder405 -} diff --git a/examples/advanced/src/gen/models/ts/storeController/PlaceOrderPatch.ts b/examples/advanced/src/gen/models/ts/storeController/PlaceOrderPatch.ts deleted file mode 100644 index 6898a99f0..000000000 --- a/examples/advanced/src/gen/models/ts/storeController/PlaceOrderPatch.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Order } from '../Order.ts' - -/** - * @description successful operation - */ -export type PlaceOrderPatch200 = Order - -/** - * @description Invalid input - */ -export type PlaceOrderPatch405 = any - -export type PlaceOrderPatchMutationRequest = Order - -export type PlaceOrderPatchMutationResponse = PlaceOrderPatch200 - -export type PlaceOrderPatchMutation = { - Response: PlaceOrderPatch200 - Request: PlaceOrderPatchMutationRequest - Errors: PlaceOrderPatch405 -} diff --git a/examples/advanced/src/gen/models/ts/storeController/index.ts b/examples/advanced/src/gen/models/ts/storeController/index.ts deleted file mode 100644 index 899090fcf..000000000 --- a/examples/advanced/src/gen/models/ts/storeController/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export type { DeleteOrderPathParams, DeleteOrder400, DeleteOrder404, DeleteOrderMutationResponse, DeleteOrderMutation } from './DeleteOrder.ts' -export type { GetInventory200, GetInventoryQueryResponse, GetInventoryQuery } from './GetInventory.ts' -export type { GetOrderByIdPathParams, GetOrderById200, GetOrderById400, GetOrderById404, GetOrderByIdQueryResponse, GetOrderByIdQuery } from './GetOrderById.ts' -export type { PlaceOrder200, PlaceOrder405, PlaceOrderMutationRequest, PlaceOrderMutationResponse, PlaceOrderMutation } from './PlaceOrder.ts' -export type { - PlaceOrderPatch200, - PlaceOrderPatch405, - PlaceOrderPatchMutationRequest, - PlaceOrderPatchMutationResponse, - PlaceOrderPatchMutation, -} from './PlaceOrderPatch.ts' diff --git a/examples/advanced/src/gen/models/ts/tag/Tag.ts b/examples/advanced/src/gen/models/ts/tag/Tag.ts deleted file mode 100644 index 38366ba71..000000000 --- a/examples/advanced/src/gen/models/ts/tag/Tag.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type TagTag = { - /** - * @type integer | undefined, int64 - */ - id?: number - /** - * @type string | undefined - */ - name?: string -} diff --git a/examples/advanced/src/gen/models/ts/tag/index.ts b/examples/advanced/src/gen/models/ts/tag/index.ts deleted file mode 100644 index 8c01446ca..000000000 --- a/examples/advanced/src/gen/models/ts/tag/index.ts +++ /dev/null @@ -1 +0,0 @@ -export type { TagTag } from './Tag.ts' diff --git a/examples/advanced/src/gen/models/ts/userController/CreateUser.ts b/examples/advanced/src/gen/models/ts/userController/CreateUser.ts deleted file mode 100644 index 4d54c406c..000000000 --- a/examples/advanced/src/gen/models/ts/userController/CreateUser.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { User } from '../User.ts' - -/** - * @description successful operation - */ -export type CreateUserError = User - -/** - * @description Created user object - */ -export type CreateUserMutationRequest = User - -export type CreateUserMutationResponse = any - -export type CreateUserMutation = { - Response: any - Request: CreateUserMutationRequest - Errors: any -} diff --git a/examples/advanced/src/gen/models/ts/userController/CreateUsersWithListInput.ts b/examples/advanced/src/gen/models/ts/userController/CreateUsersWithListInput.ts deleted file mode 100644 index b5536358f..000000000 --- a/examples/advanced/src/gen/models/ts/userController/CreateUsersWithListInput.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { User } from '../User.ts' - -/** - * @description Successful operation - */ -export type CreateUsersWithListInput200 = User - -/** - * @description successful operation - */ -export type CreateUsersWithListInputError = any - -export type CreateUsersWithListInputMutationRequest = User[] - -export type CreateUsersWithListInputMutationResponse = CreateUsersWithListInput200 - -export type CreateUsersWithListInputMutation = { - Response: CreateUsersWithListInput200 - Request: CreateUsersWithListInputMutationRequest - Errors: any -} diff --git a/examples/advanced/src/gen/models/ts/userController/DeleteUser.ts b/examples/advanced/src/gen/models/ts/userController/DeleteUser.ts deleted file mode 100644 index 8cb71e167..000000000 --- a/examples/advanced/src/gen/models/ts/userController/DeleteUser.ts +++ /dev/null @@ -1,25 +0,0 @@ -export type DeleteUserPathParams = { - /** - * @description The name that needs to be deleted - * @type string - */ - username: string -} - -/** - * @description Invalid username supplied - */ -export type DeleteUser400 = any - -/** - * @description User not found - */ -export type DeleteUser404 = any - -export type DeleteUserMutationResponse = any - -export type DeleteUserMutation = { - Response: any - PathParams: DeleteUserPathParams - Errors: DeleteUser400 | DeleteUser404 -} diff --git a/examples/advanced/src/gen/models/ts/userController/GetUserByName.ts b/examples/advanced/src/gen/models/ts/userController/GetUserByName.ts deleted file mode 100644 index 573542704..000000000 --- a/examples/advanced/src/gen/models/ts/userController/GetUserByName.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { User } from '../User.ts' - -export type GetUserByNamePathParams = { - /** - * @description The name that needs to be fetched. Use user1 for testing. - * @type string - */ - username: string -} - -/** - * @description successful operation - */ -export type GetUserByName200 = User - -/** - * @description Invalid username supplied - */ -export type GetUserByName400 = any - -/** - * @description User not found - */ -export type GetUserByName404 = any - -export type GetUserByNameQueryResponse = GetUserByName200 - -export type GetUserByNameQuery = { - Response: GetUserByName200 - PathParams: GetUserByNamePathParams - Errors: GetUserByName400 | GetUserByName404 -} diff --git a/examples/advanced/src/gen/models/ts/userController/LoginUser.ts b/examples/advanced/src/gen/models/ts/userController/LoginUser.ts deleted file mode 100644 index f8869afdb..000000000 --- a/examples/advanced/src/gen/models/ts/userController/LoginUser.ts +++ /dev/null @@ -1,30 +0,0 @@ -export type LoginUserQueryParams = { - /** - * @description The user name for login - * @type string | undefined - */ - username?: string - /** - * @description The password for login in clear text - * @type string | undefined - */ - password?: string -} - -/** - * @description successful operation - */ -export type LoginUser200 = string - -/** - * @description Invalid username/password supplied - */ -export type LoginUser400 = any - -export type LoginUserQueryResponse = LoginUser200 - -export type LoginUserQuery = { - Response: LoginUser200 - QueryParams: LoginUserQueryParams - Errors: LoginUser400 -} diff --git a/examples/advanced/src/gen/models/ts/userController/LogoutUser.ts b/examples/advanced/src/gen/models/ts/userController/LogoutUser.ts deleted file mode 100644 index c969417e5..000000000 --- a/examples/advanced/src/gen/models/ts/userController/LogoutUser.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @description successful operation - */ -export type LogoutUserError = any - -export type LogoutUserQueryResponse = any - -export type LogoutUserQuery = { - Response: any - Errors: any -} diff --git a/examples/advanced/src/gen/models/ts/userController/UpdateUser.ts b/examples/advanced/src/gen/models/ts/userController/UpdateUser.ts deleted file mode 100644 index dbdfee722..000000000 --- a/examples/advanced/src/gen/models/ts/userController/UpdateUser.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { User } from '../User.ts' - -export type UpdateUserPathParams = { - /** - * @description name that need to be deleted - * @type string - */ - username: string -} - -/** - * @description successful operation - */ -export type UpdateUserError = any - -/** - * @description Update an existent user in the store - */ -export type UpdateUserMutationRequest = User - -export type UpdateUserMutationResponse = any - -export type UpdateUserMutation = { - Response: any - Request: UpdateUserMutationRequest - PathParams: UpdateUserPathParams - Errors: any -} diff --git a/examples/advanced/src/gen/models/ts/userController/index.ts b/examples/advanced/src/gen/models/ts/userController/index.ts deleted file mode 100644 index 238cd0838..000000000 --- a/examples/advanced/src/gen/models/ts/userController/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export type { CreateUserError, CreateUserMutationRequest, CreateUserMutationResponse, CreateUserMutation } from './CreateUser.ts' -export type { - CreateUsersWithListInput200, - CreateUsersWithListInputError, - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, - CreateUsersWithListInputMutation, -} from './CreateUsersWithListInput.ts' -export type { DeleteUserPathParams, DeleteUser400, DeleteUser404, DeleteUserMutationResponse, DeleteUserMutation } from './DeleteUser.ts' -export type { - GetUserByNamePathParams, - GetUserByName200, - GetUserByName400, - GetUserByName404, - GetUserByNameQueryResponse, - GetUserByNameQuery, -} from './GetUserByName.ts' -export type { LoginUserQueryParams, LoginUser200, LoginUser400, LoginUserQueryResponse, LoginUserQuery } from './LoginUser.ts' -export type { LogoutUserError, LogoutUserQueryResponse, LogoutUserQuery } from './LogoutUser.ts' -export type { UpdateUserPathParams, UpdateUserError, UpdateUserMutationRequest, UpdateUserMutationResponse, UpdateUserMutation } from './UpdateUser.ts' diff --git a/examples/advanced/src/gen/msw/handlers.ts b/examples/advanced/src/gen/msw/handlers.ts deleted file mode 100644 index a7da76fa3..000000000 --- a/examples/advanced/src/gen/msw/handlers.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { addPetHandler } from './petController/addPetHandler.ts' -import { deletePetHandler } from './petController/deletePetHandler.ts' -import { findPetsByStatusHandler } from './petController/findPetsByStatusHandler.ts' -import { findPetsByTagsHandler } from './petController/findPetsByTagsHandler.ts' -import { getPetByIdHandler } from './petController/getPetByIdHandler.ts' -import { updatePetHandler } from './petController/updatePetHandler.ts' -import { updatePetWithFormHandler } from './petController/updatePetWithFormHandler.ts' -import { uploadFileHandler } from './petController/uploadFileHandler.ts' -import { createPetsHandler } from './petsController/createPetsHandler.ts' -import { createUserHandler } from './userController/createUserHandler.ts' -import { createUsersWithListInputHandler } from './userController/createUsersWithListInputHandler.ts' -import { deleteUserHandler } from './userController/deleteUserHandler.ts' -import { getUserByNameHandler } from './userController/getUserByNameHandler.ts' -import { loginUserHandler } from './userController/loginUserHandler.ts' -import { logoutUserHandler } from './userController/logoutUserHandler.ts' -import { updateUserHandler } from './userController/updateUserHandler.ts' - -export const handlers = [ - createPetsHandler(), - updatePetHandler(), - addPetHandler(), - findPetsByStatusHandler(), - findPetsByTagsHandler(), - getPetByIdHandler(), - updatePetWithFormHandler(), - deletePetHandler(), - uploadFileHandler(), - createUserHandler(), - createUsersWithListInputHandler(), - loginUserHandler(), - logoutUserHandler(), - getUserByNameHandler(), - updateUserHandler(), - deleteUserHandler(), -] as const diff --git a/examples/advanced/src/gen/msw/index.ts b/examples/advanced/src/gen/msw/index.ts deleted file mode 100644 index 7c9f10d7b..000000000 --- a/examples/advanced/src/gen/msw/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -export { handlers } from './handlers.ts' -export { addPetHandler } from './petController/addPetHandler.ts' -export { deletePetHandler } from './petController/deletePetHandler.ts' -export { findPetsByStatusHandler } from './petController/findPetsByStatusHandler.ts' -export { findPetsByTagsHandler } from './petController/findPetsByTagsHandler.ts' -export { getPetByIdHandler } from './petController/getPetByIdHandler.ts' -export { updatePetHandler } from './petController/updatePetHandler.ts' -export { updatePetWithFormHandler } from './petController/updatePetWithFormHandler.ts' -export { uploadFileHandler } from './petController/uploadFileHandler.ts' -export { createPetsHandler } from './petsController/createPetsHandler.ts' -export { createUserHandler } from './userController/createUserHandler.ts' -export { createUsersWithListInputHandler } from './userController/createUsersWithListInputHandler.ts' -export { deleteUserHandler } from './userController/deleteUserHandler.ts' -export { getUserByNameHandler } from './userController/getUserByNameHandler.ts' -export { loginUserHandler } from './userController/loginUserHandler.ts' -export { logoutUserHandler } from './userController/logoutUserHandler.ts' -export { updateUserHandler } from './userController/updateUserHandler.ts' diff --git a/examples/advanced/src/gen/msw/petController/addPetHandler.ts b/examples/advanced/src/gen/msw/petController/addPetHandler.ts deleted file mode 100644 index 5a6d93b4b..000000000 --- a/examples/advanced/src/gen/msw/petController/addPetHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { AddPetMutationResponse } from '../../models/ts/petController/AddPet.ts' -import { http } from 'msw' - -export function addPetHandler(data?: AddPetMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.post('*/pet', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petController/deletePetHandler.ts b/examples/advanced/src/gen/msw/petController/deletePetHandler.ts deleted file mode 100644 index 61d1da62d..000000000 --- a/examples/advanced/src/gen/msw/petController/deletePetHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { DeletePetMutationResponse } from '../../models/ts/petController/DeletePet.ts' -import { http } from 'msw' - -export function deletePetHandler(data?: DeletePetMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.delete('*/pet/:petId', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petController/findPetsByStatusHandler.ts b/examples/advanced/src/gen/msw/petController/findPetsByStatusHandler.ts deleted file mode 100644 index ebaf508a9..000000000 --- a/examples/advanced/src/gen/msw/petController/findPetsByStatusHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { FindPetsByStatusQueryResponse } from '../../models/ts/petController/FindPetsByStatus.ts' -import { http } from 'msw' - -export function findPetsByStatusHandler(data?: FindPetsByStatusQueryResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.get('*/pet/findByStatus/:step_id', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petController/findPetsByTagsHandler.ts b/examples/advanced/src/gen/msw/petController/findPetsByTagsHandler.ts deleted file mode 100644 index 62fde8347..000000000 --- a/examples/advanced/src/gen/msw/petController/findPetsByTagsHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { FindPetsByTagsQueryResponse } from '../../models/ts/petController/FindPetsByTags.ts' -import { http } from 'msw' - -export function findPetsByTagsHandler(data?: FindPetsByTagsQueryResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.get('*/pet/findByTags', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petController/getPetByIdHandler.ts b/examples/advanced/src/gen/msw/petController/getPetByIdHandler.ts deleted file mode 100644 index b7690c898..000000000 --- a/examples/advanced/src/gen/msw/petController/getPetByIdHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { GetPetByIdQueryResponse } from '../../models/ts/petController/GetPetById.ts' -import { http } from 'msw' - -export function getPetByIdHandler(data?: GetPetByIdQueryResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.get('*/pet/:petId', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petController/index.ts b/examples/advanced/src/gen/msw/petController/index.ts deleted file mode 100644 index af7a03859..000000000 --- a/examples/advanced/src/gen/msw/petController/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { addPetHandler } from './addPetHandler.ts' -export { deletePetHandler } from './deletePetHandler.ts' -export { findPetsByStatusHandler } from './findPetsByStatusHandler.ts' -export { findPetsByTagsHandler } from './findPetsByTagsHandler.ts' -export { getPetByIdHandler } from './getPetByIdHandler.ts' -export { updatePetHandler } from './updatePetHandler.ts' -export { updatePetWithFormHandler } from './updatePetWithFormHandler.ts' -export { uploadFileHandler } from './uploadFileHandler.ts' diff --git a/examples/advanced/src/gen/msw/petController/updatePetHandler.ts b/examples/advanced/src/gen/msw/petController/updatePetHandler.ts deleted file mode 100644 index dd427cdaa..000000000 --- a/examples/advanced/src/gen/msw/petController/updatePetHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { UpdatePetMutationResponse } from '../../models/ts/petController/UpdatePet.ts' -import { http } from 'msw' - -export function updatePetHandler(data?: UpdatePetMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.put('*/pet', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petController/updatePetWithFormHandler.ts b/examples/advanced/src/gen/msw/petController/updatePetWithFormHandler.ts deleted file mode 100644 index e0adbc145..000000000 --- a/examples/advanced/src/gen/msw/petController/updatePetWithFormHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { UpdatePetWithFormMutationResponse } from '../../models/ts/petController/UpdatePetWithForm.ts' -import { http } from 'msw' - -export function updatePetWithFormHandler(data?: UpdatePetWithFormMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.post('*/pet/:petId', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petController/uploadFileHandler.ts b/examples/advanced/src/gen/msw/petController/uploadFileHandler.ts deleted file mode 100644 index 2ad6ad148..000000000 --- a/examples/advanced/src/gen/msw/petController/uploadFileHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { UploadFileMutationResponse } from '../../models/ts/petController/UploadFile.ts' -import { http } from 'msw' - -export function uploadFileHandler(data?: UploadFileMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.post('*/pet/:petId/uploadImage', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petsController/createPetsHandler.ts b/examples/advanced/src/gen/msw/petsController/createPetsHandler.ts deleted file mode 100644 index a5f0ef536..000000000 --- a/examples/advanced/src/gen/msw/petsController/createPetsHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { CreatePetsMutationResponse } from '../../models/ts/petsController/CreatePets.ts' -import { http } from 'msw' - -export function createPetsHandler(data?: CreatePetsMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.post('*/pets/:uuid', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/petsController/index.ts b/examples/advanced/src/gen/msw/petsController/index.ts deleted file mode 100644 index 86fba4807..000000000 --- a/examples/advanced/src/gen/msw/petsController/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { createPetsHandler } from './createPetsHandler.ts' diff --git a/examples/advanced/src/gen/msw/userController/createUserHandler.ts b/examples/advanced/src/gen/msw/userController/createUserHandler.ts deleted file mode 100644 index f61f5349f..000000000 --- a/examples/advanced/src/gen/msw/userController/createUserHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { CreateUserMutationResponse } from '../../models/ts/userController/CreateUser.ts' -import { http } from 'msw' - -export function createUserHandler(data?: CreateUserMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.post('*/user', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/userController/createUsersWithListInputHandler.ts b/examples/advanced/src/gen/msw/userController/createUsersWithListInputHandler.ts deleted file mode 100644 index 0a05b0630..000000000 --- a/examples/advanced/src/gen/msw/userController/createUsersWithListInputHandler.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { CreateUsersWithListInputMutationResponse } from '../../models/ts/userController/CreateUsersWithListInput.ts' -import { http } from 'msw' - -export function createUsersWithListInputHandler( - data?: CreateUsersWithListInputMutationResponse | ((info: Parameters[1]>[0]) => Response), -) { - return http.post('*/user/createWithList', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/userController/deleteUserHandler.ts b/examples/advanced/src/gen/msw/userController/deleteUserHandler.ts deleted file mode 100644 index 77db19dda..000000000 --- a/examples/advanced/src/gen/msw/userController/deleteUserHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { DeleteUserMutationResponse } from '../../models/ts/userController/DeleteUser.ts' -import { http } from 'msw' - -export function deleteUserHandler(data?: DeleteUserMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.delete('*/user/:username', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/userController/getUserByNameHandler.ts b/examples/advanced/src/gen/msw/userController/getUserByNameHandler.ts deleted file mode 100644 index 169ef0f0c..000000000 --- a/examples/advanced/src/gen/msw/userController/getUserByNameHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { GetUserByNameQueryResponse } from '../../models/ts/userController/GetUserByName.ts' -import { http } from 'msw' - -export function getUserByNameHandler(data?: GetUserByNameQueryResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.get('*/user/:username', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/userController/index.ts b/examples/advanced/src/gen/msw/userController/index.ts deleted file mode 100644 index 992bb1ddf..000000000 --- a/examples/advanced/src/gen/msw/userController/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { createUserHandler } from './createUserHandler.ts' -export { createUsersWithListInputHandler } from './createUsersWithListInputHandler.ts' -export { deleteUserHandler } from './deleteUserHandler.ts' -export { getUserByNameHandler } from './getUserByNameHandler.ts' -export { loginUserHandler } from './loginUserHandler.ts' -export { logoutUserHandler } from './logoutUserHandler.ts' -export { updateUserHandler } from './updateUserHandler.ts' diff --git a/examples/advanced/src/gen/msw/userController/loginUserHandler.ts b/examples/advanced/src/gen/msw/userController/loginUserHandler.ts deleted file mode 100644 index 7b9a5a158..000000000 --- a/examples/advanced/src/gen/msw/userController/loginUserHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { LoginUserQueryResponse } from '../../models/ts/userController/LoginUser.ts' -import { http } from 'msw' - -export function loginUserHandler(data?: LoginUserQueryResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.get('*/user/login', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/userController/logoutUserHandler.ts b/examples/advanced/src/gen/msw/userController/logoutUserHandler.ts deleted file mode 100644 index 419488ce5..000000000 --- a/examples/advanced/src/gen/msw/userController/logoutUserHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { LogoutUserQueryResponse } from '../../models/ts/userController/LogoutUser.ts' -import { http } from 'msw' - -export function logoutUserHandler(data?: LogoutUserQueryResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.get('*/user/logout', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/msw/userController/updateUserHandler.ts b/examples/advanced/src/gen/msw/userController/updateUserHandler.ts deleted file mode 100644 index fb71f3d97..000000000 --- a/examples/advanced/src/gen/msw/userController/updateUserHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { UpdateUserMutationResponse } from '../../models/ts/userController/UpdateUser.ts' -import { http } from 'msw' - -export function updateUserHandler(data?: UpdateUserMutationResponse | ((info: Parameters[1]>[0]) => Response)) { - return http.put('*/user/:username', function handler(info) { - if (typeof data === 'function') return data(info) - - return new Response(JSON.stringify(data), { - headers: { - 'Content-Type': 'application/json', - }, - }) - }) -} diff --git a/examples/advanced/src/gen/schemas/addPetRequest.json b/examples/advanced/src/gen/schemas/addPetRequest.json index 324697512..39958a68c 100644 --- a/examples/advanced/src/gen/schemas/addPetRequest.json +++ b/examples/advanced/src/gen/schemas/addPetRequest.json @@ -1,28 +1 @@ -{ - "required": ["name", "photoUrls"], - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "name": { "type": "string", "example": "doggie" }, - "category": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" - }, - "photoUrls": { "type": "array", "xml": { "wrapped": true }, "items": { "type": "string", "xml": { "name": "photoUrl" } } }, - "tags": { - "type": "array", - "xml": { "wrapped": true }, - "items": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "tag.Tag" - } - }, - "status": { "type": "string", "description": "pet status in the store", "enum": ["available", "pending", "sold"] } - }, - "xml": { "name": "pet" }, - "x-readme-ref-name": "AddPetRequest" -} +{"required":["name","photoUrls"],"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"name":{"type":"string","example":"doggie"},"category":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"tag.Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"pet"},"x-readme-ref-name":"AddPetRequest"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/address.json b/examples/advanced/src/gen/schemas/address.json index 21f73590a..26b2e91c8 100644 --- a/examples/advanced/src/gen/schemas/address.json +++ b/examples/advanced/src/gen/schemas/address.json @@ -1,11 +1 @@ -{ - "type": "object", - "properties": { - "street": { "type": "string", "example": "437 Lytton" }, - "city": { "type": "string", "example": "Palo Alto" }, - "state": { "type": "string", "example": "CA" }, - "zip": { "type": "string", "example": "94301" } - }, - "xml": { "name": "address" }, - "x-readme-ref-name": "Address" -} +{"type":"object","properties":{"street":{"type":"string","example":"437 Lytton"},"city":{"type":"string","example":"Palo Alto"},"state":{"type":"string","example":"CA"},"zip":{"type":"string","example":"94301"}},"xml":{"name":"address"},"x-readme-ref-name":"Address"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/apiResponse.json b/examples/advanced/src/gen/schemas/apiResponse.json index b2fac184b..debde926f 100644 --- a/examples/advanced/src/gen/schemas/apiResponse.json +++ b/examples/advanced/src/gen/schemas/apiResponse.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "code": { "type": "integer", "format": "int32" }, "type": { "type": "string" }, "message": { "type": "string" } }, - "xml": { "name": "##default" }, - "x-readme-ref-name": "ApiResponse" -} +{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}},"xml":{"name":"##default"},"x-readme-ref-name":"ApiResponse"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/category.json b/examples/advanced/src/gen/schemas/category.json index 9dacf896f..17bc3d8c0 100644 --- a/examples/advanced/src/gen/schemas/category.json +++ b/examples/advanced/src/gen/schemas/category.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/customer.json b/examples/advanced/src/gen/schemas/customer.json index 854aa64af..c2a3dbae8 100644 --- a/examples/advanced/src/gen/schemas/customer.json +++ b/examples/advanced/src/gen/schemas/customer.json @@ -1,24 +1 @@ -{ - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 100000 }, - "username": { "type": "string", "example": "fehguy" }, - "address": { - "type": "array", - "xml": { "name": "addresses", "wrapped": true }, - "items": { - "type": "object", - "properties": { - "street": { "type": "string", "example": "437 Lytton" }, - "city": { "type": "string", "example": "Palo Alto" }, - "state": { "type": "string", "example": "CA" }, - "zip": { "type": "string", "example": "94301" } - }, - "xml": { "name": "address" }, - "x-readme-ref-name": "Address" - } - } - }, - "xml": { "name": "customer" }, - "x-readme-ref-name": "Customer" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":100000},"username":{"type":"string","example":"fehguy"},"address":{"type":"array","xml":{"name":"addresses","wrapped":true},"items":{"type":"object","properties":{"street":{"type":"string","example":"437 Lytton"},"city":{"type":"string","example":"Palo Alto"},"state":{"type":"string","example":"CA"},"zip":{"type":"string","example":"94301"}},"xml":{"name":"address"},"x-readme-ref-name":"Address"}}},"xml":{"name":"customer"},"x-readme-ref-name":"Customer"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/order.json b/examples/advanced/src/gen/schemas/order.json index b6a5e8038..7b7908df8 100644 --- a/examples/advanced/src/gen/schemas/order.json +++ b/examples/advanced/src/gen/schemas/order.json @@ -1,16 +1 @@ -{ - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "petId": { "type": "integer", "format": "int64", "example": 198772 }, - "quantity": { "type": "integer", "format": "int32", "example": 7 }, - "orderType": { "type": "string", "enum": ["foo", "bar"] }, - "type": { "type": "string", "description": "Order Status", "example": "approved" }, - "shipDate": { "type": "string", "format": "date-time" }, - "status": { "type": "string", "description": "Order Status", "example": "approved", "enum": ["placed", "approved", "delivered"] }, - "http_status": { "type": "number", "description": "HTTP Status", "example": 200, "enum": [200, 400, 500], "x-enumNames": ["ok", "not_found"] }, - "complete": { "type": "boolean" } - }, - "xml": { "name": "order" }, - "x-readme-ref-name": "Order" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"petId":{"type":"integer","format":"int64","example":198772},"quantity":{"type":"integer","format":"int32","example":7},"orderType":{"type":"string","enum":["foo","bar"]},"type":{"type":"string","description":"Order Status","example":"approved"},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","example":"approved","enum":["placed","approved","delivered"]},"http_status":{"type":"number","description":"HTTP Status","example":200,"enum":[200,400,500],"x-enumNames":["ok","not_found"]},"complete":{"type":"boolean"}},"xml":{"name":"order"},"x-readme-ref-name":"Order"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/pet.json b/examples/advanced/src/gen/schemas/pet.json index 039034944..2fbaeb150 100644 --- a/examples/advanced/src/gen/schemas/pet.json +++ b/examples/advanced/src/gen/schemas/pet.json @@ -1,28 +1 @@ -{ - "required": ["name", "photoUrls"], - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10, "readOnly": true }, - "name": { "type": "string", "example": "doggie", "writeOnly": true }, - "category": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" - }, - "photoUrls": { "type": "array", "xml": { "wrapped": true }, "items": { "type": "string", "xml": { "name": "photoUrl" } } }, - "tags": { - "type": "array", - "xml": { "wrapped": true }, - "items": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "tag.Tag" - } - }, - "status": { "type": "string", "description": "pet status in the store", "enum": ["available", "pending", "sold"] } - }, - "xml": { "name": "pet" }, - "x-readme-ref-name": "Pet" -} +{"required":["name","photoUrls"],"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10,"readOnly":true},"name":{"type":"string","example":"doggie","writeOnly":true},"category":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"tag.Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"pet"},"x-readme-ref-name":"Pet"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/petNotFound.json b/examples/advanced/src/gen/schemas/petNotFound.json index 497ca4aec..21bd7ea19 100644 --- a/examples/advanced/src/gen/schemas/petNotFound.json +++ b/examples/advanced/src/gen/schemas/petNotFound.json @@ -1 +1 @@ -{ "properties": { "code": { "format": "int32", "type": "integer" }, "message": { "type": "string" } } } +{"properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/tagTag.json b/examples/advanced/src/gen/schemas/tagTag.json index 97ab1f7b3..1d4e0f49c 100644 --- a/examples/advanced/src/gen/schemas/tagTag.json +++ b/examples/advanced/src/gen/schemas/tagTag.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "tag.Tag" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"tag.Tag"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/user.json b/examples/advanced/src/gen/schemas/user.json index 18c6ae262..c7ecf0adf 100644 --- a/examples/advanced/src/gen/schemas/user.json +++ b/examples/advanced/src/gen/schemas/user.json @@ -1,16 +1 @@ -{ - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "username": { "type": "string", "example": "theUser" }, - "uuid": { "type": "string", "format": "uuid", "deprecated": true }, - "firstName": { "type": "string", "example": "John" }, - "lastName": { "type": "string", "example": "James" }, - "email": { "type": "string", "format": "email", "example": "john@email.com" }, - "password": { "type": "string", "example": "12345" }, - "phone": { "type": "string", "example": "12345" }, - "userStatus": { "type": "integer", "description": "User Status", "format": "int32", "example": 1 } - }, - "xml": { "name": "user" }, - "x-readme-ref-name": "User" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"username":{"type":"string","example":"theUser"},"uuid":{"type":"string","format":"uuid","deprecated":true},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"James"},"email":{"type":"string","format":"email","example":"john@email.com"},"password":{"type":"string","example":"12345"},"phone":{"type":"string","example":"12345"},"userStatus":{"type":"integer","description":"User Status","format":"int32","example":1}},"xml":{"name":"user"},"x-readme-ref-name":"User"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas/userArray.json b/examples/advanced/src/gen/schemas/userArray.json index 2644d317b..78eb2d434 100644 --- a/examples/advanced/src/gen/schemas/userArray.json +++ b/examples/advanced/src/gen/schemas/userArray.json @@ -1,19 +1 @@ -{ - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "username": { "type": "string", "example": "theUser" }, - "uuid": { "type": "string", "format": "uuid", "deprecated": true }, - "firstName": { "type": "string", "example": "John" }, - "lastName": { "type": "string", "example": "James" }, - "email": { "type": "string", "format": "email", "example": "john@email.com" }, - "password": { "type": "string", "example": "12345" }, - "phone": { "type": "string", "example": "12345" }, - "userStatus": { "type": "integer", "description": "User Status", "format": "int32", "example": 1 } - }, - "xml": { "name": "user" }, - "x-readme-ref-name": "User" - } -} +{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"username":{"type":"string","example":"theUser"},"uuid":{"type":"string","format":"uuid","deprecated":true},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"James"},"email":{"type":"string","format":"email","example":"john@email.com"},"password":{"type":"string","example":"12345"},"phone":{"type":"string","example":"12345"},"userStatus":{"type":"integer","description":"User Status","format":"int32","example":1}},"xml":{"name":"user"},"x-readme-ref-name":"User"}} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/addPetRequest.json b/examples/advanced/src/gen/schemas2/addPetRequest.json index 324697512..39958a68c 100644 --- a/examples/advanced/src/gen/schemas2/addPetRequest.json +++ b/examples/advanced/src/gen/schemas2/addPetRequest.json @@ -1,28 +1 @@ -{ - "required": ["name", "photoUrls"], - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "name": { "type": "string", "example": "doggie" }, - "category": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" - }, - "photoUrls": { "type": "array", "xml": { "wrapped": true }, "items": { "type": "string", "xml": { "name": "photoUrl" } } }, - "tags": { - "type": "array", - "xml": { "wrapped": true }, - "items": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "tag.Tag" - } - }, - "status": { "type": "string", "description": "pet status in the store", "enum": ["available", "pending", "sold"] } - }, - "xml": { "name": "pet" }, - "x-readme-ref-name": "AddPetRequest" -} +{"required":["name","photoUrls"],"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"name":{"type":"string","example":"doggie"},"category":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"tag.Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"pet"},"x-readme-ref-name":"AddPetRequest"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/address.json b/examples/advanced/src/gen/schemas2/address.json index 21f73590a..26b2e91c8 100644 --- a/examples/advanced/src/gen/schemas2/address.json +++ b/examples/advanced/src/gen/schemas2/address.json @@ -1,11 +1 @@ -{ - "type": "object", - "properties": { - "street": { "type": "string", "example": "437 Lytton" }, - "city": { "type": "string", "example": "Palo Alto" }, - "state": { "type": "string", "example": "CA" }, - "zip": { "type": "string", "example": "94301" } - }, - "xml": { "name": "address" }, - "x-readme-ref-name": "Address" -} +{"type":"object","properties":{"street":{"type":"string","example":"437 Lytton"},"city":{"type":"string","example":"Palo Alto"},"state":{"type":"string","example":"CA"},"zip":{"type":"string","example":"94301"}},"xml":{"name":"address"},"x-readme-ref-name":"Address"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/apiResponse.json b/examples/advanced/src/gen/schemas2/apiResponse.json index b2fac184b..debde926f 100644 --- a/examples/advanced/src/gen/schemas2/apiResponse.json +++ b/examples/advanced/src/gen/schemas2/apiResponse.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "code": { "type": "integer", "format": "int32" }, "type": { "type": "string" }, "message": { "type": "string" } }, - "xml": { "name": "##default" }, - "x-readme-ref-name": "ApiResponse" -} +{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}},"xml":{"name":"##default"},"x-readme-ref-name":"ApiResponse"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/category.json b/examples/advanced/src/gen/schemas2/category.json index 9dacf896f..17bc3d8c0 100644 --- a/examples/advanced/src/gen/schemas2/category.json +++ b/examples/advanced/src/gen/schemas2/category.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/customer.json b/examples/advanced/src/gen/schemas2/customer.json index 854aa64af..c2a3dbae8 100644 --- a/examples/advanced/src/gen/schemas2/customer.json +++ b/examples/advanced/src/gen/schemas2/customer.json @@ -1,24 +1 @@ -{ - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 100000 }, - "username": { "type": "string", "example": "fehguy" }, - "address": { - "type": "array", - "xml": { "name": "addresses", "wrapped": true }, - "items": { - "type": "object", - "properties": { - "street": { "type": "string", "example": "437 Lytton" }, - "city": { "type": "string", "example": "Palo Alto" }, - "state": { "type": "string", "example": "CA" }, - "zip": { "type": "string", "example": "94301" } - }, - "xml": { "name": "address" }, - "x-readme-ref-name": "Address" - } - } - }, - "xml": { "name": "customer" }, - "x-readme-ref-name": "Customer" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":100000},"username":{"type":"string","example":"fehguy"},"address":{"type":"array","xml":{"name":"addresses","wrapped":true},"items":{"type":"object","properties":{"street":{"type":"string","example":"437 Lytton"},"city":{"type":"string","example":"Palo Alto"},"state":{"type":"string","example":"CA"},"zip":{"type":"string","example":"94301"}},"xml":{"name":"address"},"x-readme-ref-name":"Address"}}},"xml":{"name":"customer"},"x-readme-ref-name":"Customer"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/order.json b/examples/advanced/src/gen/schemas2/order.json index b6a5e8038..7b7908df8 100644 --- a/examples/advanced/src/gen/schemas2/order.json +++ b/examples/advanced/src/gen/schemas2/order.json @@ -1,16 +1 @@ -{ - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "petId": { "type": "integer", "format": "int64", "example": 198772 }, - "quantity": { "type": "integer", "format": "int32", "example": 7 }, - "orderType": { "type": "string", "enum": ["foo", "bar"] }, - "type": { "type": "string", "description": "Order Status", "example": "approved" }, - "shipDate": { "type": "string", "format": "date-time" }, - "status": { "type": "string", "description": "Order Status", "example": "approved", "enum": ["placed", "approved", "delivered"] }, - "http_status": { "type": "number", "description": "HTTP Status", "example": 200, "enum": [200, 400, 500], "x-enumNames": ["ok", "not_found"] }, - "complete": { "type": "boolean" } - }, - "xml": { "name": "order" }, - "x-readme-ref-name": "Order" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"petId":{"type":"integer","format":"int64","example":198772},"quantity":{"type":"integer","format":"int32","example":7},"orderType":{"type":"string","enum":["foo","bar"]},"type":{"type":"string","description":"Order Status","example":"approved"},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","example":"approved","enum":["placed","approved","delivered"]},"http_status":{"type":"number","description":"HTTP Status","example":200,"enum":[200,400,500],"x-enumNames":["ok","not_found"]},"complete":{"type":"boolean"}},"xml":{"name":"order"},"x-readme-ref-name":"Order"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/pet.json b/examples/advanced/src/gen/schemas2/pet.json index 039034944..2fbaeb150 100644 --- a/examples/advanced/src/gen/schemas2/pet.json +++ b/examples/advanced/src/gen/schemas2/pet.json @@ -1,28 +1 @@ -{ - "required": ["name", "photoUrls"], - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10, "readOnly": true }, - "name": { "type": "string", "example": "doggie", "writeOnly": true }, - "category": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" - }, - "photoUrls": { "type": "array", "xml": { "wrapped": true }, "items": { "type": "string", "xml": { "name": "photoUrl" } } }, - "tags": { - "type": "array", - "xml": { "wrapped": true }, - "items": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "tag.Tag" - } - }, - "status": { "type": "string", "description": "pet status in the store", "enum": ["available", "pending", "sold"] } - }, - "xml": { "name": "pet" }, - "x-readme-ref-name": "Pet" -} +{"required":["name","photoUrls"],"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10,"readOnly":true},"name":{"type":"string","example":"doggie","writeOnly":true},"category":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"tag.Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"pet"},"x-readme-ref-name":"Pet"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/petNotFound.json b/examples/advanced/src/gen/schemas2/petNotFound.json index 497ca4aec..21bd7ea19 100644 --- a/examples/advanced/src/gen/schemas2/petNotFound.json +++ b/examples/advanced/src/gen/schemas2/petNotFound.json @@ -1 +1 @@ -{ "properties": { "code": { "format": "int32", "type": "integer" }, "message": { "type": "string" } } } +{"properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/tagTag.json b/examples/advanced/src/gen/schemas2/tagTag.json index 97ab1f7b3..1d4e0f49c 100644 --- a/examples/advanced/src/gen/schemas2/tagTag.json +++ b/examples/advanced/src/gen/schemas2/tagTag.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "tag.Tag" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"tag.Tag"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/user.json b/examples/advanced/src/gen/schemas2/user.json index 18c6ae262..c7ecf0adf 100644 --- a/examples/advanced/src/gen/schemas2/user.json +++ b/examples/advanced/src/gen/schemas2/user.json @@ -1,16 +1 @@ -{ - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "username": { "type": "string", "example": "theUser" }, - "uuid": { "type": "string", "format": "uuid", "deprecated": true }, - "firstName": { "type": "string", "example": "John" }, - "lastName": { "type": "string", "example": "James" }, - "email": { "type": "string", "format": "email", "example": "john@email.com" }, - "password": { "type": "string", "example": "12345" }, - "phone": { "type": "string", "example": "12345" }, - "userStatus": { "type": "integer", "description": "User Status", "format": "int32", "example": 1 } - }, - "xml": { "name": "user" }, - "x-readme-ref-name": "User" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"username":{"type":"string","example":"theUser"},"uuid":{"type":"string","format":"uuid","deprecated":true},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"James"},"email":{"type":"string","format":"email","example":"john@email.com"},"password":{"type":"string","example":"12345"},"phone":{"type":"string","example":"12345"},"userStatus":{"type":"integer","description":"User Status","format":"int32","example":1}},"xml":{"name":"user"},"x-readme-ref-name":"User"} \ No newline at end of file diff --git a/examples/advanced/src/gen/schemas2/userArray.json b/examples/advanced/src/gen/schemas2/userArray.json index 2644d317b..78eb2d434 100644 --- a/examples/advanced/src/gen/schemas2/userArray.json +++ b/examples/advanced/src/gen/schemas2/userArray.json @@ -1,19 +1 @@ -{ - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "username": { "type": "string", "example": "theUser" }, - "uuid": { "type": "string", "format": "uuid", "deprecated": true }, - "firstName": { "type": "string", "example": "John" }, - "lastName": { "type": "string", "example": "James" }, - "email": { "type": "string", "format": "email", "example": "john@email.com" }, - "password": { "type": "string", "example": "12345" }, - "phone": { "type": "string", "example": "12345" }, - "userStatus": { "type": "integer", "description": "User Status", "format": "int32", "example": 1 } - }, - "xml": { "name": "user" }, - "x-readme-ref-name": "User" - } -} +{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"username":{"type":"string","example":"theUser"},"uuid":{"type":"string","format":"uuid","deprecated":true},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"James"},"email":{"type":"string","format":"email","example":"john@email.com"},"password":{"type":"string","example":"12345"},"phone":{"type":"string","example":"12345"},"userStatus":{"type":"integer","description":"User Status","format":"int32","example":1}},"xml":{"name":"user"},"x-readme-ref-name":"User"}} \ No newline at end of file diff --git a/examples/advanced/src/gen/zod/addPetRequestSchema.ts b/examples/advanced/src/gen/zod/addPetRequestSchema.ts deleted file mode 100644 index 7aa97a69a..000000000 --- a/examples/advanced/src/gen/zod/addPetRequestSchema.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { AddPetRequest } from '../models/ts/AddPetRequest.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { categorySchema } from './categorySchema.ts' -import { tagTagSchema } from './tag/tagSchema.ts' -import { z } from 'zod' - -export const addPetRequestSchema = z.object({ - id: z.number().int().optional(), - name: z.string(), - category: z.lazy(() => categorySchema).optional(), - photoUrls: z.array(z.string()), - tags: z.array(z.lazy(() => tagTagSchema)).optional(), - status: z.enum(['available', 'pending', 'sold']).describe('pet status in the store').optional(), -} satisfies ToZod) - -export type AddPetRequestSchema = AddPetRequest diff --git a/examples/advanced/src/gen/zod/addressSchema.ts b/examples/advanced/src/gen/zod/addressSchema.ts deleted file mode 100644 index 979b20246..000000000 --- a/examples/advanced/src/gen/zod/addressSchema.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Address } from '../models/ts/Address.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const addressSchema = z.object({ - street: z.string().optional(), - city: z.string().optional(), - state: z.string().optional(), - zip: z.string().optional(), -} satisfies ToZod
) - -export type AddressSchema = Address diff --git a/examples/advanced/src/gen/zod/apiResponseSchema.ts b/examples/advanced/src/gen/zod/apiResponseSchema.ts deleted file mode 100644 index a66285c1d..000000000 --- a/examples/advanced/src/gen/zod/apiResponseSchema.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { ApiResponse } from '../models/ts/ApiResponse.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const apiResponseSchema = z.object({ - code: z.number().int().optional(), - type: z.string().optional(), - message: z.string().optional(), -} satisfies ToZod) - -export type ApiResponseSchema = ApiResponse diff --git a/examples/advanced/src/gen/zod/categorySchema.ts b/examples/advanced/src/gen/zod/categorySchema.ts deleted file mode 100644 index a146f55a3..000000000 --- a/examples/advanced/src/gen/zod/categorySchema.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Category } from '../models/ts/Category.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const categorySchema = z.object({ - id: z.number().int().optional(), - name: z.string().optional(), -} satisfies ToZod) - -export type CategorySchema = Category diff --git a/examples/advanced/src/gen/zod/customerSchema.ts b/examples/advanced/src/gen/zod/customerSchema.ts deleted file mode 100644 index 31b482b7b..000000000 --- a/examples/advanced/src/gen/zod/customerSchema.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Customer } from '../models/ts/Customer.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { addressSchema } from './addressSchema.ts' -import { z } from 'zod' - -export const customerSchema = z.object({ - id: z.number().int().optional(), - username: z.string().optional(), - address: z.array(z.lazy(() => addressSchema)).optional(), -} satisfies ToZod) - -export type CustomerSchema = Customer diff --git a/examples/advanced/src/gen/zod/index.ts b/examples/advanced/src/gen/zod/index.ts deleted file mode 100644 index d5eee321e..000000000 --- a/examples/advanced/src/gen/zod/index.ts +++ /dev/null @@ -1,184 +0,0 @@ -export type { AddPetRequestSchema } from './addPetRequestSchema.ts' -export type { AddressSchema } from './addressSchema.ts' -export type { ApiResponseSchema } from './apiResponseSchema.ts' -export type { CategorySchema } from './categorySchema.ts' -export type { CustomerSchema } from './customerSchema.ts' -export type { OrderSchema } from './orderSchema.ts' -export type { AddPet200Schema, AddPet405Schema, AddPetMutationRequestSchema, AddPetMutationResponseSchema } from './petController/addPetSchema.ts' -export type { - DeletePetPathParamsSchema, - DeletePetHeaderParamsSchema, - DeletePet400Schema, - DeletePetMutationResponseSchema, -} from './petController/deletePetSchema.ts' -export type { - FindPetsByStatusPathParamsSchema, - FindPetsByStatus200Schema, - FindPetsByStatus400Schema, - FindPetsByStatusQueryResponseSchema, -} from './petController/findPetsByStatusSchema.ts' -export type { - FindPetsByTagsQueryParamsSchema, - FindPetsByTagsHeaderParamsSchema, - FindPetsByTags200Schema, - FindPetsByTags400Schema, - FindPetsByTagsQueryResponseSchema, -} from './petController/findPetsByTagsSchema.ts' -export type { - GetPetByIdPathParamsSchema, - GetPetById200Schema, - GetPetById400Schema, - GetPetById404Schema, - GetPetByIdQueryResponseSchema, -} from './petController/getPetByIdSchema.ts' -export type { - UpdatePet200Schema, - UpdatePet202Schema, - UpdatePet400Schema, - UpdatePet404Schema, - UpdatePet405Schema, - UpdatePetMutationRequestSchema, - UpdatePetMutationResponseSchema, -} from './petController/updatePetSchema.ts' -export type { - UpdatePetWithFormPathParamsSchema, - UpdatePetWithFormQueryParamsSchema, - UpdatePetWithForm405Schema, - UpdatePetWithFormMutationResponseSchema, -} from './petController/updatePetWithFormSchema.ts' -export type { - UploadFilePathParamsSchema, - UploadFileQueryParamsSchema, - UploadFile200Schema, - UploadFileMutationRequestSchema, - UploadFileMutationResponseSchema, -} from './petController/uploadFileSchema.ts' -export type { PetNotFoundSchema } from './petNotFoundSchema.ts' -export type { PetSchema } from './petSchema.ts' -export type { - CreatePetsPathParamsSchema, - CreatePetsQueryParamsSchema, - CreatePetsHeaderParamsSchema, - CreatePets201Schema, - CreatePetsErrorSchema, - CreatePetsMutationRequestSchema, - CreatePetsMutationResponseSchema, -} from './petsController/createPetsSchema.ts' -export type { TagTagSchema } from './tag/tagSchema.ts' -export type { UserArraySchema } from './userArraySchema.ts' -export type { CreateUserErrorSchema, CreateUserMutationRequestSchema, CreateUserMutationResponseSchema } from './userController/createUserSchema.ts' -export type { - CreateUsersWithListInput200Schema, - CreateUsersWithListInputErrorSchema, - CreateUsersWithListInputMutationRequestSchema, - CreateUsersWithListInputMutationResponseSchema, -} from './userController/createUsersWithListInputSchema.ts' -export type { - DeleteUserPathParamsSchema, - DeleteUser400Schema, - DeleteUser404Schema, - DeleteUserMutationResponseSchema, -} from './userController/deleteUserSchema.ts' -export type { - GetUserByNamePathParamsSchema, - GetUserByName200Schema, - GetUserByName400Schema, - GetUserByName404Schema, - GetUserByNameQueryResponseSchema, -} from './userController/getUserByNameSchema.ts' -export type { LoginUserQueryParamsSchema, LoginUser200Schema, LoginUser400Schema, LoginUserQueryResponseSchema } from './userController/loginUserSchema.ts' -export type { LogoutUserErrorSchema, LogoutUserQueryResponseSchema } from './userController/logoutUserSchema.ts' -export type { - UpdateUserPathParamsSchema, - UpdateUserErrorSchema, - UpdateUserMutationRequestSchema, - UpdateUserMutationResponseSchema, -} from './userController/updateUserSchema.ts' -export type { UserSchema } from './userSchema.ts' -export { addPetRequestSchema } from './addPetRequestSchema.ts' -export { addressSchema } from './addressSchema.ts' -export { apiResponseSchema } from './apiResponseSchema.ts' -export { categorySchema } from './categorySchema.ts' -export { customerSchema } from './customerSchema.ts' -export { orderSchema } from './orderSchema.ts' -export { addPet200Schema, addPet405Schema, addPetMutationRequestSchema, addPetMutationResponseSchema } from './petController/addPetSchema.ts' -export { deletePetPathParamsSchema, deletePetHeaderParamsSchema, deletePet400Schema, deletePetMutationResponseSchema } from './petController/deletePetSchema.ts' -export { - findPetsByStatusPathParamsSchema, - findPetsByStatus200Schema, - findPetsByStatus400Schema, - findPetsByStatusQueryResponseSchema, -} from './petController/findPetsByStatusSchema.ts' -export { - findPetsByTagsQueryParamsSchema, - findPetsByTagsHeaderParamsSchema, - findPetsByTags200Schema, - findPetsByTags400Schema, - findPetsByTagsQueryResponseSchema, -} from './petController/findPetsByTagsSchema.ts' -export { - getPetByIdPathParamsSchema, - getPetById200Schema, - getPetById400Schema, - getPetById404Schema, - getPetByIdQueryResponseSchema, -} from './petController/getPetByIdSchema.ts' -export { - updatePet200Schema, - updatePet202Schema, - updatePet400Schema, - updatePet404Schema, - updatePet405Schema, - updatePetMutationRequestSchema, - updatePetMutationResponseSchema, -} from './petController/updatePetSchema.ts' -export { - updatePetWithFormPathParamsSchema, - updatePetWithFormQueryParamsSchema, - updatePetWithForm405Schema, - updatePetWithFormMutationResponseSchema, -} from './petController/updatePetWithFormSchema.ts' -export { - uploadFilePathParamsSchema, - uploadFileQueryParamsSchema, - uploadFile200Schema, - uploadFileMutationRequestSchema, - uploadFileMutationResponseSchema, -} from './petController/uploadFileSchema.ts' -export { petNotFoundSchema } from './petNotFoundSchema.ts' -export { petSchema } from './petSchema.ts' -export { - createPetsPathParamsSchema, - createPetsQueryParamsSchema, - createPetsHeaderParamsSchema, - createPets201Schema, - createPetsErrorSchema, - createPetsMutationRequestSchema, - createPetsMutationResponseSchema, -} from './petsController/createPetsSchema.ts' -export { tagTagSchema } from './tag/tagSchema.ts' -export { userArraySchema } from './userArraySchema.ts' -export { createUserErrorSchema, createUserMutationRequestSchema, createUserMutationResponseSchema } from './userController/createUserSchema.ts' -export { - createUsersWithListInput200Schema, - createUsersWithListInputErrorSchema, - createUsersWithListInputMutationRequestSchema, - createUsersWithListInputMutationResponseSchema, -} from './userController/createUsersWithListInputSchema.ts' -export { deleteUserPathParamsSchema, deleteUser400Schema, deleteUser404Schema, deleteUserMutationResponseSchema } from './userController/deleteUserSchema.ts' -export { - getUserByNamePathParamsSchema, - getUserByName200Schema, - getUserByName400Schema, - getUserByName404Schema, - getUserByNameQueryResponseSchema, -} from './userController/getUserByNameSchema.ts' -export { loginUserQueryParamsSchema, loginUser200Schema, loginUser400Schema, loginUserQueryResponseSchema } from './userController/loginUserSchema.ts' -export { logoutUserErrorSchema, logoutUserQueryResponseSchema } from './userController/logoutUserSchema.ts' -export { - updateUserPathParamsSchema, - updateUserErrorSchema, - updateUserMutationRequestSchema, - updateUserMutationResponseSchema, -} from './userController/updateUserSchema.ts' -export { userSchema } from './userSchema.ts' diff --git a/examples/advanced/src/gen/zod/orderSchema.ts b/examples/advanced/src/gen/zod/orderSchema.ts deleted file mode 100644 index 2f7b6bdf6..000000000 --- a/examples/advanced/src/gen/zod/orderSchema.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Order } from '../models/ts/Order.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const orderSchema = z.object({ - id: z.number().int().optional(), - petId: z.number().int().optional(), - quantity: z.number().int().optional(), - orderType: z.enum(['foo', 'bar']).optional(), - type: z.string().describe('Order Status').optional(), - shipDate: z.string().datetime({ offset: true }).optional(), - status: z.enum(['placed', 'approved', 'delivered']).describe('Order Status').optional(), - http_status: z - .union([z.literal(200), z.literal(400)]) - .describe('HTTP Status') - .optional(), - complete: z.boolean().optional(), -} satisfies ToZod) - -export type OrderSchema = Order diff --git a/examples/advanced/src/gen/zod/petController/addPetSchema.ts b/examples/advanced/src/gen/zod/petController/addPetSchema.ts deleted file mode 100644 index 01c67dae4..000000000 --- a/examples/advanced/src/gen/zod/petController/addPetSchema.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { AddPet200, AddPet405, AddPetMutationRequest, AddPetMutationResponse } from '../../models/ts/petController/AddPet.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { addPetRequestSchema } from '../addPetRequestSchema.ts' -import { petSchema } from '../petSchema.ts' -import { z } from 'zod' - -/** - * @description Successful operation - */ -export const addPet200Schema = z.lazy(() => petSchema).and(z.object({ name: z.never() })) - -export type AddPet200Schema = AddPet200 - -/** - * @description Pet not found - */ -export const addPet405Schema = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), -} satisfies ToZod) - -export type AddPet405Schema = AddPet405 - -/** - * @description Create a new pet in the store - */ -export const addPetMutationRequestSchema = z.lazy(() => addPetRequestSchema) - -export type AddPetMutationRequestSchema = AddPetMutationRequest - -export const addPetMutationResponseSchema = z.lazy(() => addPet200Schema) - -export type AddPetMutationResponseSchema = AddPetMutationResponse diff --git a/examples/advanced/src/gen/zod/petController/deletePetSchema.ts b/examples/advanced/src/gen/zod/petController/deletePetSchema.ts deleted file mode 100644 index 55c5bf10c..000000000 --- a/examples/advanced/src/gen/zod/petController/deletePetSchema.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { DeletePetPathParams, DeletePetHeaderParams, DeletePet400, DeletePetMutationResponse } from '../../models/ts/petController/DeletePet.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const deletePetPathParamsSchema = z.object({ - petId: z.number().int().describe('Pet id to delete'), -} satisfies ToZod) - -export type DeletePetPathParamsSchema = DeletePetPathParams - -export const deletePetHeaderParamsSchema = z - .object({ - api_key: z.string().optional(), - } satisfies ToZod) - .optional() - -export type DeletePetHeaderParamsSchema = DeletePetHeaderParams - -/** - * @description Invalid pet value - */ -export const deletePet400Schema = z.any() - -export type DeletePet400Schema = DeletePet400 - -export const deletePetMutationResponseSchema = z.any() - -export type DeletePetMutationResponseSchema = DeletePetMutationResponse diff --git a/examples/advanced/src/gen/zod/petController/findPetsByStatusSchema.ts b/examples/advanced/src/gen/zod/petController/findPetsByStatusSchema.ts deleted file mode 100644 index e849bfe37..000000000 --- a/examples/advanced/src/gen/zod/petController/findPetsByStatusSchema.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { - FindPetsByStatusPathParams, - FindPetsByStatus200, - FindPetsByStatus400, - FindPetsByStatusQueryResponse, -} from '../../models/ts/petController/FindPetsByStatus.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { petSchema } from '../petSchema.ts' -import { z } from 'zod' - -export const findPetsByStatusPathParamsSchema = z.object({ - step_id: z.string(), -} satisfies ToZod) - -export type FindPetsByStatusPathParamsSchema = FindPetsByStatusPathParams - -/** - * @description successful operation - */ -export const findPetsByStatus200Schema = z - .array(z.lazy(() => petSchema)) - .min(1) - .max(3) - -export type FindPetsByStatus200Schema = FindPetsByStatus200 - -/** - * @description Invalid status value - */ -export const findPetsByStatus400Schema = z.any() - -export type FindPetsByStatus400Schema = FindPetsByStatus400 - -export const findPetsByStatusQueryResponseSchema = z.lazy(() => findPetsByStatus200Schema) - -export type FindPetsByStatusQueryResponseSchema = FindPetsByStatusQueryResponse diff --git a/examples/advanced/src/gen/zod/petController/findPetsByTagsSchema.ts b/examples/advanced/src/gen/zod/petController/findPetsByTagsSchema.ts deleted file mode 100644 index fe08a2b3d..000000000 --- a/examples/advanced/src/gen/zod/petController/findPetsByTagsSchema.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { - FindPetsByTagsQueryParams, - FindPetsByTagsHeaderParams, - FindPetsByTags200, - FindPetsByTags400, - FindPetsByTagsQueryResponse, -} from '../../models/ts/petController/FindPetsByTags.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { petSchema } from '../petSchema.ts' -import { z } from 'zod' - -export const findPetsByTagsQueryParamsSchema = z - .object({ - tags: z.array(z.string()).describe('Tags to filter by').optional(), - page: z.string().describe('to request with required page number or pagination').optional(), - pageSize: z.string().describe('to request with required page size').optional(), - } satisfies ToZod) - .optional() - -export type FindPetsByTagsQueryParamsSchema = FindPetsByTagsQueryParams - -export const findPetsByTagsHeaderParamsSchema = z.object({ - 'X-EXAMPLE': z.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), -} satisfies ToZod) - -export type FindPetsByTagsHeaderParamsSchema = FindPetsByTagsHeaderParams - -/** - * @description successful operation - */ -export const findPetsByTags200Schema = z.array(z.lazy(() => petSchema)) - -export type FindPetsByTags200Schema = FindPetsByTags200 - -/** - * @description Invalid tag value - */ -export const findPetsByTags400Schema = z.any() - -export type FindPetsByTags400Schema = FindPetsByTags400 - -export const findPetsByTagsQueryResponseSchema = z.lazy(() => findPetsByTags200Schema) - -export type FindPetsByTagsQueryResponseSchema = FindPetsByTagsQueryResponse diff --git a/examples/advanced/src/gen/zod/petController/getPetByIdSchema.ts b/examples/advanced/src/gen/zod/petController/getPetByIdSchema.ts deleted file mode 100644 index 1766159eb..000000000 --- a/examples/advanced/src/gen/zod/petController/getPetByIdSchema.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { GetPetByIdPathParams, GetPetById200, GetPetById400, GetPetById404, GetPetByIdQueryResponse } from '../../models/ts/petController/GetPetById.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { petSchema } from '../petSchema.ts' -import { z } from 'zod' - -export const getPetByIdPathParamsSchema = z.object({ - petId: z.number().int().describe('ID of pet to return'), -} satisfies ToZod) - -export type GetPetByIdPathParamsSchema = GetPetByIdPathParams - -/** - * @description successful operation - */ -export const getPetById200Schema = z.lazy(() => petSchema).and(z.object({ name: z.never() })) - -export type GetPetById200Schema = GetPetById200 - -/** - * @description Invalid ID supplied - */ -export const getPetById400Schema = z.any() - -export type GetPetById400Schema = GetPetById400 - -/** - * @description Pet not found - */ -export const getPetById404Schema = z.any() - -export type GetPetById404Schema = GetPetById404 - -export const getPetByIdQueryResponseSchema = z.lazy(() => getPetById200Schema) - -export type GetPetByIdQueryResponseSchema = GetPetByIdQueryResponse diff --git a/examples/advanced/src/gen/zod/petController/index.ts b/examples/advanced/src/gen/zod/petController/index.ts deleted file mode 100644 index 60e179033..000000000 --- a/examples/advanced/src/gen/zod/petController/index.ts +++ /dev/null @@ -1,82 +0,0 @@ -export type { AddPet200Schema, AddPet405Schema, AddPetMutationRequestSchema, AddPetMutationResponseSchema } from './addPetSchema.ts' -export type { DeletePetPathParamsSchema, DeletePetHeaderParamsSchema, DeletePet400Schema, DeletePetMutationResponseSchema } from './deletePetSchema.ts' -export type { - FindPetsByStatusPathParamsSchema, - FindPetsByStatus200Schema, - FindPetsByStatus400Schema, - FindPetsByStatusQueryResponseSchema, -} from './findPetsByStatusSchema.ts' -export type { - FindPetsByTagsQueryParamsSchema, - FindPetsByTagsHeaderParamsSchema, - FindPetsByTags200Schema, - FindPetsByTags400Schema, - FindPetsByTagsQueryResponseSchema, -} from './findPetsByTagsSchema.ts' -export type { - GetPetByIdPathParamsSchema, - GetPetById200Schema, - GetPetById400Schema, - GetPetById404Schema, - GetPetByIdQueryResponseSchema, -} from './getPetByIdSchema.ts' -export type { - UpdatePet200Schema, - UpdatePet202Schema, - UpdatePet400Schema, - UpdatePet404Schema, - UpdatePet405Schema, - UpdatePetMutationRequestSchema, - UpdatePetMutationResponseSchema, -} from './updatePetSchema.ts' -export type { - UpdatePetWithFormPathParamsSchema, - UpdatePetWithFormQueryParamsSchema, - UpdatePetWithForm405Schema, - UpdatePetWithFormMutationResponseSchema, -} from './updatePetWithFormSchema.ts' -export type { - UploadFilePathParamsSchema, - UploadFileQueryParamsSchema, - UploadFile200Schema, - UploadFileMutationRequestSchema, - UploadFileMutationResponseSchema, -} from './uploadFileSchema.ts' -export { addPet200Schema, addPet405Schema, addPetMutationRequestSchema, addPetMutationResponseSchema } from './addPetSchema.ts' -export { deletePetPathParamsSchema, deletePetHeaderParamsSchema, deletePet400Schema, deletePetMutationResponseSchema } from './deletePetSchema.ts' -export { - findPetsByStatusPathParamsSchema, - findPetsByStatus200Schema, - findPetsByStatus400Schema, - findPetsByStatusQueryResponseSchema, -} from './findPetsByStatusSchema.ts' -export { - findPetsByTagsQueryParamsSchema, - findPetsByTagsHeaderParamsSchema, - findPetsByTags200Schema, - findPetsByTags400Schema, - findPetsByTagsQueryResponseSchema, -} from './findPetsByTagsSchema.ts' -export { getPetByIdPathParamsSchema, getPetById200Schema, getPetById400Schema, getPetById404Schema, getPetByIdQueryResponseSchema } from './getPetByIdSchema.ts' -export { - updatePet200Schema, - updatePet202Schema, - updatePet400Schema, - updatePet404Schema, - updatePet405Schema, - updatePetMutationRequestSchema, - updatePetMutationResponseSchema, -} from './updatePetSchema.ts' -export { - updatePetWithFormPathParamsSchema, - updatePetWithFormQueryParamsSchema, - updatePetWithForm405Schema, - updatePetWithFormMutationResponseSchema, -} from './updatePetWithFormSchema.ts' -export { - uploadFilePathParamsSchema, - uploadFileQueryParamsSchema, - uploadFile200Schema, - uploadFileMutationRequestSchema, - uploadFileMutationResponseSchema, -} from './uploadFileSchema.ts' diff --git a/examples/advanced/src/gen/zod/petController/updatePetSchema.ts b/examples/advanced/src/gen/zod/petController/updatePetSchema.ts deleted file mode 100644 index cdf0d6bb9..000000000 --- a/examples/advanced/src/gen/zod/petController/updatePetSchema.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { - UpdatePet200, - UpdatePet202, - UpdatePet400, - UpdatePet404, - UpdatePet405, - UpdatePetMutationRequest, - UpdatePetMutationResponse, -} from '../../models/ts/petController/UpdatePet.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { petSchema } from '../petSchema.ts' -import { z } from 'zod' - -/** - * @description Successful operation - */ -export const updatePet200Schema = z.lazy(() => petSchema).and(z.object({ name: z.never() })) - -export type UpdatePet200Schema = UpdatePet200 - -/** - * @description accepted operation - */ -export const updatePet202Schema = z.object({ - id: z.number().int().optional(), -} satisfies ToZod) - -export type UpdatePet202Schema = UpdatePet202 - -/** - * @description Invalid ID supplied - */ -export const updatePet400Schema = z.any() - -export type UpdatePet400Schema = UpdatePet400 - -/** - * @description Pet not found - */ -export const updatePet404Schema = z.any() - -export type UpdatePet404Schema = UpdatePet404 - -/** - * @description Validation exception - */ -export const updatePet405Schema = z.any() - -export type UpdatePet405Schema = UpdatePet405 - -/** - * @description Update an existent pet in the store - */ -export const updatePetMutationRequestSchema = z.lazy(() => petSchema).and(z.object({ id: z.never() })) - -export type UpdatePetMutationRequestSchema = UpdatePetMutationRequest - -export const updatePetMutationResponseSchema = z.union([z.lazy(() => updatePet200Schema), z.lazy(() => updatePet202Schema)]) - -export type UpdatePetMutationResponseSchema = UpdatePetMutationResponse diff --git a/examples/advanced/src/gen/zod/petController/updatePetWithFormSchema.ts b/examples/advanced/src/gen/zod/petController/updatePetWithFormSchema.ts deleted file mode 100644 index 09a402fa9..000000000 --- a/examples/advanced/src/gen/zod/petController/updatePetWithFormSchema.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { - UpdatePetWithFormPathParams, - UpdatePetWithFormQueryParams, - UpdatePetWithForm405, - UpdatePetWithFormMutationResponse, -} from '../../models/ts/petController/UpdatePetWithForm.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const updatePetWithFormPathParamsSchema = z.object({ - petId: z.number().int().describe('ID of pet that needs to be updated'), -} satisfies ToZod) - -export type UpdatePetWithFormPathParamsSchema = UpdatePetWithFormPathParams - -export const updatePetWithFormQueryParamsSchema = z - .object({ - name: z.string().describe('Name of pet that needs to be updated').optional(), - status: z.string().describe('Status of pet that needs to be updated').optional(), - } satisfies ToZod) - .optional() - -export type UpdatePetWithFormQueryParamsSchema = UpdatePetWithFormQueryParams - -/** - * @description Invalid input - */ -export const updatePetWithForm405Schema = z.any() - -export type UpdatePetWithForm405Schema = UpdatePetWithForm405 - -export const updatePetWithFormMutationResponseSchema = z.any() - -export type UpdatePetWithFormMutationResponseSchema = UpdatePetWithFormMutationResponse diff --git a/examples/advanced/src/gen/zod/petController/uploadFileSchema.ts b/examples/advanced/src/gen/zod/petController/uploadFileSchema.ts deleted file mode 100644 index 81946a477..000000000 --- a/examples/advanced/src/gen/zod/petController/uploadFileSchema.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { - UploadFilePathParams, - UploadFileQueryParams, - UploadFile200, - UploadFileMutationRequest, - UploadFileMutationResponse, -} from '../../models/ts/petController/UploadFile.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { apiResponseSchema } from '../apiResponseSchema.ts' -import { z } from 'zod' - -export const uploadFilePathParamsSchema = z.object({ - petId: z.number().int().describe('ID of pet to update'), -} satisfies ToZod) - -export type UploadFilePathParamsSchema = UploadFilePathParams - -export const uploadFileQueryParamsSchema = z - .object({ - additionalMetadata: z.string().describe('Additional Metadata').optional(), - } satisfies ToZod) - .optional() - -export type UploadFileQueryParamsSchema = UploadFileQueryParams - -/** - * @description successful operation - */ -export const uploadFile200Schema = z.lazy(() => apiResponseSchema) - -export type UploadFile200Schema = UploadFile200 - -export const uploadFileMutationRequestSchema = z.instanceof(File) - -export type UploadFileMutationRequestSchema = UploadFileMutationRequest - -export const uploadFileMutationResponseSchema = z.lazy(() => uploadFile200Schema) - -export type UploadFileMutationResponseSchema = UploadFileMutationResponse diff --git a/examples/advanced/src/gen/zod/petNotFoundSchema.ts b/examples/advanced/src/gen/zod/petNotFoundSchema.ts deleted file mode 100644 index 501bdc2f2..000000000 --- a/examples/advanced/src/gen/zod/petNotFoundSchema.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { PetNotFound } from '../models/ts/PetNotFound.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const petNotFoundSchema = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), -} satisfies ToZod) - -export type PetNotFoundSchema = PetNotFound diff --git a/examples/advanced/src/gen/zod/petSchema.ts b/examples/advanced/src/gen/zod/petSchema.ts deleted file mode 100644 index cb65579d7..000000000 --- a/examples/advanced/src/gen/zod/petSchema.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Pet } from '../models/ts/Pet.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { categorySchema } from './categorySchema.ts' -import { tagTagSchema } from './tag/tagSchema.ts' -import { z } from 'zod' - -export const petSchema = z.object({ - id: z.number().int().optional(), - name: z.string(), - category: z.lazy(() => categorySchema).optional(), - photoUrls: z.array(z.string()), - tags: z.array(z.lazy(() => tagTagSchema)).optional(), - status: z.enum(['available', 'pending', 'sold']).describe('pet status in the store').optional(), -} satisfies ToZod) - -export type PetSchema = Pet diff --git a/examples/advanced/src/gen/zod/petsController/createPetsSchema.ts b/examples/advanced/src/gen/zod/petsController/createPetsSchema.ts deleted file mode 100644 index 7564e65be..000000000 --- a/examples/advanced/src/gen/zod/petsController/createPetsSchema.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { - CreatePetsPathParams, - CreatePetsQueryParams, - CreatePetsHeaderParams, - CreatePets201, - CreatePetsError, - CreatePetsMutationRequest, - CreatePetsMutationResponse, -} from '../../models/ts/petsController/CreatePets.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { petNotFoundSchema } from '../petNotFoundSchema.ts' -import { z } from 'zod' - -export const createPetsPathParamsSchema = z.object({ - uuid: z.string().describe('UUID'), -} satisfies ToZod) - -export type CreatePetsPathParamsSchema = CreatePetsPathParams - -export const createPetsQueryParamsSchema = z - .object({ - offset: z.number().int().describe('Offset */').optional(), - } satisfies ToZod) - .optional() - -export type CreatePetsQueryParamsSchema = CreatePetsQueryParams - -export const createPetsHeaderParamsSchema = z.object({ - 'X-EXAMPLE': z.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), -} satisfies ToZod) - -export type CreatePetsHeaderParamsSchema = CreatePetsHeaderParams - -/** - * @description Null response - */ -export const createPets201Schema = z.any() - -export type CreatePets201Schema = CreatePets201 - -/** - * @description unexpected error - */ -export const createPetsErrorSchema = z.lazy(() => petNotFoundSchema) - -export type CreatePetsErrorSchema = CreatePetsError - -export const createPetsMutationRequestSchema = z.object({ - name: z.string(), - tag: z.string(), -} satisfies ToZod) - -export type CreatePetsMutationRequestSchema = CreatePetsMutationRequest - -export const createPetsMutationResponseSchema = z.lazy(() => createPets201Schema) - -export type CreatePetsMutationResponseSchema = CreatePetsMutationResponse diff --git a/examples/advanced/src/gen/zod/petsController/index.ts b/examples/advanced/src/gen/zod/petsController/index.ts deleted file mode 100644 index a3d6e10e4..000000000 --- a/examples/advanced/src/gen/zod/petsController/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -export type { - CreatePetsPathParamsSchema, - CreatePetsQueryParamsSchema, - CreatePetsHeaderParamsSchema, - CreatePets201Schema, - CreatePetsErrorSchema, - CreatePetsMutationRequestSchema, - CreatePetsMutationResponseSchema, -} from './createPetsSchema.ts' -export { - createPetsPathParamsSchema, - createPetsQueryParamsSchema, - createPetsHeaderParamsSchema, - createPets201Schema, - createPetsErrorSchema, - createPetsMutationRequestSchema, - createPetsMutationResponseSchema, -} from './createPetsSchema.ts' diff --git a/examples/advanced/src/gen/zod/tag/index.ts b/examples/advanced/src/gen/zod/tag/index.ts deleted file mode 100644 index 2c407e967..000000000 --- a/examples/advanced/src/gen/zod/tag/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type { TagTagSchema } from './tagSchema.ts' -export { tagTagSchema } from './tagSchema.ts' diff --git a/examples/advanced/src/gen/zod/tag/tagSchema.ts b/examples/advanced/src/gen/zod/tag/tagSchema.ts deleted file mode 100644 index 72e603b68..000000000 --- a/examples/advanced/src/gen/zod/tag/tagSchema.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { TagTag } from '../../models/ts/tag/Tag.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const tagTagSchema = z.object({ - id: z.number().int().optional(), - name: z.string().optional(), -} satisfies ToZod) - -export type TagTagSchema = TagTag diff --git a/examples/advanced/src/gen/zod/userArraySchema.ts b/examples/advanced/src/gen/zod/userArraySchema.ts deleted file mode 100644 index 99a5203b2..000000000 --- a/examples/advanced/src/gen/zod/userArraySchema.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { UserArray } from '../models/ts/UserArray.ts' -import { userSchema } from './userSchema.ts' -import { z } from 'zod' - -export const userArraySchema = z.array(z.lazy(() => userSchema)) - -export type UserArraySchema = UserArray diff --git a/examples/advanced/src/gen/zod/userController/createUserSchema.ts b/examples/advanced/src/gen/zod/userController/createUserSchema.ts deleted file mode 100644 index de3ad8a37..000000000 --- a/examples/advanced/src/gen/zod/userController/createUserSchema.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { CreateUserError, CreateUserMutationRequest, CreateUserMutationResponse } from '../../models/ts/userController/CreateUser.ts' -import { userSchema } from '../userSchema.ts' -import { z } from 'zod' - -/** - * @description successful operation - */ -export const createUserErrorSchema = z.lazy(() => userSchema) - -export type CreateUserErrorSchema = CreateUserError - -/** - * @description Created user object - */ -export const createUserMutationRequestSchema = z.lazy(() => userSchema) - -export type CreateUserMutationRequestSchema = CreateUserMutationRequest - -export const createUserMutationResponseSchema = z.any() - -export type CreateUserMutationResponseSchema = CreateUserMutationResponse diff --git a/examples/advanced/src/gen/zod/userController/createUsersWithListInputSchema.ts b/examples/advanced/src/gen/zod/userController/createUsersWithListInputSchema.ts deleted file mode 100644 index 69a5d4d69..000000000 --- a/examples/advanced/src/gen/zod/userController/createUsersWithListInputSchema.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { - CreateUsersWithListInput200, - CreateUsersWithListInputError, - CreateUsersWithListInputMutationRequest, - CreateUsersWithListInputMutationResponse, -} from '../../models/ts/userController/CreateUsersWithListInput.ts' -import { userSchema } from '../userSchema.ts' -import { z } from 'zod' - -/** - * @description Successful operation - */ -export const createUsersWithListInput200Schema = z.lazy(() => userSchema) - -export type CreateUsersWithListInput200Schema = CreateUsersWithListInput200 - -/** - * @description successful operation - */ -export const createUsersWithListInputErrorSchema = z.any() - -export type CreateUsersWithListInputErrorSchema = CreateUsersWithListInputError - -export const createUsersWithListInputMutationRequestSchema = z.array(z.lazy(() => userSchema)) - -export type CreateUsersWithListInputMutationRequestSchema = CreateUsersWithListInputMutationRequest - -export const createUsersWithListInputMutationResponseSchema = z.lazy(() => createUsersWithListInput200Schema) - -export type CreateUsersWithListInputMutationResponseSchema = CreateUsersWithListInputMutationResponse diff --git a/examples/advanced/src/gen/zod/userController/deleteUserSchema.ts b/examples/advanced/src/gen/zod/userController/deleteUserSchema.ts deleted file mode 100644 index b702a4480..000000000 --- a/examples/advanced/src/gen/zod/userController/deleteUserSchema.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DeleteUserPathParams, DeleteUser400, DeleteUser404, DeleteUserMutationResponse } from '../../models/ts/userController/DeleteUser.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const deleteUserPathParamsSchema = z.object({ - username: z.string().describe('The name that needs to be deleted'), -} satisfies ToZod) - -export type DeleteUserPathParamsSchema = DeleteUserPathParams - -/** - * @description Invalid username supplied - */ -export const deleteUser400Schema = z.any() - -export type DeleteUser400Schema = DeleteUser400 - -/** - * @description User not found - */ -export const deleteUser404Schema = z.any() - -export type DeleteUser404Schema = DeleteUser404 - -export const deleteUserMutationResponseSchema = z.any() - -export type DeleteUserMutationResponseSchema = DeleteUserMutationResponse diff --git a/examples/advanced/src/gen/zod/userController/getUserByNameSchema.ts b/examples/advanced/src/gen/zod/userController/getUserByNameSchema.ts deleted file mode 100644 index 32bbc6ba7..000000000 --- a/examples/advanced/src/gen/zod/userController/getUserByNameSchema.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { - GetUserByNamePathParams, - GetUserByName200, - GetUserByName400, - GetUserByName404, - GetUserByNameQueryResponse, -} from '../../models/ts/userController/GetUserByName.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { userSchema } from '../userSchema.ts' -import { z } from 'zod' - -export const getUserByNamePathParamsSchema = z.object({ - username: z.string().describe('The name that needs to be fetched. Use user1 for testing. '), -} satisfies ToZod) - -export type GetUserByNamePathParamsSchema = GetUserByNamePathParams - -/** - * @description successful operation - */ -export const getUserByName200Schema = z.lazy(() => userSchema) - -export type GetUserByName200Schema = GetUserByName200 - -/** - * @description Invalid username supplied - */ -export const getUserByName400Schema = z.any() - -export type GetUserByName400Schema = GetUserByName400 - -/** - * @description User not found - */ -export const getUserByName404Schema = z.any() - -export type GetUserByName404Schema = GetUserByName404 - -export const getUserByNameQueryResponseSchema = z.lazy(() => getUserByName200Schema) - -export type GetUserByNameQueryResponseSchema = GetUserByNameQueryResponse diff --git a/examples/advanced/src/gen/zod/userController/index.ts b/examples/advanced/src/gen/zod/userController/index.ts deleted file mode 100644 index a09e336df..000000000 --- a/examples/advanced/src/gen/zod/userController/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -export type { CreateUserErrorSchema, CreateUserMutationRequestSchema, CreateUserMutationResponseSchema } from './createUserSchema.ts' -export type { - CreateUsersWithListInput200Schema, - CreateUsersWithListInputErrorSchema, - CreateUsersWithListInputMutationRequestSchema, - CreateUsersWithListInputMutationResponseSchema, -} from './createUsersWithListInputSchema.ts' -export type { DeleteUserPathParamsSchema, DeleteUser400Schema, DeleteUser404Schema, DeleteUserMutationResponseSchema } from './deleteUserSchema.ts' -export type { - GetUserByNamePathParamsSchema, - GetUserByName200Schema, - GetUserByName400Schema, - GetUserByName404Schema, - GetUserByNameQueryResponseSchema, -} from './getUserByNameSchema.ts' -export type { LoginUserQueryParamsSchema, LoginUser200Schema, LoginUser400Schema, LoginUserQueryResponseSchema } from './loginUserSchema.ts' -export type { LogoutUserErrorSchema, LogoutUserQueryResponseSchema } from './logoutUserSchema.ts' -export type { - UpdateUserPathParamsSchema, - UpdateUserErrorSchema, - UpdateUserMutationRequestSchema, - UpdateUserMutationResponseSchema, -} from './updateUserSchema.ts' -export { createUserErrorSchema, createUserMutationRequestSchema, createUserMutationResponseSchema } from './createUserSchema.ts' -export { - createUsersWithListInput200Schema, - createUsersWithListInputErrorSchema, - createUsersWithListInputMutationRequestSchema, - createUsersWithListInputMutationResponseSchema, -} from './createUsersWithListInputSchema.ts' -export { deleteUserPathParamsSchema, deleteUser400Schema, deleteUser404Schema, deleteUserMutationResponseSchema } from './deleteUserSchema.ts' -export { - getUserByNamePathParamsSchema, - getUserByName200Schema, - getUserByName400Schema, - getUserByName404Schema, - getUserByNameQueryResponseSchema, -} from './getUserByNameSchema.ts' -export { loginUserQueryParamsSchema, loginUser200Schema, loginUser400Schema, loginUserQueryResponseSchema } from './loginUserSchema.ts' -export { logoutUserErrorSchema, logoutUserQueryResponseSchema } from './logoutUserSchema.ts' -export { updateUserPathParamsSchema, updateUserErrorSchema, updateUserMutationRequestSchema, updateUserMutationResponseSchema } from './updateUserSchema.ts' diff --git a/examples/advanced/src/gen/zod/userController/loginUserSchema.ts b/examples/advanced/src/gen/zod/userController/loginUserSchema.ts deleted file mode 100644 index b989c9d21..000000000 --- a/examples/advanced/src/gen/zod/userController/loginUserSchema.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { LoginUserQueryParams, LoginUser200, LoginUser400, LoginUserQueryResponse } from '../../models/ts/userController/LoginUser.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const loginUserQueryParamsSchema = z - .object({ - username: z.string().describe('The user name for login').optional(), - password: z.string().describe('The password for login in clear text').optional(), - } satisfies ToZod) - .optional() - -export type LoginUserQueryParamsSchema = LoginUserQueryParams - -/** - * @description successful operation - */ -export const loginUser200Schema = z.string() - -export type LoginUser200Schema = LoginUser200 - -/** - * @description Invalid username/password supplied - */ -export const loginUser400Schema = z.any() - -export type LoginUser400Schema = LoginUser400 - -export const loginUserQueryResponseSchema = z.lazy(() => loginUser200Schema) - -export type LoginUserQueryResponseSchema = LoginUserQueryResponse diff --git a/examples/advanced/src/gen/zod/userController/logoutUserSchema.ts b/examples/advanced/src/gen/zod/userController/logoutUserSchema.ts deleted file mode 100644 index e0da31fe4..000000000 --- a/examples/advanced/src/gen/zod/userController/logoutUserSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { LogoutUserError, LogoutUserQueryResponse } from '../../models/ts/userController/LogoutUser.ts' -import { z } from 'zod' - -/** - * @description successful operation - */ -export const logoutUserErrorSchema = z.any() - -export type LogoutUserErrorSchema = LogoutUserError - -export const logoutUserQueryResponseSchema = z.any() - -export type LogoutUserQueryResponseSchema = LogoutUserQueryResponse diff --git a/examples/advanced/src/gen/zod/userController/updateUserSchema.ts b/examples/advanced/src/gen/zod/userController/updateUserSchema.ts deleted file mode 100644 index cdeb7d0b4..000000000 --- a/examples/advanced/src/gen/zod/userController/updateUserSchema.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { UpdateUserPathParams, UpdateUserError, UpdateUserMutationRequest, UpdateUserMutationResponse } from '../../models/ts/userController/UpdateUser.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { userSchema } from '../userSchema.ts' -import { z } from 'zod' - -export const updateUserPathParamsSchema = z.object({ - username: z.string().describe('name that need to be deleted'), -} satisfies ToZod) - -export type UpdateUserPathParamsSchema = UpdateUserPathParams - -/** - * @description successful operation - */ -export const updateUserErrorSchema = z.any() - -export type UpdateUserErrorSchema = UpdateUserError - -/** - * @description Update an existent user in the store - */ -export const updateUserMutationRequestSchema = z.lazy(() => userSchema) - -export type UpdateUserMutationRequestSchema = UpdateUserMutationRequest - -export const updateUserMutationResponseSchema = z.any() - -export type UpdateUserMutationResponseSchema = UpdateUserMutationResponse diff --git a/examples/advanced/src/gen/zod/userSchema.ts b/examples/advanced/src/gen/zod/userSchema.ts deleted file mode 100644 index 48d86b92f..000000000 --- a/examples/advanced/src/gen/zod/userSchema.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { User } from '../models/ts/User.ts' -import type { ToZod } from '@kubb/plugin-zod/utils' -import { z } from 'zod' - -export const userSchema = z.object({ - id: z.number().int().optional(), - username: z.string().optional(), - uuid: z.string().uuid().optional(), - firstName: z.string().optional(), - lastName: z.string().optional(), - email: z.string().email().optional(), - password: z.string().optional(), - phone: z.string().optional(), - userStatus: z.number().int().describe('User Status').optional(), -} satisfies ToZod) - -export type UserSchema = User diff --git a/examples/client/src/gen/schemas/AddPetRequest.json b/examples/client/src/gen/schemas/AddPetRequest.json index c25915adc..b83ec3eba 100644 --- a/examples/client/src/gen/schemas/AddPetRequest.json +++ b/examples/client/src/gen/schemas/AddPetRequest.json @@ -1,28 +1 @@ -{ - "required": ["name", "photoUrls"], - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "name": { "type": "string", "example": "doggie" }, - "category": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" - }, - "photoUrls": { "type": "array", "xml": { "wrapped": true }, "items": { "type": "string", "xml": { "name": "photoUrl" } } }, - "tags": { - "type": "array", - "xml": { "wrapped": true }, - "items": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "Tag" - } - }, - "status": { "type": "string", "description": "pet status in the store", "enum": ["available", "pending", "sold"] } - }, - "xml": { "name": "pet" }, - "x-readme-ref-name": "AddPetRequest" -} +{"required":["name","photoUrls"],"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"name":{"type":"string","example":"doggie"},"category":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"pet"},"x-readme-ref-name":"AddPetRequest"} \ No newline at end of file diff --git a/examples/client/src/gen/schemas/ApiResponse.json b/examples/client/src/gen/schemas/ApiResponse.json index b2fac184b..debde926f 100644 --- a/examples/client/src/gen/schemas/ApiResponse.json +++ b/examples/client/src/gen/schemas/ApiResponse.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "code": { "type": "integer", "format": "int32" }, "type": { "type": "string" }, "message": { "type": "string" } }, - "xml": { "name": "##default" }, - "x-readme-ref-name": "ApiResponse" -} +{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}},"xml":{"name":"##default"},"x-readme-ref-name":"ApiResponse"} \ No newline at end of file diff --git a/examples/client/src/gen/schemas/Category.json b/examples/client/src/gen/schemas/Category.json index 9dacf896f..17bc3d8c0 100644 --- a/examples/client/src/gen/schemas/Category.json +++ b/examples/client/src/gen/schemas/Category.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"} \ No newline at end of file diff --git a/examples/client/src/gen/schemas/Pet.json b/examples/client/src/gen/schemas/Pet.json index 340a86227..952ba00d5 100644 --- a/examples/client/src/gen/schemas/Pet.json +++ b/examples/client/src/gen/schemas/Pet.json @@ -1,28 +1 @@ -{ - "required": ["name", "photoUrls"], - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "name": { "type": "string", "example": "doggie" }, - "category": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Dogs" } }, - "xml": { "name": "category" }, - "x-readme-ref-name": "Category" - }, - "photoUrls": { "type": "array", "xml": { "wrapped": true }, "items": { "type": "string", "xml": { "name": "photoUrl" } } }, - "tags": { - "type": "array", - "xml": { "wrapped": true }, - "items": { - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "Tag" - } - }, - "status": { "type": "string", "description": "pet status in the store", "enum": ["available", "pending", "sold"] } - }, - "xml": { "name": "pet" }, - "x-readme-ref-name": "Pet" -} +{"required":["name","photoUrls"],"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"name":{"type":"string","example":"doggie"},"category":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Dogs"}},"xml":{"name":"category"},"x-readme-ref-name":"Category"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"pet"},"x-readme-ref-name":"Pet"} \ No newline at end of file diff --git a/examples/client/src/gen/schemas/PetNotFound.json b/examples/client/src/gen/schemas/PetNotFound.json index 497ca4aec..21bd7ea19 100644 --- a/examples/client/src/gen/schemas/PetNotFound.json +++ b/examples/client/src/gen/schemas/PetNotFound.json @@ -1 +1 @@ -{ "properties": { "code": { "format": "int32", "type": "integer" }, "message": { "type": "string" } } } +{"properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}} \ No newline at end of file diff --git a/examples/client/src/gen/schemas/Tag.json b/examples/client/src/gen/schemas/Tag.json index 7ae9c9e7d..88fde017b 100644 --- a/examples/client/src/gen/schemas/Tag.json +++ b/examples/client/src/gen/schemas/Tag.json @@ -1,6 +1 @@ -{ - "type": "object", - "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, - "xml": { "name": "tag" }, - "x-readme-ref-name": "Tag" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"tag"},"x-readme-ref-name":"Tag"} \ No newline at end of file diff --git a/examples/client/src/gen/schemas/User.json b/examples/client/src/gen/schemas/User.json index e9faf9bda..0319cc07e 100644 --- a/examples/client/src/gen/schemas/User.json +++ b/examples/client/src/gen/schemas/User.json @@ -1,15 +1 @@ -{ - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64", "example": 10 }, - "username": { "type": "string", "example": "theUser" }, - "firstName": { "type": "string", "example": "John" }, - "lastName": { "type": "string", "example": "James" }, - "email": { "type": "string", "example": "john@email.com" }, - "password": { "type": "string", "example": "12345" }, - "phone": { "type": "string", "example": "12345" }, - "userStatus": { "type": "integer", "description": "User Status", "format": "int32", "example": 1 } - }, - "xml": { "name": "user" }, - "x-readme-ref-name": "User" -} +{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"username":{"type":"string","example":"theUser"},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"James"},"email":{"type":"string","example":"john@email.com"},"password":{"type":"string","example":"12345"},"phone":{"type":"string","example":"12345"},"userStatus":{"type":"integer","description":"User Status","format":"int32","example":1}},"xml":{"name":"user"},"x-readme-ref-name":"User"} \ No newline at end of file diff --git a/packages/plugin-oas/src/generator.tsx b/packages/plugin-oas/src/generator.tsx index 0df67a330..df9bef99b 100644 --- a/packages/plugin-oas/src/generator.tsx +++ b/packages/plugin-oas/src/generator.tsx @@ -67,7 +67,7 @@ export function createReactGenerator(pars const Component = parseOptions.Operations.bind(this) - root.render( + await root.render( @@ -89,7 +89,7 @@ export function createReactGenerator(pars const Component = parseOptions.Operation.bind(this) - root.render( + await root.render( @@ -113,7 +113,7 @@ export function createReactGenerator(pars const Component = parseOptions.Schema.bind(this) - root.render( + await root.render( diff --git a/packages/react/package.json b/packages/react/package.json index f1fc64f42..1959dbef2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -87,17 +87,17 @@ "@kubb/parser-ts": "workspace:*", "execa": "^9.5.2", "natural-orderby": "^4.0.0", - "react": "catalog:react18", "react-devtools-core": "^5.3.2", - "react-reconciler": "catalog:react18", "signal-exit": "^4.1.0", "ws": "^8.18.0" }, "devDependencies": { "@kubb/config-ts": "workspace:*", "@kubb/config-tsup": "workspace:*", - "@types/react": "catalog:react18", - "@types/react-reconciler": "catalog:react18", + "react": "catalog:react19", + "react-reconciler": "catalog:react19", + "@types/react": "catalog:react19", + "@types/react-reconciler": "catalog:react19", "@types/signal-exit": "^3.0.4", "@types/ws": "^8.5.13", "tsup": "catalog:", diff --git a/packages/react/src/ReactTemplate.tsx b/packages/react/src/ReactTemplate.tsx index ebfbe6d1e..c65e6115c 100644 --- a/packages/react/src/ReactTemplate.tsx +++ b/packages/react/src/ReactTemplate.tsx @@ -1,6 +1,7 @@ import process from 'node:process' import { onExit } from 'signal-exit' +import { LegacyRoot } from 'react-reconciler/constants' import { Root } from './components/Root.tsx' import { KubbRenderer } from './kubbRenderer.ts' import { type RendererResult, renderer } from './renderer.ts' @@ -17,7 +18,9 @@ import type { FiberRoot } from './kubbRenderer.ts' import type { DOMElement } from './types.ts' // https://agent-hunt.medium.com/hello-world-custom-react-renderer-9a95b7cd04bc -const noop = () => {} +const noop = () => { + console.log('ff') +} export type ReactTemplateOptions = { stdout?: NodeJS.WriteStream @@ -78,16 +81,37 @@ export class ReactTemplate = Record {}, - null, + rootTag, + hydrationCallbacks, + isStrictMode, + concurrentUpdatesByDefaultOverride, + identifierPrefix, + onUncaughtError, + onCaughtError, + onRecoverableError, + transitionCallbacks, ) // Unmount when process exits @@ -147,17 +171,20 @@ export class ReactTemplate = Record { const element = ( {node} ) - KubbRenderer.updateContainer(element, this.#container, null, noop) + return new Promise((resolve) => { + KubbRenderer.updateContainer(element, this.#container, null, resolve) + }) } - renderToString(node: ReactNode, context?: Context): string { - this.render(node, context) + + async renderToString(node: ReactNode, context?: Context): Promise { + await this.render(node, context) return this.#lastRendererResult.output } diff --git a/packages/react/src/components/File.test.tsx b/packages/react/src/components/File.test.tsx index 0d134bd6d..e81fcb528 100644 --- a/packages/react/src/components/File.test.tsx +++ b/packages/react/src/components/File.test.tsx @@ -3,6 +3,16 @@ import { createRoot } from '../createRoot.ts' import { File } from './File.tsx' describe('', () => { + test('render text', async () => { + const Component = () => { + return 'test' + } + const root = createRoot() + await root.render() + + expect(root.output).toMatchInlineSnapshot(`"test"`) + }) + test('render File', () => { const Component = () => { return @@ -13,8 +23,8 @@ describe('', () => { expect(root.output).toMatchInlineSnapshot(`""`) }) - test('render File with Import and Export', () => { - const Component = () => { + test('render File with Import and Export', async () => { + const Component = async () => { return ( @@ -23,7 +33,7 @@ describe('', () => { ) } const root = createRoot() - root.render() + await root.render() expect(root.files).toMatchInlineSnapshot(` [ diff --git a/packages/react/src/kubbRenderer.ts b/packages/react/src/kubbRenderer.ts index c35326381..e30f3a5c5 100644 --- a/packages/react/src/kubbRenderer.ts +++ b/packages/react/src/kubbRenderer.ts @@ -1,11 +1,16 @@ import createReconciler from 'react-reconciler' -import { DefaultEventPriority } from 'react-reconciler/constants.js' +import { DefaultEventPriority, NoEventPriority } from 'react-reconciler/constants' import { appendChildNode, createNode, createTextNode, insertBeforeNode, removeChildNode, setAttribute, setTextNodeValue } from './dom.ts' import type { DOMElement, DOMNodeAttribute, ElementNames, TextNode } from './types.ts' +// https://github.com/pmndrs/react-three-fiber/blob/v9/packages/fiber/src/core/reconciler.tsx +declare module 'react-reconciler/constants' { + const NoEventPriority = 0 +} + const diff = (before: Record, after: Record): Record | undefined => { if (before === after) { return @@ -51,6 +56,8 @@ type UpdatePayload = { props: Props | undefined } +let currentUpdatePriority = NoEventPriority + /** * @link https://www.npmjs.com/package/react-devtools-inline * @link https://github.com/nitin42/Making-a-custom-React-renderer/blob/master/part-one.md @@ -173,7 +180,9 @@ export const KubbRenderer = createReconciler< return { props } }, - commitUpdate(node, { props }) { + commitUpdate(node, payload, type, oldProps, newProps) { + const { props } = newProps + if (props) { for (const [key, value] of Object.entries(props)) { setAttribute(node, key, value as DOMNodeAttribute) @@ -186,6 +195,28 @@ export const KubbRenderer = createReconciler< removeChild(node, removeNode) { removeChildNode(node, removeNode) }, + // new for react 19 + // @ts-ignore + setCurrentUpdatePriority: (newPriority) => { + currentUpdatePriority = newPriority + }, + getCurrentUpdatePriority: () => currentUpdatePriority, + resolveUpdatePriority: () => currentUpdatePriority || DefaultEventPriority, + maySuspendCommit() { + return false + }, + startSuspendingCommit() {}, + waitForCommitToBeReady() { + return null + }, + preloadInstance() { + // Return true to indicate it's already loaded + return true + }, + suspendInstance() {}, + shouldAttemptEagerTransition() { + return false + }, }) export type { FiberRoot } from 'react-reconciler' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa68c4b4c..18b7eae61 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,19 +24,19 @@ catalogs: typescript: specifier: ^5.7.2 version: 5.7.2 - react18: + react19: '@types/react': - specifier: ^18.3.16 - version: 18.3.16 + specifier: ^19.0.1 + version: 19.0.1 '@types/react-reconciler': specifier: 0.28.9 version: 0.28.9 react: - specifier: ^18.3.1 - version: 18.3.1 + specifier: ^19.0.0 + version: 19.0.0 react-reconciler: - specifier: 0.29.2 - version: 0.29.2 + specifier: 0.31.0 + version: 0.31.0 overrides: '@changesets/assemble-release-plan': 6.0.0 @@ -1742,21 +1742,18 @@ importers: '@kubb/parser-ts': specifier: workspace:* version: link:../parser-ts + deasync: + specifier: ^0.1.30 + version: 0.1.30 execa: specifier: ^9.5.2 version: 9.5.2 natural-orderby: specifier: ^4.0.0 version: 4.0.0 - react: - specifier: catalog:react18 - version: 18.3.1 react-devtools-core: specifier: ^5.3.2 version: 5.3.2 - react-reconciler: - specifier: catalog:react18 - version: 0.29.2(react@18.3.1) signal-exit: specifier: ^4.1.0 version: 4.1.0 @@ -1771,17 +1768,23 @@ importers: specifier: workspace:* version: link:../config-tsup '@types/react': - specifier: catalog:react18 - version: 18.3.16 + specifier: catalog:react19 + version: 19.0.1 '@types/react-reconciler': - specifier: catalog:react18 - version: 0.28.9(@types/react@18.3.16) + specifier: catalog:react19 + version: 0.28.9(@types/react@19.0.1) '@types/signal-exit': specifier: ^3.0.4 version: 3.0.4 '@types/ws': specifier: ^8.5.13 version: 8.5.13 + react: + specifier: catalog:react19 + version: 19.0.0 + react-reconciler: + specifier: catalog:react19 + version: 0.31.0(react@19.0.0) tsup: specifier: 'catalog:' version: 8.3.5(@microsoft/api-extractor@7.48.1(@types/node@20.17.10))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) @@ -3257,6 +3260,9 @@ packages: '@types/react@18.3.16': resolution: {integrity: sha512-oh8AMIC4Y2ciKufU8hnKgs+ufgbA/dhPTACaZPM86AbwX9QwnFtSoPWEeRUj8fge+v6kFt78BXcDhAU1SrrAsw==} + '@types/react@19.0.1': + resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==} + '@types/sax@1.2.7': resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} @@ -3746,6 +3752,9 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + bindings@1.5.0: + resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + birpc@0.2.19: resolution: {integrity: sha512-5WeXXAvTmitV1RqJFppT5QtUiz2p1mRSYU000Jkft5ZUCLJIk4uQriYNO50HknxKwM6jd8utNc66K1qGIwwWBQ==} @@ -4287,6 +4296,10 @@ packages: de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + deasync@0.1.30: + resolution: {integrity: sha512-OaAjvEQuQ9tJsKG4oHO9nV1UHTwb2Qc2+fadB0VeVtD0Z9wiG1XPGLJ4W3aLhAoQSYTaLROFRbd5X20Dkzf7MQ==} + engines: {node: '>=0.11.0'} + debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -4692,6 +4705,9 @@ packages: file-saver@2.0.5: resolution: {integrity: sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==} + file-uri-to-path@1.0.0: + resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -5814,6 +5830,9 @@ packages: next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} + node-addon-api@1.7.2: + resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==} + node-fetch-h2@2.3.0: resolution: {integrity: sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==} engines: {node: 4.x || >=6.0.0} @@ -6366,6 +6385,12 @@ packages: peerDependencies: react: ^18.3.1 + react-reconciler@0.31.0: + resolution: {integrity: sha512-7Ob7Z+URmesIsIVRjnLoDGwBEG/tVitidU0nMsqX/eeJaLY89RISO/10ERe0MqmzuKUUB1rmY+h1itMbUHg9BQ==} + engines: {node: '>=0.10.0'} + peerDependencies: + react: ^19.0.0 + react-refresh@0.14.2: resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} engines: {node: '>=0.10.0'} @@ -6384,6 +6409,10 @@ packages: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + engines: {node: '>=0.10.0'} + read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -9314,15 +9343,19 @@ snapshots: dependencies: '@types/react': 18.3.16 - '@types/react-reconciler@0.28.9(@types/react@18.3.16)': + '@types/react-reconciler@0.28.9(@types/react@19.0.1)': dependencies: - '@types/react': 18.3.16 + '@types/react': 19.0.1 '@types/react@18.3.16': dependencies: '@types/prop-types': 15.7.14 csstype: 3.1.3 + '@types/react@19.0.1': + dependencies: + csstype: 3.1.3 + '@types/sax@1.2.7': dependencies: '@types/node': 20.17.10 @@ -9943,6 +9976,10 @@ snapshots: binary-extensions@2.3.0: {} + bindings@1.5.0: + dependencies: + file-uri-to-path: 1.0.0 + birpc@0.2.19: {} bl@4.1.0: @@ -10534,6 +10571,11 @@ snapshots: de-indent@1.0.2: {} + deasync@0.1.30: + dependencies: + bindings: 1.5.0 + node-addon-api: 1.7.2 + debug@2.6.9: dependencies: ms: 2.0.0 @@ -11068,6 +11110,8 @@ snapshots: file-saver@2.0.5: {} + file-uri-to-path@1.0.0: {} + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -12351,6 +12395,8 @@ snapshots: next-tick@1.1.0: {} + node-addon-api@1.7.2: {} + node-fetch-h2@2.3.0: dependencies: http2-client: 1.3.5 @@ -12936,6 +12982,11 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 + react-reconciler@0.31.0(react@19.0.0): + dependencies: + react: 19.0.0 + scheduler: 0.25.0 + react-refresh@0.14.2: {} react-shallow-renderer@16.15.0(react@18.3.1): @@ -12954,6 +13005,8 @@ snapshots: dependencies: loose-envify: 1.4.0 + react@19.0.0: {} + read-cache@1.0.0: dependencies: pify: 2.3.0