Feat/support multi languages #69
Annotations
21 errors and 4 warnings
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
Typecheck
Module '"../../components/Editor.tsx"' has no exported member 'Language'.
|
packages/swagger-client/src/OperationGenerator.test.tsx > OperationGenerator > [GET] should generate with pathParamsType `inline`:
packages/swagger-client/src/OperationGenerator.test.tsx#L48
Error: Snapshot `OperationGenerator > [GET] should generate with pathParamsType `inline` 1` mismatched
- Expected
+ Received
@@ -27,26 +27,46 @@
],
"path": "showPetById.ts",
"root": "showPetById.ts",
},
],
+ "language": undefined,
"meta": {
"name": "showPetById",
"pluginKey": undefined,
"tag": "pets",
},
"override": undefined,
"path": "showPetById.ts",
"source": "/**
* @summary Info for a specific pet
* @link /pets/:pet_id */
- export async function showPetById(petId: ShowPetByIdPathParams["pet_id"], testId: ShowPetByIdPathParams["testId"], options: Partial<Parameters<typeof client>[0]> = {}): Promise<ResponseConfig<ShowPetByIdQueryResponse>["data"]> {
+
+ export async function showPetById (petId: ShowPetByIdPathParams["pet_id"], testId: ShowPetByIdPathParams["testId"], options: Partial<Parameters<typeof client>[0]> = {}): Promise<ResponseConfig<ShowPetByIdQueryResponse>["data"]> {
+
const res = await client<ShowPetByIdQueryResponse>({
method: "get",
url: `/pets/${petId}`,
...options
- });
- return res.data;
+ })
+ return res.data
+
}
",
+ },
+ {
+ "baseName": "showPetById.kt",
+ "env": undefined,
+ "exports": [],
+ "id": undefined,
+ "imports": [],
+ "language": undefined,
+ "meta": {
+ "name": "showPetById",
+ "pluginKey": undefined,
+ "tag": "pets",
+ },
+ "override": undefined,
+ "path": "showPetById.kt",
+ "source": "",
},
]
❯ packages/swagger-client/src/OperationGenerator.test.tsx:48:19
|
packages/swagger-client/src/OperationGenerator.test.tsx > OperationGenerator > [GET] should generate with pathParamsType `object`:
packages/swagger-client/src/OperationGenerator.test.tsx#L79
Error: Snapshot `OperationGenerator > [GET] should generate with pathParamsType `object` 1` mismatched
- Expected
+ Received
@@ -27,26 +27,46 @@
],
"path": "showPetById.ts",
"root": "showPetById.ts",
},
],
+ "language": undefined,
"meta": {
"name": "showPetById",
"pluginKey": undefined,
"tag": "pets",
},
"override": undefined,
"path": "showPetById.ts",
"source": "/**
* @summary Info for a specific pet
* @link /pets/:pet_id */
- export async function showPetById({ petId, testId }: ShowPetByIdPathParams, options: Partial<Parameters<typeof client>[0]> = {}): Promise<ResponseConfig<ShowPetByIdQueryResponse>["data"]> {
+
+ export async function showPetById ({ petId, testId }: ShowPetByIdPathParams, options: Partial<Parameters<typeof client>[0]> = {}): Promise<ResponseConfig<ShowPetByIdQueryResponse>["data"]> {
+
const res = await client<ShowPetByIdQueryResponse>({
method: "get",
url: `/pets/${petId}`,
...options
- });
- return res.data;
+ })
+ return res.data
+
}
",
+ },
+ {
+ "baseName": "showPetById.kt",
+ "env": undefined,
+ "exports": [],
+ "id": undefined,
+ "imports": [],
+ "language": undefined,
+ "meta": {
+ "name": "showPetById",
+ "pluginKey": undefined,
+ "tag": "pets",
+ },
+ "override": undefined,
+ "path": "showPetById.kt",
+ "source": "",
},
]
❯ packages/swagger-client/src/OperationGenerator.test.tsx:79:19
|
packages/swagger-client/src/OperationGenerator.test.tsx > OperationGenerator > [GET] should generate with templates:
packages/swagger-client/src/OperationGenerator.test.tsx#L112
Error: Snapshot `OperationGenerator > [GET] should generate with templates 1` mismatched
- Expected
+ Received
@@ -33,21 +33,53 @@
"name": "axios",
"path": "axios",
"root": undefined,
},
],
+ "language": undefined,
"meta": {
"name": "showPetById",
"pluginKey": undefined,
"tag": "pets",
},
"override": undefined,
"path": "showPetById.ts",
"source": "/**
* @summary Info for a specific pet
* @link /pets/:pet_id */
- export async function showPetById({ petId, testId }: ShowPetByIdPathParams, options: Partial<Parameters<typeof client>[0]> = {}): Promise<ResponseConfig<ShowPetByIdQueryResponse>["data"]> {
- return axios.get(`/pets/${petId}`, options);
+
+ export async function showPetById ({ petId, testId }: ShowPetByIdPathParams, options: Partial<Parameters<typeof client>[0]> = {}): Promise<ResponseConfig<ShowPetByIdQueryResponse>["data"]> {
+ return axios.get(`/pets/${petId}`, options
+ }
+ ",
+ },
+ {
+ "baseName": "showPetById.kt",
+ "env": undefined,
+ "exports": [],
+ "id": undefined,
+ "imports": [
+ {
+ "isTypeOnly": undefined,
+ "name": "axios",
+ "path": "axios",
+ "root": undefined,
+ },
+ ],
+ "language": undefined,
+ "meta": {
+ "name": "showPetById",
+ "pluginKey": undefined,
+ "tag": "pets",
+ },
+ "override": undefined,
+ "path": "showPetById.kt",
+ "source": "/**
+ * @summary Info for a specific pet
+ * @link /pets/:pet_id */
+
+ export async function showPetById ({ petId, testId }: ShowPetByIdPathParams, options: Partial<Parameters<typeof client>[0]> = {}): Promise<ResponseConfig<ShowPetByIdQueryResponse>["data"]> {
+ return axios.get(`/pets/${petId}`, options
}
",
},
]
❯ packages/swagger-client/src/OperationGenerator.test.tsx:112:19
|
packages/swagger-faker/src/OperationGenerator.test.tsx > OperationGenerator > [GET] should generate:
packages/swagger-faker/src/OperationGenerator.test.tsx#L43
Error: Snapshot `OperationGenerator > [GET] should generate 1` mismatched
- Expected
+ Received
@@ -36,28 +36,33 @@
],
"path": "ListPets",
"root": "listPets.ts",
},
],
+ "language": undefined,
"meta": {
"name": "listPets",
"pluginKey": undefined,
"tag": "pets",
},
"override": undefined,
"path": "listPets.ts",
- "source": "export function ListPetsQueryParams(override: NonNullable<Partial<ListPetsQueryParams>> = {}): NonNullable<ListPetsQueryParams> {
- return {
- ...{ "limit": faker.string.alpha() },
- ...override
- };
+ "source": "
+ export function ListPetsQueryParams(override: NonNullable<Partial<ListPetsQueryParams>> = {}): NonNullable<ListPetsQueryParams> {
+
+ return {
+ ...{"limit": faker.string.alpha()},
+ ...override
+ };
}
+
/**
* @description A paged array of pets
*/
- export function ListPetsQueryResponse(override?: NonNullable<Partial<ListPetsQueryResponse>>): NonNullable<ListPetsQueryResponse> {
- return Pets(override);
+ export function ListPetsQueryResponse(override?: NonNullable<Partial<ListPetsQueryResponse>>): NonNullable<ListPetsQueryResponse> {
+
+ return Pets(override);
}
- ",
+ ",
},
]
❯ packages/swagger-faker/src/OperationGenerator.test.tsx:43:19
|
packages/swagger-faker/src/OperationGenerator.test.tsx > OperationGenerator > [GET] should generate with seed `[222]`:
packages/swagger-faker/src/OperationGenerator.test.tsx#L74
Error: Snapshot `OperationGenerator > [GET] should generate with seed `[222]` 1` mismatched
- Expected
+ Received
@@ -36,30 +36,33 @@
],
"path": "ListPets",
"root": "listPets.ts",
},
],
+ "language": undefined,
"meta": {
"name": "listPets",
"pluginKey": undefined,
"tag": "pets",
},
"override": undefined,
"path": "listPets.ts",
- "source": "export function ListPetsQueryParams(override: NonNullable<Partial<ListPetsQueryParams>> = {}): NonNullable<ListPetsQueryParams> {
- faker.seed([222]);
- return {
- ...{ "limit": faker.string.alpha() },
- ...override
- };
+ "source": "
+ export function ListPetsQueryParams(override: NonNullable<Partial<ListPetsQueryParams>> = {}): NonNullable<ListPetsQueryParams> {
+ faker.seed([222])
+ return {
+ ...{"limit": faker.string.alpha()},
+ ...override
+ };
}
+
/**
* @description A paged array of pets
*/
- export function ListPetsQueryResponse(override?: NonNullable<Partial<ListPetsQueryResponse>>): NonNullable<ListPetsQueryResponse> {
- faker.seed([222]);
- return Pets(override);
+ export function ListPetsQueryResponse(override?: NonNullable<Partial<ListPetsQueryResponse>>): NonNullable<ListPetsQueryResponse> {
+ faker.seed([222])
+ return Pets(override);
}
- ",
+ ",
},
]
❯ packages/swagger-faker/src/OperationGenerator.test.tsx:74:19
|
packages/swagger-faker/src/OperationGenerator.test.tsx > OperationGenerator > [POST] should generate:
packages/swagger-faker/src/OperationGenerator.test.tsx#L102
Error: Snapshot `OperationGenerator > [POST] should generate 1` mismatched
- Expected
+ Received
@@ -28,25 +28,30 @@
],
"path": "CreatePets",
"root": "createPets.ts",
},
],
+ "language": undefined,
"meta": {
"name": "createPets",
"pluginKey": undefined,
"tag": "pets",
},
"override": undefined,
"path": "createPets.ts",
- "source": "export function CreatePetsMutationRequest(override: NonNullable<Partial<CreatePetsMutationRequest>> = {}): NonNullable<CreatePetsMutationRequest> {
- return {
- ...{ "name": faker.string.alpha(), "tag": faker.string.alpha() },
- ...override
- };
+ "source": "
+ export function CreatePetsMutationRequest(override: NonNullable<Partial<CreatePetsMutationRequest>> = {}): NonNullable<CreatePetsMutationRequest> {
+
+ return {
+ ...{"name": faker.string.alpha(),"tag": faker.string.alpha()},
+ ...override
+ };
}
+
- export function CreatePetsMutationResponse(override?: NonNullable<Partial<CreatePetsMutationResponse>>): NonNullable<CreatePetsMutationResponse> {
- return undefined;
+ export function CreatePetsMutationResponse(override?: NonNullable<Partial<CreatePetsMutationResponse>>): NonNullable<CreatePetsMutationResponse> {
+
+ return undefined;
}
- ",
+ ",
},
]
❯ packages/swagger-faker/src/OperationGenerator.test.tsx:102:19
|
packages/swagger-faker/src/OperationGenerator.test.tsx > OperationGenerator > [DELETE] should generate with unknownType `any`:
packages/swagger-faker/src/OperationGenerator.test.tsx#L129
Error: Snapshot `OperationGenerator > [DELETE] should generate with unknownType `any` 1` mismatched
- Expected
+ Received
@@ -20,18 +20,21 @@
],
"path": "DeletePetPetid",
"root": "delete_pet-petid.ts",
},
],
+ "language": undefined,
"meta": {
"name": "delete_pet-petid",
"pluginKey": undefined,
"tag": undefined,
},
"override": undefined,
"path": "delete_pet-petid.ts",
- "source": "export function DeletePetPetidMutationResponse(override?: NonNullable<Partial<DeletePetPetidMutationResponse>>): NonNullable<DeletePetPetidMutationResponse> {
- return undefined;
+ "source": "
+ export function DeletePetPetidMutationResponse(override?: NonNullable<Partial<DeletePetPetidMutationResponse>>): NonNullable<DeletePetPetidMutationResponse> {
+
+ return undefined;
}
- ",
+ ",
},
]
❯ packages/swagger-faker/src/OperationGenerator.test.tsx:129:19
|
packages/swagger-ts/src/OperationGenerator.test.tsx > OperationGenerator > [GET] /pets with optionalType `questionToken`:
packages/swagger-ts/src/OperationGenerator.test.tsx#L45
Error: Snapshot `OperationGenerator > [GET] /pets with optionalType `questionToken` 1` mismatched
- Expected
+ Received
@@ -12,10 +12,11 @@
],
"path": "Pets",
"root": "listPets.ts",
},
],
+ "language": undefined,
"meta": {
"name": "listPets",
"pluginKey": undefined,
"tag": "pets",
},
@@ -27,11 +28,11 @@
* @type string | undefined
*/
limit?: string;
} | undefined;
- /**
+ /**
* @description A paged array of pets
*/
export type ListPetsQueryResponse = Pets;
export type ListPetsQuery = {
Response: ListPetsQueryResponse;
❯ packages/swagger-ts/src/OperationGenerator.test.tsx:45:19
|
packages/swagger-ts/src/OperationGenerator.test.tsx > OperationGenerator > [POST] /pets 201:
packages/swagger-ts/src/OperationGenerator.test.tsx#L75
Error: Snapshot `OperationGenerator > [POST] /pets 201 1` mismatched
- Expected
+ Received
@@ -20,10 +20,11 @@
],
"path": "ErrorCode",
"root": "createPets.ts",
},
],
+ "language": undefined,
"meta": {
"name": "createPets",
"pluginKey": undefined,
"tag": "pets",
},
@@ -38,11 +39,11 @@
* @type string
*/
tag: string;
};
- /**
+ /**
* @description Null response
*/
export type CreatePetsMutationResponse = (Error & {
name?: ErrorCode;
});
❯ packages/swagger-ts/src/OperationGenerator.test.tsx:75:19
|
packages/swagger-ts/src/OperationGenerator.test.tsx > OperationGenerator > [DELETE] /pet/{petId} with unknownType `any`:
packages/swagger-ts/src/OperationGenerator.test.tsx#L104
Error: Snapshot `OperationGenerator > [DELETE] /pet/{petId} with unknownType `any` 1` mismatched
- Expected
+ Received
@@ -3,10 +3,11 @@
"baseName": "delete_pet-petid.ts",
"env": undefined,
"exports": [],
"id": undefined,
"imports": [],
+ "language": undefined,
"meta": {
"name": "delete_pet-petid",
"pluginKey": undefined,
"tag": undefined,
},
❯ packages/swagger-ts/src/OperationGenerator.test.tsx:104:19
|
Linting
Process completed with exit code 1.
|
Typecheck
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/[email protected], actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/[email protected], actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Tests
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/[email protected], actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Linting
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/[email protected], actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|