S2T

update

Safely update generated files while preserving your custom modifications. Recommended for production use.

Usage

bash

Options

-i, --input <path>

Path or URL to Swagger/OpenAPI file

Required
-o, --output <dir>

Output directory (default: ./src/api)

-t, --template <name>

Template to use (default: tanstack-query)

--http-client <client>

HTTP client: axios or fetch (default: axios)

--validator <validator>

Schema validator: zod or yup (default: zod)

--strip-base-path [path]

Strip base path from routes

--include-tags <tags>

Only update specific tags (comma-separated)

--exclude-tags <tags>

Exclude specific tags (comma-separated)

-u, --username <username>

Basic auth username

-p, --password <password>

Basic auth password

Examples

Safe update

Update while preserving modifications

bash

Update specific tags

Only update certain endpoints

bash

Important Notes

This command ALWAYS preserves your modifications. Files with custom changes will be skipped.
Use this command instead of "generate" when you have made custom modifications.

👋 Hello and welcome!

I'm Armel Dakayao, Front-End Developer & creator of swagger-to-tanstack CLI.

Armel Dakayao

Senior Front-End Developer. I build scalable, user-friendly web & mobile apps with React,React Native, Next.js, and TypeScript.