npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@korix/std-schema-openapi-plugin

v0.4.0

Published

OpenAPI plugin for Standard JSON Schema in Kori framework

Readme

@korix/std-schema-openapi-plugin

OpenAPI plugin for Standard JSON Schema in the Kori framework.

This plugin generates OpenAPI 3.1.0 documentation from schemas that implement the Standard JSON Schema specification.

Generated OpenAPI

  • OpenAPI version: 3.1.0
  • JSON Schema version: draft-2020-12

Supported Libraries

| Library | Version | Notes | | ------------------------------ | ------- | ---------------------------------------- | | Zod | 4.2+ | | | ArkType | 2.1.28+ | | | Valibot | 1.2+ | Requires @valibot/to-json-schema v1.5+ |

See Standard JSON Schema for the full list of compliant libraries.

Installation

npm install @korix/std-schema-openapi-plugin @korix/openapi-plugin @korix/kori

Usage

import { createKori } from '@korix/kori';
import { stdSchemaOpenApiPlugin } from '@korix/std-schema-openapi-plugin';
import { swaggerUiPlugin } from '@korix/openapi-swagger-ui-plugin';
import {
  stdRequestSchema,
  stdResponseSchema,
  enableStdRequestAndResponseValidation,
} from '@korix/std-schema-adapter';
import { z } from 'zod';

const app = createKori({
  ...enableStdRequestAndResponseValidation(),
})
  .applyPlugin(
    stdSchemaOpenApiPlugin({
      info: {
        title: 'My API',
        version: '1.0.0',
      },
    }),
  )
  .applyPlugin(swaggerUiPlugin());

app.post('/users', {
  requestSchema: stdRequestSchema({
    body: z.object({
      name: z.string(),
      email: z.string().email(),
    }),
  }),
  responseSchema: stdResponseSchema({
    '201': z.object({
      id: z.string(),
      name: z.string(),
      email: z.string(),
    }),
  }),
  handler: (ctx) => {
    const { name, email } = ctx.req.validatedBody();
    return ctx.res.status(201).json({ id: 'user-123', name, email });
  },
});

Visit http://localhost:3000/docs for interactive API documentation.

Configuration

stdSchemaOpenApiPlugin({
  // Required: API information
  info: {
    title: 'My API',
    version: '1.0.0',
    description: 'API documentation',
  },

  // Optional: Server configurations
  servers: [
    { url: 'https://api.example.com', description: 'Production' },
    { url: 'http://localhost:3000', description: 'Development' },
  ],

  // Optional: Custom document endpoint path (default: '/openapi.json')
  documentPath: '/openapi.json',
});

Route Metadata

Use openApiMeta() to add OpenAPI-specific metadata to routes:

import { openApiMeta } from '@korix/std-schema-openapi-plugin';

app.get('/users', {
  pluginMeta: openApiMeta({
    summary: 'List users',
    description: 'Get all users in the system',
    tags: ['users'],
    operationId: 'listUsers',
    exclude: false, // Set to true to exclude from OpenAPI document
  }),
  handler: (ctx) => ctx.res.json([]),
});

License

MIT