New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@hey-api/spec-types

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hey-api/spec-types

📃 TypeScript definitions for OpenAPI and JSON Schema specifications with complete inline documentation.

Source
npmnpm
Version
0.0.0-next-20260729142554
Version published
Weekly downloads
2.3M
-19.94%
Maintainers
1
Weekly downloads
 
Created
Source
Hey API presents openapi-ts

Spec Types

TypeScript definitions for OpenAPI and JSON Schema specifications with complete inline documentation.

DevTrends badge for @hey-api/spec-types DevTrends badge for @hey-api/spec-types CI status GitHub stars MIT License

Manual  •  Issues  •  Contribute

About

TypeScript definitions for OpenAPI and JSON Schema specifications with complete inline documentation.

Part of the Hey API ecosystem.

Features

  • OpenAPI 2.0 (Swagger), 3.0, and 3.1 specifications
  • JSON Schema Draft 4 and Draft 2020-12
  • inline JSDoc on every property
  • zero runtime footprint, types only

Contributing

Want to see your code in products used by millions?

Start with our Contributing guide and release your first feature.

Sponsors

Partners behind the future of API tooling. Become a sponsor.

Gold

Opencode logo
The open source coding agent.
opencode.ai

Silver

FastAPI logo
fastapi.tiangolo.com
Unblocked logo
getunblocked.com

Bronze

Kinde logo Photon logo

Installation

You can download @hey-api/spec-types from npm using your favorite package manager.

npm

npm install @hey-api/spec-types -D -E

pnpm

pnpm add @hey-api/spec-types -D -E

yarn

yarn add @hey-api/spec-types -D -E

bun

bun add @hey-api/spec-types -D

Usage

OpenAPI

Hover over any property to see its definition from the specification.

import type { OpenAPIV3_1 } from '@hey-api/spec-types';

const doc = {
  openapi: '3.1.2',
  info: {
    title: 'My OpenAPI document',
    version: '1.0.0',
  },
} satisfies OpenAPIV3_1.Document;

JSON Schema

Full type coverage for Draft 4 and Draft 2020-12 schemas.

import type { JSONSchemaDraft2020_12 } from '@hey-api/spec-types';

const doc = {
  properties: {
    foo: {
      type: 'string',
    },
  },
  type: 'object',
} satisfies JSONSchemaDraft2020_12.Document;

License

Released under the MIT License.

Keywords

api-types

FAQs

Package last updated on 29 Jul 2026

Related posts