download-openapi

Original🇨🇳 Chinese
Translated

Download remote OpenAPI JSON to a local file via aptx-ft. This skill applies when users request to fetch Swagger/OpenAPI specifications from a URL, save the spec to openapi.json, or prepare local input for subsequent model or service generation.

7installs

NPX Install

npx skill4agent add haibaraaiaptx/frontend-openapi-skills download-openapi

Tags

Translated version includes tags in frontmatter

SKILL.md Content (Chinese)

View Translation Comparison →

Download OpenAPI JSON

Use underlying commands without local script wrappers.

Prerequisites

Install the aptx package in the target project and ensure
aptx-ft
is executable:
bash
pnpm add -D @aptx/frontend-tk-cli

Execution Steps

  1. Select the output file path (recommended:
    ./openapi.json
    ).
  2. Execute the download command.
  3. After successful download, pass the file path to other skills (such as model generation, request framework generation).
bash
pnpm exec aptx-ft input download --url <url> --output <file>
Alternative (when not using pnpm):
bash
npx aptx-ft input download --url <url> --output <file>
Example:
bash
pnpm exec aptx-ft input download --url https://api.example.com/swagger.json --output ./openapi.json

Output

  • Local OpenAPI JSON file (e.g.,
    ./openapi.json
    ).

Boundaries

This skill only handles downloads of OpenAPI JSON format:
  • Does not support OpenAPI specifications in YAML format
  • Does not handle URLs requiring authentication (e.g., those needing a Bearer Token)
  • Does not handle custom request headers
  • Does not automatically validate the validity of the OpenAPI specification after download (only validates JSON syntax)
For the above-mentioned functionalities, please download manually and process with other tools.