Specless

SDK generation

Specless generates a typed TypeScript client from your OpenAPI spec. Clone and own it.

What you get

A git repo with a typed TypeScript client. Every endpoint in your spec becomes a method. Every schema becomes a type. Request and response bodies are fully typed.

example.ts
import { createClient } from "./client"

const api = createClient({
  baseUrl: "https://api.example.com",
  apiKey: "your-key",
})

// fully typed - params, body, and response
const user = await api.users.get({ id: "123" })

Repo structure

Generated repo
src/
  client.ts       # main client factory
  types.ts        # all schema types
  endpoints/      # one file per tag/group
  utils/          # fetch wrapper, auth helpers
package.json
tsconfig.json
README.md

No magic, no runtime dependencies beyond fetch. You can read every line of it.

Type generation

Schema types

Every components/schemas definition becomes a TypeScript interface or type. Nested objects, arrays, enums, unions - all mapped.

Request types

Each endpoint gets typed parameters. Path params, query params, headers, and request bodies are separate types so you get autocomplete on each.

Response types

Responses are typed per status code. A 200 and a 404 return different types, and TypeScript knows about it.

Auth handling

Pass your key when creating the client. It gets attached to every request in the header you specified in your spec.

Same idea. Pass the token, it goes in the Authorization header.

The client includes a token refresh helper. Pass your client credentials and Specless handles the token lifecycle.

Customization

The generated code is yours. Clone it, push it to your own repo, change whatever you want. Rename methods, add retry logic, swap out the HTTP layer.

Regeneration

If you regenerate after updating your spec, Specless creates a new branch with the changes so you can review the diff before merging. Your custom modifications stay on main.

Specless never force-pushes to your main branch. Spec updates always land on a separate branch for review.

Extending the client

The client factory accepts a custom fetch function. Use it to add logging, retries, or request interception without modifying generated code.

SDK vs npm package

SDK reponpm package
ControlFull - modify anythingUse as-is
DistributionClone / vendor into monorepopnpm add @your-org/api-client
UpdatesNew branch with diffNew version published
Best forCustom logic, internal useQuick integration, consumers

Last updated on

On this page