ts-openapi-codegen 2.1.0-beta.1 → 2.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/README.rus.md +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,6 +73,8 @@ openapi generate --input ./spec.json --output ./dist
|
|
|
73
73
|
| `--useCancelableRequest` | - | boolean | `false` | Use cancelable promise as return type |
|
|
74
74
|
| `--sortByRequired` | `-s` | boolean | `false` | Use extended sorting strategy for function arguments |
|
|
75
75
|
| `--useSeparatedIndexes` | - | boolean | `false` | Use separate index files for core, models, schemas, and services |
|
|
76
|
+
| `--strict-openapi` | - | boolean | `false` | Enable strict OpenAPI diagnostics and fail generation when strict errors are found |
|
|
77
|
+
| `--report-file` | - | string | `./openapi-report.json` | Path to strict OpenAPI diagnostics report JSON file |
|
|
76
78
|
| `--logLevel` | `-l` | string | `error` | Logging level: `info`, `warn`, or `error` |
|
|
77
79
|
| `--logTarget` | `-t` | string | `console` | Logging target: `console` or `file` |
|
|
78
80
|
| `--validationLibrary` | - | string | `none` | Validation library for schema generation: `none`, `zod`, `joi`, `yup`, or `jsonschema` |
|
|
@@ -80,6 +82,8 @@ openapi generate --input ./spec.json --output ./dist
|
|
|
80
82
|
| `--modelsMode` | - | string | `interfaces` | Models generation mode: `interfaces` or `classes` |
|
|
81
83
|
| `--useHistory` | - | boolean | `false` | Apply diff report annotations during generation |
|
|
82
84
|
| `--diffReport` | - | string | `./openapi-diff-report.json` | Path to diff report JSON |
|
|
85
|
+
| `--useProjectPrettier` | - | boolean | `false` | Use the project’s Prettier config to format generated code |
|
|
86
|
+
| `--useEslintFix` | - | boolean | `false` | Run ESLint `--fix` on generated files after write (requires `eslint` in the project) |
|
|
83
87
|
|
|
84
88
|
**Examples:**
|
|
85
89
|
```bash
|
|
@@ -300,6 +304,8 @@ Instead of passing all options via CLI, you can use a configuration file. Create
|
|
|
300
304
|
| `useCancelableRequest` | boolean | `false` | Use cancelable promise as return type |
|
|
301
305
|
| `sortByRequired` | boolean | `false` | Extended sorting strategy for arguments |
|
|
302
306
|
| `useSeparatedIndexes` | boolean | `false` | Use separate index files |
|
|
307
|
+
| `strictOpenapi` | boolean | `false` | Enable strict OpenAPI diagnostics and fail generation on strict errors |
|
|
308
|
+
| `reportFile` | string | `./openapi-report.json` | Path to strict OpenAPI diagnostics report JSON file |
|
|
303
309
|
| `items` | array | - | Array of configurations (for multi-options format) |
|
|
304
310
|
| `validationLibrary` | string | `none` | Validation library for schema generation: `none`, `zod`, `joi`, `yup`, or `jsonschema` |
|
|
305
311
|
| `emptySchemaStrategy` | string | `keep` | Strategy for empty schemas: `keep`, `semantic`, or `skip` |
|
package/README.rus.md
CHANGED
|
@@ -72,6 +72,8 @@ openapi generate --input ./spec.json --output ./dist
|
|
|
72
72
|
| `--useCancelableRequest` | - | boolean | `false` | Использовать отменяемый promise как тип возврата |
|
|
73
73
|
| `--sortByRequired` | `-s` | boolean | `false` | Использовать расширенную стратегию сортировки для аргументов функций |
|
|
74
74
|
| `--useSeparatedIndexes` | - | boolean | `false` | Использовать отдельные index файлы для core, models, schemas и services |
|
|
75
|
+
| `--strict-openapi` | - | boolean | `false` | Включить строгую диагностику OpenAPI и завершать генерацию при strict-ошибках |
|
|
76
|
+
| `--report-file` | - | string | `./openapi-report.json` | Путь к JSON-файлу strict-отчета по диагностике OpenAPI |
|
|
75
77
|
| `--logLevel` | `-l` | string | `error` | Уровень логирования: `info`, `warn`, или `error` |
|
|
76
78
|
| `--logTarget` | `-t` | string | `console` | Цель логирования: `console` или `file` |
|
|
77
79
|
| `--validationLibrary` | - | string | `none` | Библиотека валидации для генерации схем: `none`, `zod`, `joi`, `yup`, или `jsonschema` |
|
|
@@ -79,6 +81,8 @@ openapi generate --input ./spec.json --output ./dist
|
|
|
79
81
|
| `--modelsMode` | - | string | `interfaces` | Режим генерации моделей: `interfaces` или `classes` |
|
|
80
82
|
| `--useHistory` | - | boolean | `false` | Применять diff-отчёт при генерации |
|
|
81
83
|
| `--diffReport` | - | string | `./openapi-diff-report.json` | Путь к diff-отчёту |
|
|
84
|
+
| `--useProjectPrettier` | - | boolean | `false` | Форматировать сгенерированный код конфигом Prettier проекта |
|
|
85
|
+
| `--useEslintFix` | - | boolean | `false` | Запускать ESLint `--fix` для сгенерированных файлов после записи (нужен `eslint` в проекте) |
|
|
82
86
|
|
|
83
87
|
**Примеры:**
|
|
84
88
|
```bash
|
|
@@ -299,6 +303,8 @@ openapi analyze-diff --input ./openapi/spec.yaml --git HEAD~1
|
|
|
299
303
|
| `useCancelableRequest` | boolean | `false` | Использовать отменяемый promise как тип возврата |
|
|
300
304
|
| `sortByRequired` | boolean | `false` | Расширенная стратегия сортировки для аргументов |
|
|
301
305
|
| `useSeparatedIndexes` | boolean | `false` | Использовать отдельные index файлы |
|
|
306
|
+
| `strictOpenapi` | boolean | `false` | Включить строгую диагностику OpenAPI и падать на strict-ошибках |
|
|
307
|
+
| `reportFile` | string | `./openapi-report.json` | Путь к JSON-файлу strict-отчета по диагностике OpenAPI |
|
|
302
308
|
| `items` | array | - | Массив конфигураций (для формата multi-options) |
|
|
303
309
|
| `validationLibrary` | string | `none` | Библиотека валидации для генерации схем: `none`, `zod`, `joi`, `yup`, или `jsonschema` |
|
|
304
310
|
| `emptySchemaStrategy` | string | `keep` | Стратегия для пустых схем: `keep`, `semantic`, или `skip` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-openapi-codegen",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.3",
|
|
4
4
|
"description": "Library that generates Typescript clients based on the OpenAPI specification. It bases on openapi-typescript-codegen",
|
|
5
5
|
"author": "Alexey Zverev",
|
|
6
6
|
"homepage": "https://github.com/ozonophore/openapi-codegen.git",
|