freshcrate
Skin:/
Home > Developer Tools > swaggie

swaggie

Tool for generating TypeScript client code for given Swagger API endpoints

Why this rank:Recent releaseStrong adoptionHealthy release cadence

Description

Tool for generating TypeScript client code for given Swagger API endpoints

README

Swaggie logo

Swaggie

npm latest version NodeCI Test Coverage npm downloads npm install size

Swaggie generates TypeScript client code from an OpenAPI 3 specification. Instead of writing API-fetching code by hand, you point Swaggie at your API spec and it outputs a fully typed, ready-to-use client — helping you catch errors at compile time rather than at runtime.

See the Example section for a quick demo, or visit the full documentation at yhnavein.github.io/swaggie for guides, configuration reference, and an interactive playground.

Inspired by OpenApi Client.


Features

  • Generates TypeScript code from OpenAPI 3.0, 3.1, and 3.2 specs
  • Supports multiple HTTP client libraries out of the box: fetch, axios, xior, ky, Angular 1, Angular 2+; with optional reactive layers (swr, tsq) that compose with any compatible HTTP client
  • Auto-generated mock/stub files for Vitest and Jest — typed spies for every client method and hook, with ergonomic helpers like mockSWR() and mockQuery()
  • Custom templates — bring your own to fit your existing codebase
  • Supports allOf, oneOf, anyOf, $ref, nullable types, and various enum definitions
  • Handles multiple content types: JSON, plain text, multipart/form-data, URL-encoded, and binary
  • JSDoc comments on all generated functions
  • Generates a single, small, tree-shakable output file
  • Dev-only dependency — zero runtime overhead
  • Ability to generate automatic client mocks for vitest and jest

Installation

Install as a dev dependency in your project:

npm install swaggie --save-dev

Or install globally to use from anywhere:

npm install swaggie -g

OpenAPI Version Support

Swaggie supports OpenAPI 3.0 and newer. OpenAPI 2.0 (Swagger) is not supported.

If your backend still produces a 2.0 spec, you have a few options:

  • (Recommended) Update your backend to generate an OpenAPI 3.0 spec instead
  • Convert your 2.0 spec to 3.0 using swagger2openapi
  • Stay on Swaggie v0.x if upgrading is not currently possible

Quick Start

CLI

Run Swaggie from the command line:

swaggie -s https://petstore3.swagger.io/api/v3/openapi.json -o ./client/petstore.ts

Available options:

-V, --version                  Output the version number
-c, --config <path>            Path to a JSON configuration file
-s, --src <url|path>           URL or file path to the OpenAPI spec
-o, --out <filePath>           Output file path (omit to print to stdout)
-b, --baseUrl <string>         Base URL that will be used as a default value in the clients
-t, --template <string>        Template to use. Single name: "axios", "fetch", "xior", "ky", "ng1", "ng2", "swr", "tsq". Reactive pair: "swr,axios" / "tsq,xior" / etc. (default: "axios")
-m, --mode <mode>              Generation mode: "full" or "schemas" (default: "full")
-d, --schemaStyle <style>      Schema object style: "interface" or "type" (default: "interface")
    --enumStyle <style>        Enum style for plain string enums: "union" or "enum" (default: "union")
    --enumNamesStyle <s>       Enum member name casing: "original" or "PascalCase" (default: "original")
    --dateFormat <format>      How date fields are emitted in generated types
    --nullables <strategy>     Nullable handling: "include", "nullableAsOptional", or "ignore"
    --preferAny                Use "any" instead of "unknown" for untyped values (default: false)
    --skipDeprecated           Exclude deprecated operations from the output (default: false)
    --servicePrefix            Prefix for service names — useful when generating multiple APIs
    --allowDots                Use dot notation to serialize nested object query params
    --arrayFormat              How arrays are serialized: "indices", "repeat", or "brackets"
-C, --useClient                Prepend 'use client'; to the hooks file (with --hooksOut) or the main file (single-file mode)
    --hooksOut <filePath>      Output path for the generated hooks file (L2 templates only). Splits hooks into a separate server-safe file
    --mocks <path>             Output path for a generated mock/stub file (requires --testingFramework and --out)
