Skip to content

Commit 28cac39

Browse files
authored
fix: meta file gets information from package.json (#121)
1 parent e339701 commit 28cac39

19 files changed

+43
-42
lines changed

src/meta.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export const Name = "@himenon/openapi-typescript-code-generator";
2-
export const Version = "0.26.1";
1+
import pkgJson from "../package.json" with { type: "json" };
2+
export const Name = pkgJson.name;
3+
export const Version = pkgJson.version;

test/__tests__/class/__snapshots__/argo-rollout-test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Argo Rollout client.ts 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.0
88
//

test/__tests__/class/__snapshots__/format.domain.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Format Types format.domain 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//

test/__tests__/class/__snapshots__/kubernetes-test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Kubernetes client-v1.18.5.ts 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.0
88
//

test/__tests__/class/__snapshots__/multi-type.test.domain.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Multi Type apiClient 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.1
88
//
@@ -101,7 +101,7 @@ export class Client<RequestOption> {
101101
102102
exports[`Multi Type types 1`] = `
103103
"//
104-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
104+
// Generated by @himenon/openapi-typescript-code-generator
105105
//
106106
// OpenApi : 3.0.1
107107
//

test/__tests__/class/__snapshots__/spit-code-test.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Split Code apiClient 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//
@@ -287,7 +287,7 @@ export class Client<RequestOption> {
287287
288288
exports[`Split Code types 1`] = `
289289
"//
290-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
290+
// Generated by @himenon/openapi-typescript-code-generator
291291
//
292292
// OpenApi : 3.1.0
293293
//

test/__tests__/class/__snapshots__/template-only-test.ts.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Template Only api.test.domain 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//
@@ -192,7 +192,7 @@ export class Client<RequestOption> {
192192
193193
exports[`Template Only async-api.test.domain 1`] = `
194194
"//
195-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
195+
// Generated by @himenon/openapi-typescript-code-generator
196196
//
197197
// OpenApi : 3.1.0
198198
//
@@ -382,7 +382,7 @@ export class Client<RequestOption> {
382382
383383
exports[`Template Only infer.domain 1`] = `
384384
"//
385-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
385+
// Generated by @himenon/openapi-typescript-code-generator
386386
//
387387
// OpenApi : 3.1.0
388388
//

test/__tests__/class/__snapshots__/typedef-only-test.ts.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Typedef only Reference test that include nested properties 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.0
88
//
@@ -36,7 +36,7 @@ export namespace Schemas {
3636

3737
exports[`Typedef only typedef-api.test.domain 1`] = `
3838
"//
39-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
39+
// Generated by @himenon/openapi-typescript-code-generator
4040
//
4141
// OpenApi : 3.1.0
4242
//
@@ -336,7 +336,7 @@ export namespace RequestBodies {
336336

337337
exports[`Typedef only typedef-infer.domain 1`] = `
338338
"//
339-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
339+
// Generated by @himenon/openapi-typescript-code-generator
340340
//
341341
// OpenApi : 3.1.0
342342
//

test/__tests__/class/__snapshots__/typedef-with-template-test.ts.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Typedef with template api.test.domain 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//
@@ -541,7 +541,7 @@ export class Client<RequestOption> {
541541
542542
exports[`Typedef with template api.v2.domain 1`] = `
543543
"//
544-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
544+
// Generated by @himenon/openapi-typescript-code-generator
545545
//
546546
// OpenApi : 3.1.0
547547
//
@@ -653,7 +653,7 @@ export class Client<RequestOption> {
653653
654654
exports[`Typedef with template async-api.test.domain 1`] = `
655655
"//
656-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
656+
// Generated by @himenon/openapi-typescript-code-generator
657657
//
658658
// OpenApi : 3.1.0
659659
//
@@ -1192,7 +1192,7 @@ export class Client<RequestOption> {
11921192
11931193
exports[`Typedef with template infer.domain 1`] = `
11941194
"//
1195-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
1195+
// Generated by @himenon/openapi-typescript-code-generator
11961196
//
11971197
// OpenApi : 3.1.0
11981198
//
@@ -1264,7 +1264,7 @@ export class Client<RequestOption> {
12641264
12651265
exports[`Typedef with template ref-access 1`] = `
12661266
"//
1267-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
1267+
// Generated by @himenon/openapi-typescript-code-generator
12681268
//
12691269
// OpenApi : 3.1.0
12701270
//
@@ -1545,7 +1545,7 @@ export class Client<RequestOption> {
15451545
15461546
exports[`Typedef with template remote-ref-access 1`] = `
15471547
"//
1548-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
1548+
// Generated by @himenon/openapi-typescript-code-generator
15491549
//
15501550
// OpenApi : 3.1.0
15511551
//

test/__tests__/class/__snapshots__/unknown-schema-domain-test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Unknown client.ts 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//

test/__tests__/functional/__snapshots__/argo-rollout-test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Argo Rollout client.ts 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.0
88
//

test/__tests__/functional/__snapshots__/format.domain.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Format Types format.domain 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//

test/__tests__/functional/__snapshots__/kubernetes-test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Kubernetes client-v1.18.5.ts 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.0
88
//

test/__tests__/functional/__snapshots__/multi-type.test.domain.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Multi Type apiClient 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.1
88
//
@@ -104,7 +104,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
104104
105105
exports[`Multi Type types 1`] = `
106106
"//
107-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
107+
// Generated by @himenon/openapi-typescript-code-generator
108108
//
109109
// OpenApi : 3.0.1
110110
//

test/__tests__/functional/__snapshots__/spit-code-test.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Split Code apiClient 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//
@@ -290,7 +290,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
290290
291291
exports[`Split Code types 1`] = `
292292
"//
293-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
293+
// Generated by @himenon/openapi-typescript-code-generator
294294
//
295295
// OpenApi : 3.1.0
296296
//

test/__tests__/functional/__snapshots__/template-only-test.ts.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Template Only api.test.domain 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//
@@ -195,7 +195,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
195195
196196
exports[`Template Only async-api.test.domain 1`] = `
197197
"//
198-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
198+
// Generated by @himenon/openapi-typescript-code-generator
199199
//
200200
// OpenApi : 3.1.0
201201
//
@@ -388,7 +388,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
388388
389389
exports[`Template Only infer.domain 1`] = `
390390
"//
391-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
391+
// Generated by @himenon/openapi-typescript-code-generator
392392
//
393393
// OpenApi : 3.1.0
394394
//

test/__tests__/functional/__snapshots__/typedef-only-test.ts.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Typedef only Reference test that include nested properties 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.0.0
88
//
@@ -36,7 +36,7 @@ export namespace Schemas {
3636

3737
exports[`Typedef only typedef-api.test.domain 1`] = `
3838
"//
39-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
39+
// Generated by @himenon/openapi-typescript-code-generator
4040
//
4141
// OpenApi : 3.1.0
4242
//
@@ -336,7 +336,7 @@ export namespace RequestBodies {
336336

337337
exports[`Typedef only typedef-infer.domain 1`] = `
338338
"//
339-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
339+
// Generated by @himenon/openapi-typescript-code-generator
340340
//
341341
// OpenApi : 3.1.0
342342
//

test/__tests__/functional/__snapshots__/typedef-with-template-test.ts.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Typedef with template api.test.domain 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//
@@ -544,7 +544,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
544544
545545
exports[`Typedef with template api.v2.domain 1`] = `
546546
"//
547-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
547+
// Generated by @himenon/openapi-typescript-code-generator
548548
//
549549
// OpenApi : 3.1.0
550550
//
@@ -659,7 +659,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
659659
660660
exports[`Typedef with template async-api.test.domain 1`] = `
661661
"//
662-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
662+
// Generated by @himenon/openapi-typescript-code-generator
663663
//
664664
// OpenApi : 3.1.0
665665
//
@@ -1201,7 +1201,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
12011201
12021202
exports[`Typedef with template infer.domain 1`] = `
12031203
"//
1204-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
1204+
// Generated by @himenon/openapi-typescript-code-generator
12051205
//
12061206
// OpenApi : 3.1.0
12071207
//
@@ -1275,7 +1275,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
12751275
12761276
exports[`Typedef with template ref-access 1`] = `
12771277
"//
1278-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
1278+
// Generated by @himenon/openapi-typescript-code-generator
12791279
//
12801280
// OpenApi : 3.1.0
12811281
//
@@ -1559,7 +1559,7 @@ export type Client<RequestOption> = ReturnType<ClientFunction<RequestOption>>;
15591559
15601560
exports[`Typedef with template remote-ref-access 1`] = `
15611561
"//
1562-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
1562+
// Generated by @himenon/openapi-typescript-code-generator
15631563
//
15641564
// OpenApi : 3.1.0
15651565
//

test/__tests__/functional/__snapshots__/unknown-schema-domain-test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Unknown client.ts 1`] = `
44
"//
5-
// Generated by @himenon/openapi-typescript-code-generator v0.26.1
5+
// Generated by @himenon/openapi-typescript-code-generator
66
//
77
// OpenApi : 3.1.0
88
//

0 commit comments

Comments
 (0)