@kubb/plugin-faker
Version:
Faker.js data generator plugin for Kubb, creating realistic mock data from OpenAPI specifications for development and testing.
34 lines (29 loc) • 752 B
text/typescript
/**
* Generated by Kubb (https://kubb.dev/).
* Do not edit manually.
*/
import { faker } from '@faker-js/faker'
export function listPetsQueryParams(data?: Partial<ListPetsQueryParams>): ListPetsQueryParams {
return {
...{ limit: faker.string.alpha() },
...(data || {}),
}
}
/**
* @description A paged array of pets
*/
export function listPets200(data?: Partial<ListPets200>): ListPets200 {
return {
...{ ...pagination(), ...pets() },
...(data || {}),
}
}
/**
* @description unexpected error
*/
export function listPetsError() {
return error()
}
export function listPetsQueryResponse(data?: Partial<ListPetsQueryResponse>): ListPetsQueryResponse {
return data || faker.helpers.arrayElement<any>([listPets200()])
}