-T, --testingFramework <name>  Framework for generated mocks: "vitest" or "jest" (requires --mocks and --out)
    --clientSetup <path>       Output path for the write-once client setup file. Generated on first run; never overwritten unless --forceSetup is set. For the ky template, the generated api.ts imports from this file. For other templates, it is a standalone scaffold. Requires --out
    --forceSetup               Overwrite the setup file even if it already exists (requires --clientSetup)
-h, --help                     Show help

Formatting the Output

Swaggie produces functional TypeScript, but the formatting is not always perfect. It is recommended to pipe the output through a formatter. For example, using Prettier:

swaggie -s $URL -o ./client/petstore.ts && prettier ./client/petstore.ts --write

This can be added as an npm script in your project for easy re-generation.


Configuration File

For anything beyond a one-off run, a configuration file is the cleaner approach. Create a JSON file with your settings and pass it via -c:

swaggie -c swaggie.config.json

Example configuration:

{
  "$schema": "https://yhnavein.github.io/swaggie/schema.json",
  "src": "https://petstore3.swagger.io/api/v3/openapi.json",
  "out": "./src/client/petstore.ts",
  "template": "axios",
  "baseUrl": "/api",
  "preferAny": true,
  "servicePrefix": "",
  "dateFormat": "Date",
  "nullableStrategy": "ignore",
  "generationMode": "full",
  "schemaDeclarationStyle": "interface",
  "enumDeclarationStyle": "union",
  "enumNamesStyle": "original",
  "queryParamsSerialization": {
    "arrayFormat": "repeat",
    "allowDots": true
  }
}

The $schema field enables autocompletion and inline documentation in most editors.


Templates

Swaggie's templates are split into two independent layers that you can combine freely.

HTTP client templates

These are standalone and cover the most common client libraries:

Template Description
axios Default. Recommended for React, Vue, and most Node.js projects
fetch Native browser/Node 18+ Fetch API — zero runtime dependencies
xior Lightweight Axios-compatible alternative (xior)
ky Modern fetch-based HTTP client with hooks (ky)
ng1 Angular 1 client
ng2 Angular 2+ client (uses HttpClient and InjectionToken)

Reactive query layer templates

These add a reactive data-fetching layer (SWR or TanStack Query hooks) on top of any compatible http client. They cannot be used alone — pair them with a basic template using a 2-element array:

Template Description
swr SWR hooks for queries and mutations
tsq TanStack Query hooks for queries and mutations

Compatible http client templates: axios, fetch, xior, ky. Angular clients are not compatible with reactive layers.

Usage examples

Single http template (existing behaviour):

{ "template": "axios" }
swaggie -s ./openapi.json -o ./client.ts -t axios

Pair combination — in config:

{ "template": ["swr", "axios"] }
# CLI: comma-separated pair
swaggie -s ./openapi.json -o ./client.ts -t swr,axios
swaggie -s ./openapi.json -o ./client.ts -t tsq,xior
swaggie -s ./openapi.json -o ./client.ts -t swr,fetch

Reactive template only — defaults to fetch as the http client:

{ "template": "swr" }

Custom templates

Pass the path to your own template directory as the template value:

swaggie -s https://petstore3.swagger.io/api/v3/openapi.json -o ./client/petstore.ts --template ./my-swaggie-template/

Custom paths also work as part of a composite pair: ["./my-l2", "axios"].


Example

Let's say you're building a TypeScript client for the PetStore API. Instead of writing fetch calls by hand, run:

swaggie -s https://petstore3.swagger.io/api/v3/openapi.json -o ./api/petstore.ts && prettier ./api/petstore.ts --write

Swaggie will generate something like this:

// ./api/petstore.ts

import Axios, { AxiosPromise } from 'axios';

const axios = Axios.create({
  baseURL: '/api',
  paramsSerializer: (params: any) =>
    encodeParams(params, null, {
      allowDots: true,
      arrayFormat: 'repeat',
    }),
});

/** [...] **/

export const petClient = {
  /**
   * @param petId
   */
  getPetById(petId: number): AxiosPromise<Pet> {
    let url = `/pet/${encodeURIComponent(`${petId}`)}`;

    return axios.request<Pet>({
      url: url,
      method: 'GET',
    });
  },

  // ... and other methods ...
};

You can then use it directly in your application code:

// app.ts

import { petClient } from './api/petstore';

petClient.getPetById(123).then((pet) => console.log('Pet: ', pet));

If the API removes an endpoint you rely on, re-running Swaggie will cause a compile-time error — not a runtime surprise for your users.


Advanced Configuration

