Skip to content

Commit

Permalink
chore: update snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnvanhulle committed Feb 18, 2024
1 parent 91a5952 commit 02446cc
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 285 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,6 @@ exports[`OperationGenerator > [GET] should generate 1`] = `
"path": "@faker-js/faker",
"root": undefined,
},
{
"isTypeOnly": false,
"name": [
"Pets",
],
"path": "Pets",
"root": "listPets.ts",
},
{
"isTypeOnly": true,
"name": [
"ListPetsError",
],
"path": "ListPets",
"root": "listPets.ts",
},
{
"isTypeOnly": true,
"name": [
Expand Down Expand Up @@ -110,13 +94,6 @@ exports[`OperationGenerator > [GET] should generate 1`] = `
...override
};
}
/**
* @description unexpected error
*/
export function ListPetsError(override?: NonNullable<Partial<ListPetsError>>): NonNullable<ListPetsError> {
return Pets(override);
}
/**
* @description A paged array of pets
*/
Expand Down Expand Up @@ -145,22 +122,6 @@ exports[`OperationGenerator > [GET] should generate 2`] = `
"path": "@faker-js/faker",
"root": undefined,
},
{
"isTypeOnly": false,
"name": [
"Pet",
],
"path": "Pet",
"root": "showPetById.ts",
},
{
"isTypeOnly": true,
"name": [
"ShowPetByIdError",
],
"path": "ShowPetById",
"root": "showPetById.ts",
},
{
"isTypeOnly": true,
"name": [
Expand Down Expand Up @@ -199,13 +160,6 @@ exports[`OperationGenerator > [GET] should generate 2`] = `
...override
};
}
/**
* @description unexpected error
*/
export function ShowPetByIdError(override?: NonNullable<Partial<ShowPetByIdError>>): NonNullable<ShowPetByIdError> {
return Pet(override);
}
/**
* @description Expected response to a valid request
*/
Expand Down Expand Up @@ -234,22 +188,6 @@ exports[`OperationGenerator > [GET] should generate with seed \`[222]\` 1`] = `
"path": "@faker-js/faker",
"root": undefined,
},
{
"isTypeOnly": false,
"name": [
"Pets",
],
"path": "Pets",
"root": "listPets.ts",
},
{
"isTypeOnly": true,
"name": [
"ListPetsError",
],
"path": "ListPets",
"root": "listPets.ts",
},
{
"isTypeOnly": true,
"name": [
Expand Down Expand Up @@ -289,14 +227,6 @@ exports[`OperationGenerator > [GET] should generate with seed \`[222]\` 1`] = `
...override
};
}
/**
* @description unexpected error
*/
export function ListPetsError(override?: NonNullable<Partial<ListPetsError>>): NonNullable<ListPetsError> {
faker.seed([222]);
return Pets(override);
}
/**
* @description A paged array of pets
*/
Expand Down Expand Up @@ -326,22 +256,6 @@ exports[`OperationGenerator > [GET] should generate with seed \`[222]\` 2`] = `
"path": "@faker-js/faker",
"root": undefined,
},
{
"isTypeOnly": false,
"name": [
"Pet",
],
"path": "Pet",
"root": "showPetById.ts",
},
{
"isTypeOnly": true,
"name": [
"ShowPetByIdError",
],
"path": "ShowPetById",
"root": "showPetById.ts",
},
{
"isTypeOnly": true,
"name": [
Expand Down Expand Up @@ -381,14 +295,6 @@ exports[`OperationGenerator > [GET] should generate with seed \`[222]\` 2`] = `
...override
};
}
/**
* @description unexpected error
*/
export function ShowPetByIdError(override?: NonNullable<Partial<ShowPetByIdError>>): NonNullable<ShowPetByIdError> {
faker.seed([222]);
return Pet(override);
}
/**
* @description Expected response to a valid request
*/
Expand Down Expand Up @@ -418,22 +324,6 @@ exports[`OperationGenerator > [POST] should generate 1`] = `
"path": "@faker-js/faker",
"root": undefined,
},
{
"isTypeOnly": true,
"name": [
"CreatePets201",
],
"path": "CreatePets",
"root": "createPets.ts",
},
{
"isTypeOnly": true,
"name": [
"CreatePetsError",
],
"path": "CreatePets",
"root": "createPets.ts",
},
{
"isTypeOnly": true,
"name": [
Expand All @@ -458,22 +348,7 @@ exports[`OperationGenerator > [POST] should generate 1`] = `
},
"override": undefined,
"path": "createPets.ts",
"source": "/**
* @description Null response
*/
export function CreatePets201(override?: NonNullable<Partial<CreatePets201>>): NonNullable<CreatePets201> {
return undefined;
}
/**
* @description unexpected error
*/
export function CreatePetsError(override?: NonNullable<Partial<CreatePetsError>>): NonNullable<CreatePetsError> {
return undefined;
}
export function CreatePetsMutationRequest(override: NonNullable<Partial<CreatePetsMutationRequest>> = {}): NonNullable<CreatePetsMutationRequest> {
"source": "export function CreatePetsMutationRequest(override: NonNullable<Partial<CreatePetsMutationRequest>> = {}): NonNullable<CreatePetsMutationRequest> {
return {
...{ "name": faker.string.alpha(), "tag": faker.string.alpha() },
...override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Mutation/> > pets 1`] = `
"/**
* @description Null response
*/
export function createCreatePets201(override?: NonNullable<Partial<CreatePets201>>): NonNullable<CreatePets201> {
return undefined
}
/**
* @description unexpected error
*/
export function createCreatePetsError(override?: NonNullable<Partial<CreatePetsError>>): NonNullable<CreatePetsError> {
return undefined
}
export function createCreatePetsMutationRequest(override: NonNullable<Partial<CreatePetsMutationRequest>> = {}): NonNullable<CreatePetsMutationRequest> {
"export function createCreatePetsMutationRequest(override: NonNullable<Partial<CreatePetsMutationRequest>> = {}): NonNullable<CreatePetsMutationRequest> {
return {
...{ name: faker.string.alpha(), tag: faker.string.alpha() },
...override,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ exports[`<Query/> > showPetById 1`] = `
}
}
/**
* @description unexpected error
*/
export function createShowPetByIdError(override?: NonNullable<Partial<ShowPetByIdError>>): NonNullable<ShowPetByIdError> {
return createPet(override)
}
/**
* @description Expected response to a valid request
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Mutation/> > pets 1`] = `
"type CreatePetsClient = typeof client<CreatePetsMutationResponse, CreatePets201 | CreatePetsError, CreatePetsMutationRequest>
"type CreatePetsClient = typeof client<CreatePetsMutationResponse, never, CreatePetsMutationRequest>
type CreatePets = {
data: CreatePetsMutationResponse
error: CreatePets201 | CreatePetsError
error: never
request: CreatePetsMutationRequest
pathParams: never
queryParams: never
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Query/> > showPetById 1`] = `
"type ShowPetByIdClient = typeof client<ShowPetByIdQueryResponse, ShowPetByIdError, never>
"type ShowPetByIdClient = typeof client<ShowPetByIdQueryResponse, never, never>
type ShowPetById = {
data: ShowPetByIdQueryResponse
error: ShowPetByIdError
error: never
request: never
pathParams: ShowPetByIdPathParams
queryParams: never
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Mutation/> > pets 1`] = `
"type CreatePetsClient = typeof client<CreatePetsMutationResponse, CreatePets201 | CreatePetsError, CreatePetsMutationRequest>
"type CreatePetsClient = typeof client<CreatePetsMutationResponse, never, CreatePetsMutationRequest>
type CreatePets = {
data: CreatePetsMutationResponse
error: CreatePets201 | CreatePetsError
error: never
request: CreatePetsMutationRequest
pathParams: never
queryParams: never
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Query/> > showPetById 1`] = `
"type ShowPetByIdClient = typeof client<ShowPetByIdQueryResponse, ShowPetByIdError, never>
"type ShowPetByIdClient = typeof client<ShowPetByIdQueryResponse, never, never>
type ShowPetById = {
data: ShowPetByIdQueryResponse
error: ShowPetByIdError
error: never
request: never
pathParams: ShowPetByIdPathParams
queryParams: never
Expand Down
Loading

0 comments on commit 02446cc

Please sign in to comment.