download-openapi
Download OpenAPI JSON
Download OpenAPI 3.x JSON specification from a remote URL.
Prerequisites
pnpm add -D @aptx/frontend-tk-cli
Usage
pnpm exec aptx-ft input download --url <url> --output <file>
Alternative (without pnpm):
npx aptx-ft input download --url <url> --output <file>
Example
pnpm exec aptx-ft input download --url https://api.example.com/swagger.json --output ./openapi.json
Workflow
- Confirm the OpenAPI URL with user
- Choose output path (recommended:
./openapi.json) - Execute download command
- Pass the file path to other skills (generate-models, generate-artifacts)
Output
- Local OpenAPI JSON file (e.g.,
./openapi.json)
Boundaries
This skill only handles OpenAPI JSON format downloads:
- Does NOT support YAML format
- Does NOT handle authenticated URLs (Bearer Token, etc.)
- Does NOT support custom request headers
- Only validates JSON syntax, not OpenAPI specification validity
For these cases, download manually and use other tools.
More from haibaraaiaptx/frontend-openapi-skills
generate-artifacts
Generate frontend artifacts from OpenAPI via aptx-ft, including models and request clients. Use when user wants: (1) to generate API code from OpenAPI/Swagger, (2) React Query hooks from API spec, (3) Vue Query composables from API spec, (4) function-based API clients, (5) a standard flow for frontend projects without framework-specific business adaptation, (6) track generated files with manifest, (7) preview changes before generation, or (8) update barrel files automatically.
24generate-models
Generate TypeScript interfaces and enums from OpenAPI schemas using aptx-ft CLI. Use when user asks to: (1) generate types/models from OpenAPI/Swagger, (2) create TypeScript interfaces from API schema, (3) extract type definitions from openapi.json, (4) generate selective models with --name filter, (5) preserve translated enum values, (6) track generated files with manifest, (7) preview changes before generation, or (8) update barrel files automatically. Do NOT use for full artifact generation with request layer or Material UI enum adaptation.
23adapt-materal-enums
Materal-specific enum adaptation workflow: fetch enum values from provider API, let LLM fill suggested_name, then apply patch with aptx-ft. Use ONLY when: (1) user mentions Materal framework, (2) Materal naming rules are required, or (3) adapting Materal enum semantics. Do NOT use for generic OpenAPI projects.
23generate-barrels
Generate barrel index.ts files for TypeScript projects. Use when user mentions: (1) barrel files, (2) index.ts exports, (3) re-export files, (4) simplify import paths, (5) create index files for directory, or (6) generate export aggregators.
18download-swagger-file
从 URL 下载 OpenAPI 3.x JSON 规范文件。用于:(1)从远程服务器获取 API 规范,(2)将 OpenAPI JSON 保存到本地,(3)为 TypeScript 模型生成准备规范。
6write-plugin
Write custom JS plugins for the aptx-ft CLI to add commands, generate code, or analyze OpenAPI specs. Use when: (1) writing or loading a plugin file (.js/.ts), (2) using --plugin/-p CLI flag, (3) creating custom CLI subcommands, (4) accessing parsed OpenAPI data via ctx.getIr/PluginContext/GeneratorInput, (5) building custom code generators (e.g. Axios clients), (6) producing reports from OpenAPI specs, (7) questions about PluginDescriptor/CommandDescriptor/OptionDescriptor. Do NOT use for standard generation (models, react-query, vue-query, barrel files) — use generate-artifacts or generate-models instead.
5