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

@tsdiapi/meta

v0.4.0

Published

A TSDIAPI plugin to extend API functionality with meta.

Readme

TSDIAPI Meta Plugin

A TSDIAPI plugin for automatic OpenAPI metadata generation, schema validation, and extended route information extraction.


📌 About

The TSDIAPI Meta Plugin extends the TSDIAPI framework by providing powerful tools to dynamically generate OpenAPI metadata, validate schemas, and extract route information. This plugin is designed for developers who need structured API metadata, automated validation, and enhanced introspection of API routes.

🔗 TSDIAPI CLI: @tsdiapi/cli


📦 Installation

Install the plugin using the TSDIAPI CLI:

tsdiapi plugins add meta

Then, register the plugin in your TSDIAPI project:

import { createApp } from "@tsdiapi/server";
import createPlugin from "@tsdiapi/meta";

createApp({
  plugins: [createPlugin()],
});

🚀 Features

  • 📄 Automatic OpenAPI Spec Generation – Generates OpenAPI documentation based on your defined routes and controllers.
  • Schema Validation – Provides runtime validation of request/response data based on class-validator decorators.
  • 🔍 Route Metadata Extraction – Fetch details about available routes, input/output schemas, and API controllers.
  • 📋 Form Field Processing – Converts JSON Schema into structured form field representations.
  • 🏗 Seamless Integration – Works with existing TSDIAPI projects without additional configuration.

🔧 Configuration

The plugin does not require additional configuration. Simply install and use it!

createPlugin();

📌 How to Use

Once installed, the plugin automatically provides API metadata functionality. The main entry points are the MetaProvider and the MetaController, which expose useful methods.

Using the MetaProvider

import { getMetaProvider } from "@tsdiapi/meta";

const meta = getMetaProvider();

// Retrieve OpenAPI specification
const apiSpec = meta.getApiSpec();

// Get all available routes
const routes = meta.getAllRoutes();

MetaController (Automatic API Endpoints)

The plugin also provides a built-in MetaController that exposes various endpoints for retrieving metadata:

Here is the table in Markdown format:

API Endpoints for MetaController

| HTTP Method | Endpoint | Description | | ----------- | --------------------- | ----------------------------------------------------------- | | GET | /api-spec | Retrieves the full OpenAPI specification of the API. | | GET | /api-source-spec | Retrieves the raw OpenAPI specification before processing. | | GET | /route-types | Gets all input and output types for a specified route. | | GET | /route-types/input | Gets the input type schema for a specified route. | | GET | /route-types/output | Gets the output type schema for a specified route. | | GET | /routes | Retrieves all registered API routes. | | GET | /controllers | Retrieves all registered controllers and their routes. | | GET | /route | Retrieves metadata for a specified route. | | GET | /route-source | Retrieves raw metadata for a specified route. | | GET | /schema/:name | Retrieves the schema definition for a specified DTO. | | GET | /dtos | Lists all available DTOs. | | GET | /schemas | Retrieves all registered schemas. | | GET | /source-schema | Retrieves the raw JSON schema definitions. | | GET | /fields/:name | Retrieves form fields extracted from a specified schema. | | GET | /response-fields | Retrieves response field definitions for a specified route. | | GET | /request-fields | Retrieves request field definitions for a specified route. |


📑 Example: Generate a Controller

This plugin provides a generator to create a new controller in your API. To generate a controller:

tsdiapi generate meta

This command will create a new controller in your project.

After generating the controller, you can immediately use it in your API!


👨‍💻 Contributing

Contributions are welcome! If you have ideas for improvements, feel free to open a pull request.

Author: unbywyd
📧 Contact: [email protected]

🚀 Happy coding with TSDIAPI! 🎉