Skip to content
Back to skills

Orpc Openapi Handler

ASecurity

Comprehensive Guide to the OpenAPIHandler in oRPC.

  • 30 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 8, 2026
ai-agentsgitapi

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 November 8, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill orpc-openapi-handler --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Openapi Handler?

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

Security grade badge for Orpc Openapi Handler
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-orpc-openapi-handler/badge)](https://www.skillsdirectory.com/skills/majiayu000-orpc-openapi-handler)

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 Handler
description: Comprehensive Guide to the OpenAPIHandler in oRPC.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# OpenAPI Handler

`OpenAPIHandler` enables communication with clients over RESTful APIs adhering to the OpenAPI specification.

## Supported Data Types

* **string**, **number** (`NaN` → `null`), **boolean**, **null**
* **undefined** (`undefined` in arrays → `null`)
* **Date** (`Invalid Date` → `null`)
* **BigInt** → `string`, **RegExp** → `string`, **URL** → `string`
* **Record (object)**, **Array**
* **Set** → `array`, **Map** → `array`
* **Blob**, **File** (unsupported in `AsyncIteratorObject`)
* **AsyncIteratorObject** (only at root; powers [Event Iterator](/docs/event-iterator))
* **ReadableStream\<Uint8Array>** (root level only)

> If payload contains `Blob` or `File` outside root, it must use `multipart/form-data` and apply [Bracket Notation](/docs/openapi/bracket-notation).

## Installation

```sh
npm install @orpc/openapi@latest
```

## Setup

```ts
import { OpenAPIHandler } from '@orpc/openapi/fetch'
import { CORSPlugin } from '@orpc/server/plugins'
import { onError } from '@orpc/server'

const handler = new OpenAPIHandler(router, {
  plugins: [new CORSPlugin()],
  interceptors: [onError(e => console.error(e))],
})

export default async function fetch(request: Request) {
  const { matched, response } = await handler.handle(request, {
    prefix: '/api',
    context: {}
  })

  if (matched) return response
  return new Response('Not Found', { status: 404 })
}
```

## Filtering Procedures

```ts
const handler = new OpenAPIHandler(router, {
  filter: ({ contract, path }) => !contract['~orpc'].route.tags?.includes('internal'),
})
```

## Lifecycle

Follows the same lifecycle as [RPCHandler Lifecycle](/docs/rpc-handler#lifecycle).

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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