File tree Expand file tree Collapse file tree 22 files changed +1092
-200
lines changed
enum-inline-typescript-namespace
enum-inline-typescript-namespace
plugins/@hey-api/typescript Expand file tree Collapse file tree 22 files changed +1092
-200
lines changed Original file line number Diff line number Diff line change 1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
+ export type Foo = {
4
+ type ?: Type ;
5
+ } ;
6
+
3
7
export type Type = 'foo' | 'bar' ;
4
8
5
9
export const Type = {
6
10
FOO : 'foo' ,
7
11
BAR : 'bar'
8
12
} as const ;
9
13
10
- export type Foo = {
11
- type ?: 'foo' | 'bar' ;
12
- } ;
13
-
14
14
export type ClientOptions = {
15
15
baseUrl : `${string } ://${string } ` | ( string & { } ) ;
16
16
} ;
Original file line number Diff line number Diff line change 1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
- export namespace Foo {
4
- export enum Type {
5
- FOO = 'foo' ,
6
- BAR = 'bar'
7
- }
8
- }
9
-
10
3
export type Foo = {
11
- type ?: 'foo' | 'bar' ;
4
+ type ?: Type ;
12
5
} ;
13
6
7
+ export enum Type {
8
+ FOO = 'foo' ,
9
+ BAR = 'bar'
10
+ }
11
+
14
12
export type ClientOptions = {
15
13
baseUrl : `${string } ://${string } ` | ( string & { } ) ;
16
14
} ;
Original file line number Diff line number Diff line change 1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
+ export type Foo = {
4
+ type ?: Type ;
5
+ } ;
6
+
3
7
export enum Type {
4
8
FOO = 'foo' ,
5
9
BAR = 'bar'
6
10
}
7
11
8
- export type Foo = {
9
- type ?: 'foo' | 'bar' ;
10
- } ;
11
-
12
12
export type ClientOptions = {
13
13
baseUrl : `${string } ://${string } ` | ( string & { } ) ;
14
14
} ;
Original file line number Diff line number Diff line change 1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
3
export type Foo = {
4
- type ?: 'foo' | 'bar' ;
4
+ type ?: Type ;
5
5
} ;
6
6
7
+ export type Type = 'foo' | 'bar' ;
8
+
7
9
export type ClientOptions = {
8
10
baseUrl : `${string } ://${string } ` | ( string & { } ) ;
9
11
} ;
Original file line number Diff line number Diff line change 1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
+ export type Foo = {
4
+ type ?: Type ;
5
+ } ;
6
+
7
+ export type Bar = {
8
+ type ?: Baz ;
9
+ } ;
10
+
11
+ export type Baz = 'qux' | 'quux' ;
12
+
13
+ export const Baz = {
14
+ QUX : 'qux' ,
15
+ QUUX : 'quux'
16
+ } as const ;
17
+
3
18
export type Type = 'foo' | 'bar' ;
4
19
5
20
export const Type = {
6
21
FOO : 'foo' ,
7
22
BAR : 'bar'
8
23
} as const ;
9
24
10
- export type Foo = {
11
- type ?: 'foo' | 'bar' ;
12
- } ;
25
+ export type Foo2 = 'foo' | 'bar' ;
26
+
27
+ export const Foo = {
28
+ FOO : 'foo' ,
29
+ BAR : 'bar'
30
+ } as const ;
31
+
32
+ export type Foo1 = 'baz' ;
33
+
34
+ export const Foo1 = {
35
+ BAZ : 'baz'
36
+ } as const ;
13
37
14
38
export type GetFooData = {
15
39
body ?: never ;
@@ -18,19 +42,12 @@ export type GetFooData = {
18
42
url : '/foo' ;
19
43
} ;
20
44
21
- export type Foo2 = 'foo' | 'bar' ;
22
-
23
- export const Foo = {
24
- FOO : 'foo' ,
25
- BAR : 'bar'
26
- } as const ;
27
-
28
45
export type GetFooResponses = {
29
46
/**
30
47
* OK
31
48
*/
32
49
200 : {
33
- foo ?: 'foo' | 'bar' ;
50
+ foo ?: Foo2 ;
34
51
} ;
35
52
} ;
36
53
@@ -43,23 +60,33 @@ export type PostFooData = {
43
60
url : '/foo' ;
44
61
} ;
45
62
46
- export type Foo3 = 'baz' ;
47
-
48
- export const Foo2 = {
49
- BAZ : 'baz'
50
- } as const ;
51
-
52
63
export type PostFooResponses = {
53
64
/**
54
65
* OK
55
66
*/
56
67
200 : {
57
- foo ?: 'baz' ;
68
+ foo ?: Foo1 ;
58
69
} ;
59
70
} ;
60
71
61
72
export type PostFooResponse = PostFooResponses [ keyof PostFooResponses ] ;
62
73
74
+ export type PutFooData = {
75
+ body ?: never ;
76
+ path ?: never ;
77
+ query ?: never ;
78
+ url : '/foo' ;
79
+ } ;
80
+
81
+ export type PutFooResponses = {
82
+ /**
83
+ * OK
84
+ */
85
+ 200 : Baz ;
86
+ } ;
87
+
88
+ export type PutFooResponse = PutFooResponses [ keyof PutFooResponses ] ;
89
+
63
90
export type ClientOptions = {
64
91
baseUrl : `${string } ://${string } ` | ( string & { } ) ;
65
92
} ;
Original file line number Diff line number Diff line change 1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
- export namespace Foo {
4
- export enum Type {
5
- FOO = 'foo' ,
6
- BAR = 'bar'
7
- }
8
- }
9
-
10
3
export type Foo = {
11
- type ?: 'foo' | 'bar' ;
4
+ type ?: Type ;
5
+ } ;
6
+
7
+ export type Bar = {
8
+ type ?: Baz ;
12
9
} ;
13
10
11
+ export enum Baz {
12
+ QUX = 'qux' ,
13
+ QUUX = 'quux'
14
+ }
15
+
16
+ export enum Type {
17
+ FOO = 'foo' ,
18
+ BAR = 'bar'
19
+ }
20
+
21
+ export enum Foo2 {
22
+ FOO = 'foo' ,
23
+ BAR = 'bar'
24
+ }
25
+
26
+ export enum Foo1 {
27
+ BAZ = 'baz'
28
+ }
29
+
14
30
export type GetFooData = {
15
31
body ?: never ;
16
32
path ?: never ;
@@ -23,7 +39,7 @@ export type GetFooResponses = {
23
39
* OK
24
40
*/
25
41
200 : {
26
- foo ?: 'foo' | 'bar' ;
42
+ foo ?: Foo2 ;
27
43
} ;
28
44
} ;
29
45
@@ -41,12 +57,28 @@ export type PostFooResponses = {
41
57
* OK
42
58
*/
43
59
200 : {
44
- foo ?: 'baz' ;
60
+ foo ?: Foo1 ;
45
61
} ;
46
62
} ;
47
63
48
64
export type PostFooResponse = PostFooResponses [ keyof PostFooResponses ] ;
49
65
66
+ export type PutFooData = {
67
+ body ?: never ;
68
+ path ?: never ;
69
+ query ?: never ;
70
+ url : '/foo' ;
71
+ } ;
72
+
73
+ export type PutFooResponses = {
74
+ /**
75
+ * OK
76
+ */
77
+ 200 : Baz ;
78
+ } ;
79
+
80
+ export type PutFooResponse = PutFooResponses [ keyof PutFooResponses ] ;
81
+
50
82
export type ClientOptions = {
51
83
baseUrl : `${string } ://${string } ` | ( string & { } ) ;
52
84
} ;
Original file line number Diff line number Diff line change 1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
+ export type Foo = {
4
+ type ?: Type ;
5
+ } ;
6
+
7
+ export type Bar = {
8
+ type ?: Baz ;
9
+ } ;
10
+
11
+ export enum Baz {
12
+ QUX = 'qux' ,
13
+ QUUX = 'quux'
14
+ }
15
+
3
16
export enum Type {
4
17
FOO = 'foo' ,
5
18
BAR = 'bar'
6
19
}
7
20
8
- export type Foo = {
9
- type ?: 'foo' | 'bar' ;
10
- } ;
21
+ export enum Foo2 {
22
+ FOO = 'foo' ,
23
+ BAR = 'bar'
24
+ }
25
+
26
+ export enum Foo1 {
27
+ BAZ = 'baz'
28
+ }
11
29
12
30
export type GetFooData = {
13
31
body ?: never ;
@@ -16,17 +34,12 @@ export type GetFooData = {
16
34
url : '/foo' ;
17
35
} ;
18
36
19
- export enum Foo2 {
20
- FOO = 'foo' ,
21
- BAR = 'bar'
22
- }
23
-
24
37
export type GetFooResponses = {
25
38
/**
26
39
* OK
27
40
*/
28
41
200 : {
29
- foo ?: 'foo' | 'bar' ;
42
+ foo ?: Foo2 ;
30
43
} ;
31
44
} ;
32
45
@@ -39,21 +52,33 @@ export type PostFooData = {
39
52
url : '/foo' ;
40
53
} ;
41
54
42
- export enum Foo3 {
43
- BAZ = 'baz'
44
- }
45
-
46
55
export type PostFooResponses = {
47
56
/**
48
57
* OK
49
58
*/
50
59
200 : {
51
- foo ?: 'baz' ;
60
+ foo ?: Foo1 ;
52
61
} ;
53
62
} ;
54
63
55
64
export type PostFooResponse = PostFooResponses [ keyof PostFooResponses ] ;
56
65
66
+ export type PutFooData = {
67
+ body ?: never ;
68
+ path ?: never ;
69
+ query ?: never ;
70
+ url : '/foo' ;
71
+ } ;
72
+
73
+ export type PutFooResponses = {
74
+ /**
75
+ * OK
76
+ */
77
+ 200 : Baz ;
78
+ } ;
79
+
80
+ export type PutFooResponse = PutFooResponses [ keyof PutFooResponses ] ;
81
+
57
82
export type ClientOptions = {
58
83
baseUrl : `${string } ://${string } ` | ( string & { } ) ;
59
84
} ;
You can’t perform that action at this time.
0 commit comments