Skip to content

Commit 5169320

Browse files
committed
update samples
1 parent f680e4c commit 5169320

File tree

49 files changed

+125
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+125
-165
lines changed

samples/basic/api/endpoints/petstoreFromFileSpecWithConfig.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ import axios from 'axios';
88
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
99

1010
export type PetCallingCode =
11-
(typeof PetCallingCode)[keyof typeof PetCallingCode];
11+
(typeof PetCallingCodeConsts)[keyof typeof PetCallingCodeConsts];
1212

13-
// eslint-disable-next-line @typescript-eslint/no-redeclare
14-
export const PetCallingCode = {
13+
export const PetCallingCodeConsts = {
1514
'+33': '+33',
1615
'+420': '+420',
1716
} as const;
1817

19-
export type PetCountry = (typeof PetCountry)[keyof typeof PetCountry];
18+
export type PetCountry =
19+
(typeof PetCountryConsts)[keyof typeof PetCountryConsts];
2020

21-
// eslint-disable-next-line @typescript-eslint/no-redeclare
22-
export const PetCountry = {
21+
export const PetCountryConsts = {
2322
"People's_Republic_of_China": "People's Republic of China",
2423
Uruguay: 'Uruguay',
2524
} as const;

samples/basic/api/model/petCallingCode.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
*/
77

88
export type PetCallingCode =
9-
(typeof PetCallingCode)[keyof typeof PetCallingCode];
9+
(typeof PetCallingCodeConsts)[keyof typeof PetCallingCodeConsts];
1010

11-
// eslint-disable-next-line @typescript-eslint/no-redeclare
12-
export const PetCallingCode = {
11+
export const PetCallingCodeConsts = {
1312
'+33': '+33',
1413
'+420': '+420',
1514
} as const;

samples/basic/api/model/petCountry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
* OpenAPI spec version: 1.0.0
66
*/
77

8-
export type PetCountry = (typeof PetCountry)[keyof typeof PetCountry];
8+
export type PetCountry =
9+
(typeof PetCountryConsts)[keyof typeof PetCountryConsts];
910

10-
// eslint-disable-next-line @typescript-eslint/no-redeclare
11-
export const PetCountry = {
11+
export const PetCountryConsts = {
1212
"People's_Republic_of_China": "People's Republic of China",
1313
Uruguay: 'Uruguay',
1414
} as const;

samples/hono/hono-with-zod/src/petstore.schemas.ts

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@
55
* OpenAPI spec version: 1.0.0
66
*/
77
export type PetCallingCode =
8-
(typeof PetCallingCode)[keyof typeof PetCallingCode];
8+
(typeof PetCallingCodeConsts)[keyof typeof PetCallingCodeConsts];
99

10-
// eslint-disable-next-line @typescript-eslint/no-redeclare
11-
export const PetCallingCode = {
10+
export const PetCallingCodeConsts = {
1211
'+33': '+33',
1312
'+420': '+420',
1413
} as const;
1514

16-
export type PetCountry = (typeof PetCountry)[keyof typeof PetCountry];
15+
export type PetCountry =
16+
(typeof PetCountryConsts)[keyof typeof PetCountryConsts];
1717

18-
// eslint-disable-next-line @typescript-eslint/no-redeclare
19-
export const PetCountry = {
18+
export const PetCountryConsts = {
2019
"People's_Republic_of_China": "People's Republic of China",
2120
Uruguay: 'Uruguay',
2221
} as const;
@@ -41,10 +40,9 @@ export type Pet =
4140
country?: PetCountry;
4241
});
4342

44-
export type DogType = (typeof DogType)[keyof typeof DogType];
43+
export type DogType = (typeof DogTypeConsts)[keyof typeof DogTypeConsts];
4544

46-
// eslint-disable-next-line @typescript-eslint/no-redeclare
47-
export const DogType = {
45+
export const DogTypeConsts = {
4846
dog: 'dog',
4947
} as const;
5048

@@ -59,10 +57,9 @@ export type Dog =
5957
});
6058

6159
export type LabradoodleBreed =
62-
(typeof LabradoodleBreed)[keyof typeof LabradoodleBreed];
60+
(typeof LabradoodleBreedConsts)[keyof typeof LabradoodleBreedConsts];
6361

64-
// eslint-disable-next-line @typescript-eslint/no-redeclare
65-
export const LabradoodleBreed = {
62+
export const LabradoodleBreedConsts = {
6663
Labradoodle: 'Labradoodle',
6764
} as const;
6865

@@ -72,10 +69,9 @@ export interface Labradoodle {
7269
}
7370

7471
export type DachshundBreed =
75-
(typeof DachshundBreed)[keyof typeof DachshundBreed];
72+
(typeof DachshundBreedConsts)[keyof typeof DachshundBreedConsts];
7673

77-
// eslint-disable-next-line @typescript-eslint/no-redeclare
78-
export const DachshundBreed = {
74+
export const DachshundBreedConsts = {
7975
Dachshund: 'Dachshund',
8076
} as const;
8177

@@ -84,10 +80,9 @@ export interface Dachshund {
8480
breed: DachshundBreed;
8581
}
8682

87-
export type CatType = (typeof CatType)[keyof typeof CatType];
83+
export type CatType = (typeof CatTypeConsts)[keyof typeof CatTypeConsts];
8884

89-
// eslint-disable-next-line @typescript-eslint/no-redeclare
90-
export const CatType = {
85+
export const CatTypeConsts = {
9186
cat: 'cat',
9287
} as const;
9388

samples/mcp/petstore/src/http-schemas/orderStatus.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Some useful links:
1616
/**
1717
* Order Status
1818
*/
19-
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
19+
export type OrderStatus =
20+
(typeof OrderStatusConsts)[keyof typeof OrderStatusConsts];
2021

21-
// eslint-disable-next-line @typescript-eslint/no-redeclare
22-
export const OrderStatus = {
22+
export const OrderStatusConsts = {
2323
placed: 'placed',
2424
approved: 'approved',
2525
delivered: 'delivered',

samples/mcp/petstore/src/http-schemas/petStatus.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ Some useful links:
1616
/**
1717
* pet status in the store
1818
*/
19-
export type PetStatus = (typeof PetStatus)[keyof typeof PetStatus];
19+
export type PetStatus = (typeof PetStatusConsts)[keyof typeof PetStatusConsts];
2020

21-
// eslint-disable-next-line @typescript-eslint/no-redeclare
22-
export const PetStatus = {
21+
export const PetStatusConsts = {
2322
available: 'available',
2423
pending: 'pending',
2524
sold: 'sold',

samples/next-app-with-fetch/app/gen/models/catType.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
* OpenAPI spec version: 1.0.0
66
*/
77

8-
export type CatType = (typeof CatType)[keyof typeof CatType];
8+
export type CatType = (typeof CatTypeConsts)[keyof typeof CatTypeConsts];
99

10-
// eslint-disable-next-line @typescript-eslint/no-redeclare
11-
export const CatType = {
10+
export const CatTypeConsts = {
1211
cat: 'cat',
1312
} as const;

samples/next-app-with-fetch/app/gen/models/dachshundBreed.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
*/
77

88
export type DachshundBreed =
9-
(typeof DachshundBreed)[keyof typeof DachshundBreed];
9+
(typeof DachshundBreedConsts)[keyof typeof DachshundBreedConsts];
1010

11-
// eslint-disable-next-line @typescript-eslint/no-redeclare
12-
export const DachshundBreed = {
11+
export const DachshundBreedConsts = {
1312
Dachshund: 'Dachshund',
1413
} as const;

samples/next-app-with-fetch/app/gen/models/dogType.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
* OpenAPI spec version: 1.0.0
66
*/
77

8-
export type DogType = (typeof DogType)[keyof typeof DogType];
8+
export type DogType = (typeof DogTypeConsts)[keyof typeof DogTypeConsts];
99

10-
// eslint-disable-next-line @typescript-eslint/no-redeclare
11-
export const DogType = {
10+
export const DogTypeConsts = {
1211
dog: 'dog',
1312
} as const;

samples/next-app-with-fetch/app/gen/models/labradoodleBreed.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
*/
77

88
export type LabradoodleBreed =
9-
(typeof LabradoodleBreed)[keyof typeof LabradoodleBreed];
9+
(typeof LabradoodleBreedConsts)[keyof typeof LabradoodleBreedConsts];
1010

11-
// eslint-disable-next-line @typescript-eslint/no-redeclare
12-
export const LabradoodleBreed = {
11+
export const LabradoodleBreedConsts = {
1312
Labradoodle: 'Labradoodle',
1413
} as const;

0 commit comments

Comments
 (0)