HivePaaS
Docker Swarm 기반 오픈소스 자체 호스팅 PaaS, SSL·백업·자동 확장 지원
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Generate fully typed, documented, tree-shakeable API clients from Swagger 2.0, OpenAPI 3.0, 3.1 and 3.2 specifications.
.d.ts files — same runtime behavior.makePet({ name: 'Rex' }), makePet({}, { seed: 3 })), and senders for webhooks, for UIs and tests that run without the backend.readOnly/writeOnly, every request media type, declared 304s, per-operation servers, webhook and callback handler types, optional Date conversion.| Family | Versions | Notes |
|---|---|---|
| Swagger | 2.0 | body/formData parameters, collectionFormat, consumes/produces, securityDefinitions, x-nullable, discriminator |
| OpenAPI | 3.0.x | nullable, oneOf/anyOf/allOf, discriminators, content parameters, style/explode, callbacks, operation servers |
| OpenAPI | 3.1.x | JSON Schema 2020-12 types (type: [..., "null"]), const, prefixItems, $ref siblings, $defs, $anchor, $id scopes, webhooks, if/then/else and dependent* (enforced by Zod) |
| OpenAPI | 3.2.x | Everything in 3.1, plus QUERY and additionalOperations methods, in: querystring, style: cookie, nested tags (parent, kind), $self, media type components, discriminator.defaultMapping, the OAuth 2 device flow; itemSchema content is typed as text |
The configured spec.version is enforced: a 3.0 document is rejected when the config says '3.1' instead of being reinterpreted. Each version has its own adapter; all of them produce the same normalized intermediate representation. Features that cannot be represented are reported as diagnostics — see compatibility for the full matrix.
Input can be JSON or YAML, local or http(s), split across files with external $refs (subject to a reference policy).
Requires Node.js 22.18 or later (TypeScript config files are loaded with Node's built-in type stripping).
npm install --save-dev swaggerz
# or: yarn add --dev swaggerz · pnpm add --save-dev swaggerz
The generated client needs no runtime dependency on swaggerz. Depending on the options you enable, your application needs:
| Option | Dependency | Tested versions |
|---|---|---|
client.adapter: 'axios' | axios | 1.0.0 – 1.x |
features.query (React, the default) | @tanstack/react-query, react | 5.0.0 – 5.x |
features.query: { framework: 'vue' } | @tanstack/vue-query, vue | 5.0.0 – 5.x, Vue 3.3+ |
features.query: { framework: 'svelte' } | @tanstack/svelte-query, svelte | 6.0.0 – 6.x, Svelte 5.25+ |
features.query: { framework: 'solid' } | @tanstack/solid-query, solid-js | 5.0.0 – 5.x |
features.swr | swr, react | 2.2.0 – 2.x |
features.validation: 'zod' | zod | 4.0.15 – 4.x |
features.validation: 'valibot' | valibot | 1.0.0 – 1.x |
features.validation: 'arktype' | arktype | 2.0.0 – 2.x (TypeScript 5.4+) |
features.mocks: 'msw' (development) | msw | 2.11.0 – 3.x |
| TypeScript output | typescript | 5.0 – 7.x |
The CLI is installed as swaggerz and as the shorter alias sz (npx sz generate).
npx swaggerz init # creates swaggerz.config.ts (detects your spec, its version, and the data-fetching and mock libraries you depend on; --format js|json|yaml)
npx swaggerz generate # writes the client to src/generated/api
With Vite, Astro or Next.js, let the dev server and the build generate it instead: add swaggerz() from swaggerz/vite to your Vite plugins, swaggerz() from swaggerz/astro to your Astro integrations, or wrap your Next.js config with withSwaggerz() from swaggerz/next (framework integrations).
swaggerz.config.ts:
import { defineConfig } from 'swaggerz';
export default defineConfig({
spec: {
version: '3.0',
input: './openapi.yaml',
},
output: {
directory: './src/generated/api',
language: 'typescript',
},
client: {
adapter: 'fetch',
},
features: {
reactQuery: false,
},
});
Use it:
import { client, getPetById, isGetPetByIdApiError } from './generated/api';
client.setConfig({
baseUrl: 'https://petstore3.swagger.io/api/v3',
auth: { api_key: () => sessionStorage.getItem('apiKey') ?? undefined },
});
try {
const pet = await getPetById({ petId: 10 }, { timeout: 5_000 });
console.log(pet.name);
} catch (error) {
// Checking the status narrows the body to that response's type.
if (isGetPetByIdApiError(error) && error.status === 404) console.error(error.body.message);
}
Every guide is a file in docs/, readable here on GitHub. The docs website renders them with references generated from the source, real generated code next to its specification, measured numbers and an in-browser playground.
Runnable examples cover TanStack Query for React, Vue, Svelte and Solid, SWR, Zod, Valibot and ArkType validation, generated MSW mocks, a plain JavaScript Node.js project and custom plugins. The programmatic API (generate(), validate(), loadConfig(), defineConfig()) is exported from the package.
swaggerz <command> [options] (alias: sz)
init Create a config file for this project (TypeScript, JavaScript, JSON or YAML).
generate Generate the API client from the specification. (alias: gen)
validate Validate config and spec and generate in memory, without writing files.
lint Report what in the specification makes the generated client worse.
inspect Print a summary of the operations and models that would be generated.
dashboard Start the local dashboard.
mcp Run an MCP server on stdio for coding agents.
clean Remove generated files (only files recorded in the output manifest).
doctor Check Node.js, config, spec, output directory and dependency versions.
| Option | Commands | Description |
|---|---|---|
-c, --config <path> | all | Config file (default: swaggerz.config.{ts,mts,cts,js,mjs,cjs,json,yaml,yml} in the working directory) |
--cwd <dir> | all | Working directory |
--json | all | One machine-readable JSON document on stdout |
--verbose / -q, --quiet | all | Show notes and timings / only errors |
--color / --no-color | all | Force or disable color (NO_COLOR is respected) |
-w, --watch | generate | Regenerate when the spec, any referenced file, the config or a local plugin changes (remote documents are polled) |
--dry-run | generate, clean | Show changes without writing |
--check | generate | Write nothing; exit 1 and list the differences when the output is not up to date (for CI) |
--force | generate, clean | Overwrite files the generator does not own; delete hand-edited generated files |
--no-clean | generate | Keep generated files that are no longer produced |
--operations, --models, --filter <text> | inspect | Narrow the listing |
--host, --port, --open, --no-watch | dashboard | Bind address, browser opening, live reload off |
--max-warnings <n>, --rules | lint | Fail above n warnings; list the rules and their severities |
--allow-write, --no-watch | mcp | Offer the generate tool; do not reload on changes |
Exit codes: 0 success · 1 failed checks, invalid specification or generation errors · 2 invalid usage or configuration (including an unsafe output directory) · 3 internal error. Ctrl+C stops generate --watch, dashboard and mcp gracefully and ends other commands at once.
Diagnostics point to the source: error ref/missing-target $ref "#/components/schemas/Categry" … at openapi.yaml:478:9 (#/components/schemas/NewPet/properties/category).
int64 maps to number; values beyond 2^53 lose precision when the response JSON is parsed.Blob/ArrayBuffer), responses return text.not, if/then/else, dependentSchemas and dependentRequired are enforced by the generated schemas but cannot be expressed in TypeScript types, which may be wider than the schema. $dynamicRef and $recursiveRef are ignored with a warning.itemSchema: JSON Lines, server-sent events) are read and typed as text; typed streaming is not generated yet.Earlier versions of this list included readOnly/writeOnly handling, Date conversion, multiple request media types, 304 responses, operation-level servers, webhooks and callbacks, and relative $id scopes. These are now supported; see generated code.
$refs are restricted by default to the project and spec directories; remote references need an explicit host allow-list, redirects are re-checked, credentials from spec.fetch.headers are only sent to the origin of spec.input, and remote documents may never reference local files.\xNN escapes, so spec text cannot clear the terminal, change its title or write to the clipboard.Host and Origin headers, uses a strict Content Security Policy and renders spec content as text.--allow-write; generate keeps the manifest rules and asks the user first when the client supports it. Text from the specification is returned in fields marked as data, never as instructions.Report vulnerabilities as described in SECURITY.md.
See CONTRIBUTING.md. In short: pnpm install, pnpm check (types, oxlint, oxfmt, knip, tests), and Conventional Commits messages; releases are cut with release-it and published from CI.
--spec, --spec-version, --output, --language, --adapter, --query, --react-query, --swr, --validation, --mocks, --no-detect, --format, --force | init | Initial values; hooks default to the data-fetching library package.json depends on, mocks to msw when it is a dependency; --format ts|js|json|yaml picks the config format |