Query Parameter Serialization

Different backends expect query parameters in different formats. Swaggie lets you control this via the queryParamsSerialization config. The default values match what ASP.NET Core expects.

Here's how the object { "a": { "b": 1 }, "c": [2, 3] } is serialized under each combination:

Result allowDots arrayFormat
?a.b=1&c=2&c=3 true repeat
?a.b=1&c[]=2&c[]=3 true brackets
?a.b=1&c[0]=2&c[1]=3 true indices
?a[b]=1&c=2&c=3 false repeat
?a[b]=1&c[]=2&c[]=3 false brackets
?a[b]=1&c[0]=2&c[1]=3 false indices

Once you identify what your backend expects, update your config:

{
  "queryParamsSerialization": {
    "arrayFormat": "repeat",
    "allowDots": true
  }
}

Nullable Strategy

OpenAPI 3.0 allows fields to be marked as nullable: true. Swaggie gives you three ways to handle this in the generated TypeScript, via the nullableStrategy option:

Value Behavior
"ignore" (default) nullable is ignored — the field is typed as if it were not nullable
"include" Appends | null to the type (e.g. string | null)
"nullableAsOptional" Makes the field optional (?) instead of adding | null

Example — given tenant: { type: 'string', nullable: true } (required):

// nullableStrategy: "ignore"            →  tenant: string;
// nullableStrategy: "include"           →  tenant: string | null;
// nullableStrategy: "nullableAsOptional"  →  tenant?: string;

Generation Mode

Use generationMode (or CLI --mode) to control what gets generated:

Value Behavior
"full" Generates full client code + used schemas (default, existing behavior)
"schemas" Generates only schemas and includes all component schemas by default

"schemas" mode intentionally does not run the used-schema heuristic.

Schema Declaration Style

Use schemaDeclarationStyle (or CLI --schemaStyle) to control object schema output:

Value Behavior
"interface" export interface Tag { ... } (default)
"type" export type Tag = { ... };

Enum Declaration Style

Use enumDeclarationStyle (or CLI --enumStyle) for plain string enums:

  • "union" (default): export type Status = "active" | "disabled";
  • "enum": export enum Status { active = "active", disabled = "disabled" }

Note: this applies only to plain string enums. Non-string enums are still emitted as union types.

Enum Names Style

Use enumNamesStyle (or CLI --enumNamesStyle) to control the casing of enum member names when enumDeclarationStyle is "enum":

  • "original" (default): member names are used exactly as they appear in the spec
  • "PascalCase": member names are converted to PascalCase

x-ts-type Extension

Add x-ts-type to any schema in your spec to emit a verbatim TypeScript type string instead of deriving it from the schema definition. This is useful for intersection types, complex mapped types, or any TypeScript construct that cannot be expressed in OpenAPI's type system:

ResourceAccess:
  x-ts-type: >-
    { items?: { [key: string]: Entry } } & { [key: string]: boolean | Entry | undefined }
  type: object   # kept for doc/validation purposes

Swaggie emits exactly:

export type ResourceAccess = { items?: { [key: string]: Entry } } & { [key: string]: boolean | Entry | undefined };

x-ts-type takes precedence over all other schema fields, including $ref. See the full documentation for more detail.

Parameter Modifiers

Sometimes an API spec marks a parameter as required, but your client handles it in an interceptor and you don't want it cluttering every method signature. Parameter modifiers let you override this globally without touching the spec.

Example:

{
  "modifiers": {
    "parameters": {
      "clientId": "ignore",
      "orgId": "optional",
      "country": "required"
    }
  }
}
  • "ignore" — the parameter is removed from all generated method signatures
  • "optional" — the parameter becomes optional regardless of what the spec says
  • "required" — the parameter is always required (generally better to just fix the spec)

Code Quality

Swaggie's output is functional but not always perfectly formatted, since it uses a templating engine internally. It is strongly recommended to run the output through a formatter to ensure consistent style across regenerations.

Prettier (most popular):

prettier ./FILE_PATH.ts --write

Biome (fast alternative):

biome check ./FILE_PATH.ts --apply-unsafe

Either tool needs to be installed separately and configured for your project.


Next.js App Router — Split-file Mode

SWR and TanStack Query hooks can only run in React Client Components. In Next.js App Router projects you may want:

  • The HTTP clients and types available on both the server and client sides
  • The reactive hooks restricted to Client Components only (with 'use client';)

