
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
swagger-zen
Advanced tools
Complete OpenAPI toolchain for Zodios, Zod, TypeScript types, mocks, tests and docs
Swagger-Zen, OpenAPI/Swagger şemalarından tam bir API ekosistemi oluşturmak için tasarlanmış kapsamlı ve otomatik bir araçtır.
# Global kurulum
npm install -g swagger-zen
# veya proje bazlı (devDependency olarak) kurulum
npm install --save-dev swagger-zen
En basit kullanım:
npx swagger-zen
Bu komut, varsayılan ayarlarla çalışır.
npx swagger-zen --config swagger-zen.config.js
Proje root dizininde swagger-zen.config.js adında bir dosya oluşturun:
module.exports = {
url: 'https://api.example.com/openapi.json',
baseApiDir: 'src/api',
outputDir: 'src/api/__generated__',
typesFile: 'src/api/types.ts',
mockIndex: 'src/api/msw.ts',
testFile: 'src/api/__generated__/api/tests/auto.spec.ts',
docsFile: 'src/api/USAGE.md',
snapshotDir: 'swagger/snapshots',
noDiff: false,
dryRun: false
};
| Seçenek | Açıklama | Varsayılan Değer |
|---|---|---|
url | OpenAPI/Swagger şema URL'i | https://api.example.com/openapi.json |
baseApiDir | API dosyaları için temel dizin | src/api |
outputDir | Oluşturulan dosyalar için dizin | src/api/__generated__ |
typesFile | TypeScript türleri için dosya yolu | src/api/types.ts |
mockIndex | MSW mock'ları için indeks dosyası | src/api/msw.ts |
testFile | Otomatik oluşturulan testler için dosya yolu | src/api/__generated__/api/tests/auto.spec.ts |
docsFile | API dokümantasyonu için dosya yolu | src/api/USAGE.md |
snapshotDir | Şema anlık görüntüleri için dizin | swagger/snapshots |
noDiff | Diff oluşturmayı atla | false |
dryRun | Dosya yazmadan çalıştır | false |
swagger-zen [seçenekler]
Seçenekler:
-v, --version Sürüm numarasını gösterir
-c, --config <dosya> Konfigürasyon dosyası yolu
-u, --url <url> OpenAPI/Swagger URL
--dry-run Dosya yazmadan çalıştır
--no-diff Diff oluşturmayı atla
--verbose Detaylı günlük kayıtları
-h, --help Bu yardım metnini gösterir
package.json Entegrasyonu"scripts": {
"api:update": "swagger-zen"
}
API şema değişikliklerini CI ortamında kontrol etmek için:
npx swagger-zen --no-diff
FAQs
Complete OpenAPI toolchain for Zodios, Zod, TypeScript types, mocks, tests and docs
The npm package swagger-zen receives a total of 0 weekly downloads. As such, swagger-zen popularity was classified as not popular.
We found that swagger-zen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.