From b744de296e6d90cc6e115b56333372fe2692e899 Mon Sep 17 00:00:00 2001 From: "K.Himeno" <6715229+Himenon@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:14:00 +0900 Subject: [PATCH 1/2] fix: util --- src/code-templates/_shared/MethodBody/CallRequest.ts | 2 +- src/code-templates/_shared/MethodBody/HeaderParameter.ts | 2 +- src/code-templates/_shared/MethodBody/PathParameter.ts | 2 +- src/code-templates/_shared/MethodBody/QueryParameter.ts | 2 +- .../_shared/MethodBody/__tests__/PathParameter-test.ts | 2 +- src/code-templates/_shared/MethodBody/index.ts | 2 +- src/code-templates/{class-api-client => _shared}/utils.ts | 0 src/meta.ts | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename src/code-templates/{class-api-client => _shared}/utils.ts (100%) diff --git a/src/code-templates/_shared/MethodBody/CallRequest.ts b/src/code-templates/_shared/MethodBody/CallRequest.ts index 7a03b19e..d07a1e63 100644 --- a/src/code-templates/_shared/MethodBody/CallRequest.ts +++ b/src/code-templates/_shared/MethodBody/CallRequest.ts @@ -2,7 +2,7 @@ import ts from "typescript"; import type { TsGenerator } from "../../../api"; import type { CodeGenerator } from "../../../types"; -import * as Utils from "../../class-api-client/utils"; +import * as Utils from "../utils"; import type { MethodType } from "./types"; export interface Params { diff --git a/src/code-templates/_shared/MethodBody/HeaderParameter.ts b/src/code-templates/_shared/MethodBody/HeaderParameter.ts index 0134d75a..f42fb711 100644 --- a/src/code-templates/_shared/MethodBody/HeaderParameter.ts +++ b/src/code-templates/_shared/MethodBody/HeaderParameter.ts @@ -1,7 +1,7 @@ import ts from "typescript"; import type { TsGenerator } from "../../../api"; -import * as Utils from "../../class-api-client/utils"; +import * as Utils from "../utils"; export interface Params { variableName: string; diff --git a/src/code-templates/_shared/MethodBody/PathParameter.ts b/src/code-templates/_shared/MethodBody/PathParameter.ts index 74841828..28a7ec12 100644 --- a/src/code-templates/_shared/MethodBody/PathParameter.ts +++ b/src/code-templates/_shared/MethodBody/PathParameter.ts @@ -2,7 +2,7 @@ import ts from "typescript"; import type { TsGenerator } from "../../../api"; import type { CodeGenerator } from "../../../types"; -import * as Utils from "../../class-api-client/utils"; +import * as Utils from "../utils"; import { escapeText2 as escapeText } from "../../../utils"; import type { MethodType } from "./types"; diff --git a/src/code-templates/_shared/MethodBody/QueryParameter.ts b/src/code-templates/_shared/MethodBody/QueryParameter.ts index f5c52ca1..d8d51b98 100644 --- a/src/code-templates/_shared/MethodBody/QueryParameter.ts +++ b/src/code-templates/_shared/MethodBody/QueryParameter.ts @@ -2,7 +2,7 @@ import ts from "typescript"; import type { TsGenerator } from "../../../api"; import * as Utils from "../../../utils"; -import * as UtilsExtra from "../../class-api-client/utils"; +import * as UtilsExtra from "../utils"; export interface Item { type: "string" | "variable"; diff --git a/src/code-templates/_shared/MethodBody/__tests__/PathParameter-test.ts b/src/code-templates/_shared/MethodBody/__tests__/PathParameter-test.ts index 9aacdd82..d313a7d0 100644 --- a/src/code-templates/_shared/MethodBody/__tests__/PathParameter-test.ts +++ b/src/code-templates/_shared/MethodBody/__tests__/PathParameter-test.ts @@ -4,7 +4,7 @@ import ts from "typescript"; import { TsGenerator } from "../../../../api"; import type { CodeGenerator } from "../../../../types"; -import * as Utils from "../../../class-api-client/utils"; +import * as Utils from "../../utils"; import * as PathParameter from "../PathParameter"; const traverse = diff --git a/src/code-templates/_shared/MethodBody/index.ts b/src/code-templates/_shared/MethodBody/index.ts index 164e3f98..077fd66f 100644 --- a/src/code-templates/_shared/MethodBody/index.ts +++ b/src/code-templates/_shared/MethodBody/index.ts @@ -3,7 +3,7 @@ import ts from "typescript"; import type { TsGenerator } from "../../../api"; import type { CodeGenerator } from "../../../types"; import { escapeText2 as escapeText } from "../../../utils"; -import * as Utils from "../../class-api-client/utils"; +import * as Utils from "../utils"; import * as CallRequest from "./CallRequest"; import * as HeaderParameter from "./HeaderParameter"; import * as PathParameter from "./PathParameter"; diff --git a/src/code-templates/class-api-client/utils.ts b/src/code-templates/_shared/utils.ts similarity index 100% rename from src/code-templates/class-api-client/utils.ts rename to src/code-templates/_shared/utils.ts diff --git a/src/meta.ts b/src/meta.ts index d57631f8..d1511835 100644 --- a/src/meta.ts +++ b/src/meta.ts @@ -1,2 +1,2 @@ export const Name = "@himenon/openapi-typescript-code-generator"; -export const Version = "0.22.2"; \ No newline at end of file +export const Version = "0.22.3"; \ No newline at end of file From 0d4e157b7af9831c2dee6b4d43823c386b4fedf2 Mon Sep 17 00:00:00 2001 From: "K.Himeno" <6715229+Himenon@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:22:55 +0900 Subject: [PATCH 2/2] chore: update --- .../{class-api-client => _shared}/__tests__/utils.test.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/code-templates/{class-api-client => _shared}/__tests__/utils.test.ts (100%) diff --git a/src/code-templates/class-api-client/__tests__/utils.test.ts b/src/code-templates/_shared/__tests__/utils.test.ts similarity index 100% rename from src/code-templates/class-api-client/__tests__/utils.test.ts rename to src/code-templates/_shared/__tests__/utils.test.ts