Use --hooksOut to generate two separate files:

swaggie -s ./openapi.yaml \
  -o ./src/api/client.ts \
  --hooksOut ./src/api/hooks.ts \
  -t swr,axios \
  --useClient

Or in a config file:

{
  "src": "./openapi.yaml",
  "out": "./src/api/client.ts",
  "hooksOut": "./src/api/hooks.ts",
  "template": ["swr", "axios"],
  "useClient": true
}

This produces:

  • client.ts — HTTP client objects + TypeScript types. No 'use client' directive. Safe to import in Server Components and API routes.
  • hooks.ts — Reactive hook namespaces. Has 'use client'; at the top. Imports the main file as import * as API from './client'.

In your components:

// Server Component or API route — no 'use client' needed
import { petClient } from './api/client';

// Client Component only
import { pet } from './api/hooks';

Generating Mocks

Swaggie can generate a companion mock file alongside your client — a set of typed spy stubs for every method and hook, ready to drop into your tests.

swaggie -s ./spec.json -o ./src/api/client.ts -t swr,axios \
  --mocks ./src/__mocks__/api.ts --testingFramework vitest

Or in a config file:

{
  "src": "./openapi.json",
  "out": "./src/api/client.ts",
  "template": ["swr", "axios"],
  "mocks": "./src/__mocks__/api.ts",
  "testingFramework": "vitest"
}

The generated mock file exports the same names as the real client, so vi.mock('./api', () => import('./__mocks__/api')) is all you need in tests. For (SWR/TSQ) templates, hook stubs come with shorthand helpers:

pet.queries.usePetById.mockSWR({ data: { id: 1, name: 'Rex' } });
pet.mutations.useAddPet.mockSWRMutation({ isMutating: false });
// TanStack Query equivalents: mockQuery() / mockMutation()

See the Mocking guide for full details.


Using Swaggie Programmatically

You can also call Swaggie directly from Node.js/bun/deno/etc:

import swaggie from 'swaggie';

swaggie
  .genCode({
    src: 'https://petstore3.swagger.io/api/v3/openapi.json',
    out: './api/petstore.ts',
  })
  .then(complete, error);

function complete(spec) {
  console.info('Service generation complete');
}

function error(e) {
  console.error(e.toString());
}

What's Supported

Supported Not Supported
OpenAPI 3.0, 3.1, 3.2 Swagger / OpenAPI 2.0
allOf, oneOf, anyOf, $ref, external $refs not keyword
Spec formats: JSON, YAML Very complex query parameter structures
Extensions: x-position, x-name, x-enumNames, x-enum-varnames, x-ts-type Multiple response types (only the first is used)
Content types: JSON, plain text, multipart/form-data Multiple request body types (only the first is used)
Content types: application/x-www-form-urlencoded, application/octet-stream OpenAPI callbacks and webhooks
Various enum definition styles, support for additionalProperties
Nullable types, path inheritance, JSDoc descriptions
Remote URLs and local file paths as spec source
Grouping by tags, graceful handling of duplicate operation IDs

Used By

British Council KPMG Klarna

Release History

