diff --git a/src/meta.ts b/src/meta.ts index 777f9b8d..97f78f3f 100644 --- a/src/meta.ts +++ b/src/meta.ts @@ -1,2 +1,3 @@ -export const Name = "@himenon/openapi-typescript-code-generator"; -export const Version = "0.26.1"; +import pkgJson from "../package.json" with { type: "json" }; +export const Name = pkgJson.name; +export const Version = pkgJson.version; diff --git a/test/__tests__/class/__snapshots__/argo-rollout-test.ts.snap b/test/__tests__/class/__snapshots__/argo-rollout-test.ts.snap index e21a3a07..1c1e9ec8 100644 --- a/test/__tests__/class/__snapshots__/argo-rollout-test.ts.snap +++ b/test/__tests__/class/__snapshots__/argo-rollout-test.ts.snap @@ -2,7 +2,7 @@ exports[`Argo Rollout client.ts 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.0 // diff --git a/test/__tests__/class/__snapshots__/format.domain.ts.snap b/test/__tests__/class/__snapshots__/format.domain.ts.snap index edbce925..833e5487 100644 --- a/test/__tests__/class/__snapshots__/format.domain.ts.snap +++ b/test/__tests__/class/__snapshots__/format.domain.ts.snap @@ -2,7 +2,7 @@ exports[`Format Types format.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/class/__snapshots__/kubernetes-test.ts.snap b/test/__tests__/class/__snapshots__/kubernetes-test.ts.snap index 4531a41b..852902a0 100644 --- a/test/__tests__/class/__snapshots__/kubernetes-test.ts.snap +++ b/test/__tests__/class/__snapshots__/kubernetes-test.ts.snap @@ -2,7 +2,7 @@ exports[`Kubernetes client-v1.18.5.ts 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.0 // diff --git a/test/__tests__/class/__snapshots__/multi-type.test.domain.ts.snap b/test/__tests__/class/__snapshots__/multi-type.test.domain.ts.snap index 4ae3b8b9..1280b2ec 100644 --- a/test/__tests__/class/__snapshots__/multi-type.test.domain.ts.snap +++ b/test/__tests__/class/__snapshots__/multi-type.test.domain.ts.snap @@ -2,7 +2,7 @@ exports[`Multi Type apiClient 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.1 // @@ -101,7 +101,7 @@ export class Client { exports[`Multi Type types 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.1 // diff --git a/test/__tests__/class/__snapshots__/spit-code-test.ts.snap b/test/__tests__/class/__snapshots__/spit-code-test.ts.snap index f61e4ef0..14afe8b6 100644 --- a/test/__tests__/class/__snapshots__/spit-code-test.ts.snap +++ b/test/__tests__/class/__snapshots__/spit-code-test.ts.snap @@ -2,7 +2,7 @@ exports[`Split Code apiClient 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -287,7 +287,7 @@ export class Client { exports[`Split Code types 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/class/__snapshots__/template-only-test.ts.snap b/test/__tests__/class/__snapshots__/template-only-test.ts.snap index 163f0565..d310d5bc 100644 --- a/test/__tests__/class/__snapshots__/template-only-test.ts.snap +++ b/test/__tests__/class/__snapshots__/template-only-test.ts.snap @@ -2,7 +2,7 @@ exports[`Template Only api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -192,7 +192,7 @@ export class Client { exports[`Template Only async-api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -382,7 +382,7 @@ export class Client { exports[`Template Only infer.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/class/__snapshots__/typedef-only-test.ts.snap b/test/__tests__/class/__snapshots__/typedef-only-test.ts.snap index 65b131f4..eeb84a0d 100644 --- a/test/__tests__/class/__snapshots__/typedef-only-test.ts.snap +++ b/test/__tests__/class/__snapshots__/typedef-only-test.ts.snap @@ -2,7 +2,7 @@ exports[`Typedef only Reference test that include nested properties 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.0 // @@ -36,7 +36,7 @@ export namespace Schemas { exports[`Typedef only typedef-api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -336,7 +336,7 @@ export namespace RequestBodies { exports[`Typedef only typedef-infer.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/class/__snapshots__/typedef-with-template-test.ts.snap b/test/__tests__/class/__snapshots__/typedef-with-template-test.ts.snap index 365b9545..34a12452 100644 --- a/test/__tests__/class/__snapshots__/typedef-with-template-test.ts.snap +++ b/test/__tests__/class/__snapshots__/typedef-with-template-test.ts.snap @@ -2,7 +2,7 @@ exports[`Typedef with template api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -541,7 +541,7 @@ export class Client { exports[`Typedef with template api.v2.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -653,7 +653,7 @@ export class Client { exports[`Typedef with template async-api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -1192,7 +1192,7 @@ export class Client { exports[`Typedef with template infer.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -1264,7 +1264,7 @@ export class Client { exports[`Typedef with template ref-access 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -1545,7 +1545,7 @@ export class Client { exports[`Typedef with template remote-ref-access 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/class/__snapshots__/unknown-schema-domain-test.ts.snap b/test/__tests__/class/__snapshots__/unknown-schema-domain-test.ts.snap index affe9355..1563144d 100644 --- a/test/__tests__/class/__snapshots__/unknown-schema-domain-test.ts.snap +++ b/test/__tests__/class/__snapshots__/unknown-schema-domain-test.ts.snap @@ -2,7 +2,7 @@ exports[`Unknown client.ts 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/functional/__snapshots__/argo-rollout-test.ts.snap b/test/__tests__/functional/__snapshots__/argo-rollout-test.ts.snap index b0b32930..e409a020 100644 --- a/test/__tests__/functional/__snapshots__/argo-rollout-test.ts.snap +++ b/test/__tests__/functional/__snapshots__/argo-rollout-test.ts.snap @@ -2,7 +2,7 @@ exports[`Argo Rollout client.ts 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.0 // diff --git a/test/__tests__/functional/__snapshots__/format.domain.ts.snap b/test/__tests__/functional/__snapshots__/format.domain.ts.snap index 0360083b..a90dd4cc 100644 --- a/test/__tests__/functional/__snapshots__/format.domain.ts.snap +++ b/test/__tests__/functional/__snapshots__/format.domain.ts.snap @@ -2,7 +2,7 @@ exports[`Format Types format.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/functional/__snapshots__/kubernetes-test.ts.snap b/test/__tests__/functional/__snapshots__/kubernetes-test.ts.snap index 1928340d..2ec7f7bd 100644 --- a/test/__tests__/functional/__snapshots__/kubernetes-test.ts.snap +++ b/test/__tests__/functional/__snapshots__/kubernetes-test.ts.snap @@ -2,7 +2,7 @@ exports[`Kubernetes client-v1.18.5.ts 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.0 // diff --git a/test/__tests__/functional/__snapshots__/multi-type.test.domain.ts.snap b/test/__tests__/functional/__snapshots__/multi-type.test.domain.ts.snap index de750320..d22eaa04 100644 --- a/test/__tests__/functional/__snapshots__/multi-type.test.domain.ts.snap +++ b/test/__tests__/functional/__snapshots__/multi-type.test.domain.ts.snap @@ -2,7 +2,7 @@ exports[`Multi Type apiClient 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.1 // @@ -104,7 +104,7 @@ export type Client = ReturnType>; exports[`Multi Type types 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.1 // diff --git a/test/__tests__/functional/__snapshots__/spit-code-test.ts.snap b/test/__tests__/functional/__snapshots__/spit-code-test.ts.snap index 0ec710d3..4a9dcd39 100644 --- a/test/__tests__/functional/__snapshots__/spit-code-test.ts.snap +++ b/test/__tests__/functional/__snapshots__/spit-code-test.ts.snap @@ -2,7 +2,7 @@ exports[`Split Code apiClient 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -290,7 +290,7 @@ export type Client = ReturnType>; exports[`Split Code types 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/functional/__snapshots__/template-only-test.ts.snap b/test/__tests__/functional/__snapshots__/template-only-test.ts.snap index f609ab00..8bc9d1ce 100644 --- a/test/__tests__/functional/__snapshots__/template-only-test.ts.snap +++ b/test/__tests__/functional/__snapshots__/template-only-test.ts.snap @@ -2,7 +2,7 @@ exports[`Template Only api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -195,7 +195,7 @@ export type Client = ReturnType>; exports[`Template Only async-api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -388,7 +388,7 @@ export type Client = ReturnType>; exports[`Template Only infer.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/functional/__snapshots__/typedef-only-test.ts.snap b/test/__tests__/functional/__snapshots__/typedef-only-test.ts.snap index 65b131f4..eeb84a0d 100644 --- a/test/__tests__/functional/__snapshots__/typedef-only-test.ts.snap +++ b/test/__tests__/functional/__snapshots__/typedef-only-test.ts.snap @@ -2,7 +2,7 @@ exports[`Typedef only Reference test that include nested properties 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.0.0 // @@ -36,7 +36,7 @@ export namespace Schemas { exports[`Typedef only typedef-api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -336,7 +336,7 @@ export namespace RequestBodies { exports[`Typedef only typedef-infer.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/functional/__snapshots__/typedef-with-template-test.ts.snap b/test/__tests__/functional/__snapshots__/typedef-with-template-test.ts.snap index d4a70e12..7eded101 100644 --- a/test/__tests__/functional/__snapshots__/typedef-with-template-test.ts.snap +++ b/test/__tests__/functional/__snapshots__/typedef-with-template-test.ts.snap @@ -2,7 +2,7 @@ exports[`Typedef with template api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -544,7 +544,7 @@ export type Client = ReturnType>; exports[`Typedef with template api.v2.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -659,7 +659,7 @@ export type Client = ReturnType>; exports[`Typedef with template async-api.test.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -1201,7 +1201,7 @@ export type Client = ReturnType>; exports[`Typedef with template infer.domain 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -1275,7 +1275,7 @@ export type Client = ReturnType>; exports[`Typedef with template ref-access 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // @@ -1559,7 +1559,7 @@ export type Client = ReturnType>; exports[`Typedef with template remote-ref-access 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 // diff --git a/test/__tests__/functional/__snapshots__/unknown-schema-domain-test.ts.snap b/test/__tests__/functional/__snapshots__/unknown-schema-domain-test.ts.snap index a852b578..90738869 100644 --- a/test/__tests__/functional/__snapshots__/unknown-schema-domain-test.ts.snap +++ b/test/__tests__/functional/__snapshots__/unknown-schema-domain-test.ts.snap @@ -2,7 +2,7 @@ exports[`Unknown client.ts 1`] = ` "// -// Generated by @himenon/openapi-typescript-code-generator v0.26.1 +// Generated by @himenon/openapi-typescript-code-generator // // OpenApi : 3.1.0 //