Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/src/i18n/schema-translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,41 @@
"vi": "Có nên cài đặt các dependencies sau khi generator chạy hay không. Đặt thành false để hoãn việc cài đặt khi chạy nhiều generator cùng lúc (việc cài đặt vẫn sẽ chạy nếu cần thiết để các generator tiếp theo có thể tính toán Nx project graph); cài đặt một lần vào cuối."
}
},
"open-api#py-client": {
"openApiSpecPath": {
"en": "Path to the OpenAPI specification relative to the monorepo root",
"es": "Ruta a la especificación OpenAPI relativa a la raíz del monorepo",
"fr": "Chemin vers la spécification OpenAPI relatif à la racine du monorepo",
"pt": "Caminho para a especificação OpenAPI relativo à raiz do monorepo",
"jp": "モノレポルートからの相対パスで指定するOpenAPI仕様ファイルへのパス",
"ko": "모노레포 루트를 기준으로 한 OpenAPI 사양의 상대 경로",
"it": "Percorso della specifica OpenAPI relativo alla radice del monorepo",
"zh": "相对于 monorepo 根目录的 OpenAPI 规范路径",
"vi": "Đường dẫn đến đặc tả OpenAPI tương đối so với thư mục gốc của monorepo"
},
"outputPath": {
"en": "Path to the directory in which to generate the client relative to the monorepo root",
"es": "Ruta al directorio en el que generar el cliente relativa a la raíz del monorepo",
"fr": "Chemin vers le répertoire dans lequel générer le client relatif à la racine du monorepo",
"pt": "Caminho para o diretório no qual gerar o cliente relativo à raiz do monorepo",
"jp": "モノレポルートからの相対パスで指定するクライアント生成先ディレクトリへのパス",
"ko": "모노레포 루트를 기준으로 클라이언트를 생성할 디렉토리의 상대 경로",
"it": "Percorso della directory in cui generare il client relativo alla radice del monorepo",
"zh": "相对于 monorepo 根目录生成客户端的目录路径",
"vi": "Đường dẫn đến thư mục nơi tạo client tương đối so với thư mục gốc của monorepo"
},
"clientType": {
"en": "Which client flavours to emit. 'sync' emits client.gen.py using httpx.Client, 'async' emits async_client.gen.py using httpx.AsyncClient, 'both' emits both.",
"es": "Qué variantes de cliente emitir. 'sync' emite client.gen.py usando httpx.Client, 'async' emite async_client.gen.py usando httpx.AsyncClient, 'both' emite ambos.",
"fr": "Quelles variantes de client émettre. 'sync' émet client.gen.py en utilisant httpx.Client, 'async' émet async_client.gen.py en utilisant httpx.AsyncClient, 'both' émet les deux.",
"pt": "Quais variantes de cliente emitir. 'sync' emite client.gen.py usando httpx.Client, 'async' emite async_client.gen.py usando httpx.AsyncClient, 'both' emite ambos.",
"jp": "生成するクライアントの種類。'sync'はhttpx.Clientを使用したclient.gen.pyを生成、'async'はhttpx.AsyncClientを使用したasync_client.gen.pyを生成、'both'は両方を生成します。",
"ko": "생성할 클라이언트 유형. 'sync'는 httpx.Client를 사용하는 client.gen.py를 생성하고, 'async'는 httpx.AsyncClient를 사용하는 async_client.gen.py를 생성하며, 'both'는 두 가지 모두 생성합니다.",
"it": "Quali varianti di client emettere. 'sync' emette client.gen.py usando httpx.Client, 'async' emette async_client.gen.py usando httpx.AsyncClient, 'both' emette entrambi.",
"zh": "要生成的客户端类型。'sync' 使用 httpx.Client 生成 client.gen.py,'async' 使用 httpx.AsyncClient 生成 async_client.gen.py,'both' 同时生成两者。",
"vi": "Loại client sẽ được tạo ra. 'sync' tạo client.gen.py sử dụng httpx.Client, 'async' tạo async_client.gen.py sử dụng httpx.AsyncClient, 'both' tạo cả hai."
}
},
"open-api#ts-client": {
"openApiSpecPath": {
"en": "Path to the OpenAPI specification relative to the monorepo root",
Expand Down
7 changes: 7 additions & 0 deletions packages/nx-plugin/generators.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
"metric": "g15",
"hidden": true
},
"open-api#py-client": {
"factory": "./src/open-api/py-client/generator",
"schema": "./src/open-api/py-client/schema.json",
"description": "Generate a Python httpx client from an OpenAPI specification",
"metric": "g56",
"hidden": true
},
"open-api#ts-client": {
"factory": "./src/open-api/ts-client/generator",
"schema": "./src/open-api/ts-client/schema.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`openApiPyClientGenerator - additional properties > should emit dict[str, T] for plain additionalProperties objects > types_gen.py 1`] = `
""""Types for TestApi — AUTO-GENERATED, do not edit."""

from __future__ import annotations

from typing import Never

Counts200Response = dict[str, int]

CountsError = Never
"
`;

exports[`openApiPyClientGenerator - additional properties > should handle object models with a mixture of properties and additionalProperties > types_gen.py 1`] = `
""""Types for TestApi — AUTO-GENERATED, do not edit."""

from __future__ import annotations

from typing import Never

from pydantic import BaseModel, ConfigDict


class Mixed(BaseModel):
model_config = ConfigDict(populate_by_name=True, extra="allow")

id: str


MixedError = Never
"
`;
Loading
Loading