VersionChangesUrgencyDate
v2.3.0- **feat**: ability to filter operations out in an easy way from being generated. ## How In the json config file you can add following section: ``` "exclude": { "tags": [ "skip" ], "operationIds": [ "DestroyWorld", "Admin*" ] } ``` And now any operation that is either: - named as `DestroyWorld` - or starts with Admin - or has tag `skip` will not be generated in the code.High5/28/2026
v2.2.2- **feat**: expose all SWR variables in mocksHigh5/28/2026
v2.1.3- **fix**: improve logic for prefixing api types to support string literal enum values correctly - **chore**: upgrade depsHigh5/21/2026
v2.1.1- **fix**: For `ky` template let's use encodeParams to serialize query strings accordingly to user's needs. Unfortunately default ky serializer is very poorHigh4/21/2026
v2.1.0- **feat**: new http client template: `ky` - **feat**: ability to separate reactive hooks to a different file. That's especially important for NextJS apps, where you would like to use types or http client in the server side. (`--hooksOut <PATH>` option) - **feat**: Due to `ky` we now have a different approach for setting up http instance. For xior or axios you can customize interceptors after http instance is created. In `ky` it has to be other way around. `--clientSetup <PATH>` will generate High4/21/2026
v2.0.1- **fix**: issues with mocks for TanStack Query templateHigh4/8/2026
v2.0.0The biggest release so far! Full changelog and review of the new features is here: https://yhnavein.github.io/swaggie/ In a nutshell: - **feat**: Add auto-generated mocks for client - **feat**: Separate templates into reactive and http clients and allow to use them together - **feat**: Generate mutations for reactive templates (like SWR and TSQ) - **feat**: Add `useClient` option for generating NextJS-compatible code - **feat**: Add Query parameter grouping There are **Breaking cMedium4/7/2026
v1.9.0- **feat**: Include in JSDocs `@format` and `@default` values from the spec - **feat**: More ignores in the file header. Most notably: ignore for istanbul coverages and biomejs - **fix**: Currently handle `{ "type": "object" }`, as according to OpenAPI 3 spec this is equal to `Record<string, unknown>` - **feat**: Use `Record<T, V>>` instead of `{ [key: T]: V }` ## Examples ```diff export interface User { + /** @format int64 */ id?: number; /** * The role of the user. + Medium3/30/2026
v1.8.8- **fix**: Include comment about file being auto-generated to schema-only generationsMedium3/28/2026
v1.8.7- **feat**: Add support for verbatim types (custom `x-ts-type` attribute) Sometimes the spec cannot express the exact desired result. In those cases, we may want TypeScript to generate a very specific type from a given schema. This feature adds deep customization through the custom `x-ts-type` attribute, which can be used directly in the spec. A verbatim type lets you render any custom type you want. When used, it overrides and ignores all other definitions for that schema. ## ExamplMedium3/27/2026
v1.8.6- **feat**: Add new flag `enumNamesStyle` that drives how simple enums will be created and how its labels will look like. This will affect only simple enums where spec lists only values ## Example ```js Status: { type: 'string', enum: ['org name', 'my-value', 'some.thing', 'under_score', 'ALLCAPS'], } ``` `--enumNamesStyle original` (as before) ```ts export enum Status { 'org name' = "org name", 'my-value' = "my-value", 'some.thing' = "some.thing", 'under_scorMedium3/27/2026
v1.8.5- **feat**: Add support for `allOf` with required fields ## Example ```js AdminUser: { allOf: [{ $ref: '#/components/schemas/BaseUser' }], required: ['id', 'email', 'role'], }, ``` will generate: ```ts export type AdminUser = BaseUser & Required<Pick<BaseUser, 'id' | 'email' | 'role'>>; ```Medium3/27/2026
v1.8.4- **chore**: expose a browser version of the Swaggie. So that you can run it in... well... browser. Very helpful for a working Playground page in the Docs No functional changesLow3/14/2026
v1.8.3- **feat**: Expose more existing options in CLILow3/11/2026
v1.8.2- **impr**: Better `fetch` template that actually fills `Content-Type` header where applicable - **fix**: Gracefully handle wrong spec that has `$ref` just inside `properties`.Low3/11/2026
v1.8.1- **impr**: Support for oneOf/anyOf which drives only required fields - **feat**: Add proper support for additionalProperties - **feat**: Add option to prefer enums than string union types if possible Changes are backwards compatibleLow3/11/2026
v1.8.0- **feat**: Add support for generating only schema part of the spec - **feat**: Add support for generating schemas as types instead of interfaces - **impr**: Adjust formatting for schema generation. Comments are aligned with the code and added missing newline. Schemas should not require prettier for most cases now :) ## Description New features do not change existing behaviour. With this version you can use two more options flags (both CLI and in JSON config file): ``` -m, --mode <mLow3/11/2026
v1.7.1- **fix**: Fixed app after partial removal of `nanocolors`.Low3/11/2026
v1.7.0- **feat**: Add support for external $refs! - **chore**: replace `nanocolors` with `picocolors` ## External $refs With this version it is possible to handle such cases: ```yml components: schemas: Pet: properties: owner: $ref: './common.yml#/components/schemas/User' # Wow! It works now! ``` > *Note*: For security reasons we do support only local filesystem. So this won't work: `$ref: https://google.com/spec/common.yml#/components/schemas/User`Low3/11/2026
v1.6.0- **feat**: Support for OpenAPI 3.0 `nullable` properties - **feat**: Support for OpenAPI 3.1 nullables (`["<TYPE>", "null"]`) - **feat**: Make support for new nullables fully backward compatible - **feat**: Support for `$ref` in `requestBody` This also mean that from this version Swaggie supports pretty much fully OpenAPI 3.0, 3.1 and 3.2! ✌đŸģ 🎊 🎉 ## Nullables In the config file you can see new property `nullableStrategy`, where you can control how these nullables will be handledLow2/25/2026
v1.5.2- **chore**: replace `js-yaml` dependency with `yaml`Low2/20/2026
v1.5.1- **fix**: correctly escape prop names in deep object properties - **chore**: upgrade depsLow2/20/2026
v1.5.0This is a minor bump because of dependencies upgrade. For example new commander bumped minimum node version to v20. It does not mean the Swaggie stopped working for node < 20, but it's not officially supported. In the Github Actions I check if swaggie actually executes for node 18, 20, 22 and 24. - **chore**: Upgrade dependencies and remove undici as a direct dependency - **chore**: Replace internally `yarn` with `bun` - **chore**: Replace node test runner with bun test runner which makesLow1/4/2026
v1.4.2- **impr**: better support for referenced parameters - **fix**: Include descriptions for params in the JSDocs for operationLow9/9/2025
v1.4.1- **fix**: broken templates when no JSDocs were available for an operation (these pesky EJS templates 😅 )Low8/25/2025
v1.4.0- **fix**: escape operation's parameter names that could conflict with internally used variable names - **impr**: Better handle JSDocs comments in all templates - **impr**: Replace known HTML tags with Markdown equivalents and then encode rest of them to valid HTML entities. This way previewing JSDocs in VSCode, Cursor, etc will be much more useful - **fix**: Prevent duplication in JSDocs if Summary is also part of the Description fields.Low8/24/2025
v1.3.1- **fix**: properly detect when JSDocs comments should be rendered for operationsLow8/19/2025
v1.3.0- **feat**: Added `skipDeprecated` option to exclude deprecated operations from generation (disabled by default) - **feat**: Smart component schema filtering - automatically detects and skips unused component schemas (only when `skipDeprecated` is enabled) - **fix**: Enhanced sanitization for path parameters, component names, property names, and enum values to ensure valid TypeScript identifiers. A lot of lessons learned from testing large, poorly-structured OpenAPI specifications - **impr**:Low8/18/2025
v1.2.1- **fix**: detect YAML files in a more reliable way. Before, the extension was determining the type, but sometimes the spec can be hosted as a resource without the extension. In such cases we will check the contents to determine if this JSON or YAML file.Low8/11/2025
v1.2.0- **feat**: Added global parameter modifiers. More explanation below - **impr**: Introduced skippable parameters - if optional parameters is not followed by required one, it will be rendered as `p1?: string | null` so it's possible to skip such parameters when calling operation - **refactor**: Replaced `mocha + chai` with `node test runner + tsx` - **chore**: upgrade deps - **fix**: matrix testing of node versions in Github Actions is now fixed ## Parameter modifiers This feature addreLow8/9/2025
v1.1.2- **impr**: make one-liner comments correct JSDocs instead. Previously, for some reason, only multi-line comments were treated as proper JSDocs comments 😅 - **docs**: include Swashbuckle setup to include comments in the OpenAPI specs on the build - **chore**: upgrade deps - **chore**: Migrate Biome config to v2Low7/18/2025
v1.1.1- **fix**: downgrade `undici` to v6 to preserve minimal supported node versions (node 18.17 is minimal supported version)Low2/24/2025
v1.1.0- **feat**: Add a new template for TanStack Query with xior - **chore**: upgrade depsLow2/24/2025
v1.0.1- **chore**: remove test util files from the bundle - **docs**: improve READMELow7/15/2024
v1.0.0## 🎉 v1.0 - OpenAPI 3 support! 🎉 Big release that introduces a lot of goodies and finally a OpenAPI 3 support. To make this happen in a fashionable manner we have dropped support for Swagger (or OpenAPI 2). Swagger is quite obsolete at this point, so everyone should migrate away anyway. Let's go through breaking changes and some of the mitigations. ### âš ī¸ Breaking changes âš ī¸ - Dropped support for node < 18 - Dropped support for Swagger (OpenAPI 2) specs - Query Parameters behave Low7/13/2024
v0.8.5- **feat**: A new template named `xior`. [xior](https://github.com/suhaotian/xior#intro) is a lightweight alternative to `axios` with the API pretty much compatible with axiosLow7/3/2024
v0.8.4- **tests**: add snapshot tests for PetStore, so that it's much easier to spot changes when implementing new features and bug fixes - **impr**: upgraded Eta to the newest version. In this version there is no need for maintaining templates cache manually within this tool - **chore**: upgraded dev dependenciesLow3/30/2024
v0.8.3- **Fix** ng2 template was generating wrong source code. It's fixed nowLow3/30/2024
v0.8.2- **fix**: correctly handle inline enums in the `ng2` template - **fix**: rename private `http` into `httpClient` in `ng2` template as some enterprise customers raised an issue that their security team was concerned about use of `unprotected http protocol`. Apparently the tools are really dumb and environment name `http` was triggering false positives for them. Because this is a private variable, I have changed it to something less problematic for them. Don't worry, it does not affect public APLow10/21/2023
v0.8.1- **fix**: missing FormData support in ng2 template - **chore**: upgrade depsLow8/14/2023
v0.8.0- **BREAKING**: minimum supported node version is now **14**. One of the bumped dependencies requires it - **chore**: upgrade dependencies - **chore**: upgrade code to support TypeScript 5Low4/14/2023
v0.7.7- **fix**: ESM problem when using node 18 (https://github.com/yhnavein/swaggie/pull/29) - **ci**: add a sanity check to run a built swaggie on all supported node versionsLow1/22/2023
v0.7.6- fix: null as parameter missing if body is empty (ng1 template) (Thanks [piotr121993](https://github.com/piotr121993))Low10/21/2022
v0.7.5- fix: ng1 template generation for formData (Thanks @piotr121993) - chore: upgrade dependenciesLow10/19/2022
v0.7.4- **fix**: print result source code to stdout only when it's necessary - **impr**: add ignore deno linter flag to all the templatesLow2/6/2022
v0.7.3- **feat**: support stdout for generating output - **feat**: add types for high-level Swaggie API - **chore**: upgrade depsLow1/23/2022
v0.7.2- **fix**: problems with writing to out file - **chore**: remove last `lodash` dependencies as they had vulnerabilities. Low1/11/2022
v0.7.1- **chore**: reduce installed package sizeLow1/3/2022
v0.7.0- **impr**: use new templating system [eta](https://eta.js.org/) (bye, bye, `ejs`). Bundle is now smaller, and code generation is slightly faster **BREAKING CHANGE**: Because a new templating system is now used, your custom (i.e. not bundled) templates won't work. Difference is not huge, fortunately, but some changes need to be done if you wish to still use them. It's not a very used used feature, so probably you don't have to worry about it.Low12/14/2021
v0.6.9- **feat**: new `swr-axios` template. You can use it to generate additional useSwr hooks for your GET requests. - **chore**: get rid of `jest` and use `mocha` to make tests super fastLow12/6/2021
v0.6.8- **fix**: handle comments for inherited types correctly - **improvement**: render comments (descriptions) in more consistent and better way - **chore**: Remove dead codeLow11/14/2021
v0.6.7- **fix**: exclude blob types from adding toString (#23)Low10/3/2021
v0.6.6- **CHANGE**: Drop support for `node` < 12. At this point `node 14` is LTS. - **fix**: Handle non-string form data parameters correctly (#22) - **chore**: Upgrade dependencies - **impr**: Use `nanocolors` instead of `chalk`Low10/3/2021

Dependencies & License Audit

Loading dependencies...

Similar Packages

typesharpTypeSharp CLI - Automatically generate TypeScript from C# models. Keep your frontend and backend types in perfect sync! Supports nullable types, enums, inheritance, arrays, and custom naming conventiov0.2.3
tonikPure Dart OpenAPI 3.0/3.1 code generator. Creates type-safe API client packages for Dart and Flutter with sealed classes, pattern matching, and full encoding support.tonik-v0.7.1
revisium-endpointAuto-generated GraphQL + REST APIs from Revisium schemasv2.7.0
coherent-design-methodAI-powered design system generator — once designed, consistent UI everywhere.v0.17.1
codegenA code generator to output type definitions from JSON Schema in a growing amount of programming languages0.0.0

More in Developer Tools

mypyOptional static typing for Python
pipThe PyPA recommended tool for installing Python packages.
anthropicThe official Python library for the anthropic API
openinference-instrumentationOpenInference instrumentation utilities