Skip to content

Commit 0672079

Browse files
committed
chore: latest
1 parent 214f037 commit 0672079

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

__tests__/fixtures/petstore/methods.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2022-10-29T11:20:35.437Z
6+
* Generated on 2022-10-29T14:54:27.697Z
77
*
88
*/
99
import type {
1010
RequestMethodCaller,
1111
FindPetsQuery,
1212
Pet,
13-
Error,
1413
NewPet,
1514
} from './models.js';
1615
import type { Simplify } from 'type-fest';
@@ -42,11 +41,10 @@ import type { Simplify } from 'type-fest';
4241
* @param parameters.query.tags? {String} tags to filter by
4342
* @param parameters.query.limit? {String} maximum number of results to return
4443
* @returns {RequestMethodCaller<Pet[]>} HTTP 200
45-
* @returns {RequestMethodCaller<Error>} HTTP default
4644
*/
4745
export function findPets(parameters?: {
4846
query?: FindPetsQuery;
49-
}): RequestMethodCaller<Error> {
47+
}): RequestMethodCaller<Pet[]> {
5048
const req = {
5149
method: 'get' as const,
5250
pathname: `/pets`,
@@ -59,11 +57,10 @@ export function findPets(parameters?: {
5957
* Creates a new pet in the store. Duplicates are allowed
6058
* @param parameters.body {NewPet}
6159
* @returns {RequestMethodCaller<Pet>} HTTP 200
62-
* @returns {RequestMethodCaller<Error>} HTTP default
6360
*/
6461
export function addPet(parameters: {
6562
body: Simplify<NewPet>;
66-
}): RequestMethodCaller<Error> {
63+
}): RequestMethodCaller<Pet> {
6764
const req = {
6865
method: 'post' as const,
6966
pathname: `/pets`,
@@ -77,9 +74,8 @@ export function addPet(parameters: {
7774
* the pet
7875
* @param id {String} ID of pet to fetch
7976
* @returns {RequestMethodCaller<Pet>} HTTP 200
80-
* @returns {RequestMethodCaller<Error>} HTTP default
8177
*/
82-
export function findPetById(id: string): RequestMethodCaller<Error> {
78+
export function findPetById(id: string): RequestMethodCaller<Pet> {
8379
const req = {
8480
method: 'get' as const,
8581
pathname: `/pets/${id}`,
@@ -91,9 +87,8 @@ export function findPetById(id: string): RequestMethodCaller<Error> {
9187
* deletes a single pet based on the ID supplied
9288
* @param id {String} ID of pet to delete
9389
* @returns {RequestMethodCaller<void>} HTTP 204
94-
* @returns {RequestMethodCaller<Error>} HTTP default
9590
*/
96-
export function deletePet(id: string): RequestMethodCaller<Error> {
91+
export function deletePet(id: string): RequestMethodCaller<void> {
9792
const req = {
9893
method: 'delete' as const,
9994
pathname: `/pets/${id}`,

__tests__/fixtures/petstore/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2022-10-29T10:44:17.417Z
6+
* Generated on 2022-10-29T14:54:27.697Z
77
*
88
*/
99
export type HttpMethod = 'get' | 'post' | 'put' | 'delete' | 'head';

0 commit comments

Comments
 (0)