Skip to content
Back to skills

Orpc Openapi To Contract

ASecurity

Generate an oRPC contract from an existing OpenAPI specification with Hey API.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 12, 2026
documentationgitapibackend

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-openapi-to-contract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Openapi To Contract?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Openapi To Contract
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-openapi-to-contract/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-openapi-to-contract)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oRPC OpenAPI to Contract
description: Generate an oRPC contract from an existing OpenAPI specification with Hey API.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# OpenAPI to Contract

If you have an [OpenAPI Specification](https://swagger.io/specification/), use [Hey API](https://heyapi.dev/)'s `orpc` plugin to generate an oRPC contract.

> The Hey API `orpc` plugin is currently beta.

## Example

```sh
npm install -D @hey-api/openapi-ts
```

```ts
// openapi-ts.config.ts
import { defineConfig } from '@hey-api/openapi-ts'

export default defineConfig({
  input: 'https://get.heyapi.dev/hey-api/backend',
  output: 'src/client',
  plugins: [
    {
      name: 'orpc',
      validator: { input: 'zod' },
    },
  ],
})
```

Then run:

```sh
npx @hey-api/openapi-ts
```

## What To Do Next

* Implement the contract on your own server with [Implement Contract](/docs/contract-first/implement-contract).
* Create a type-safe client with [OpenAPILink](/docs/openapi/client/openapi-link).
* Use as reference alongside [Define Contract](/docs/contract-first/define-contract).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.