Socket
Book a DemoInstallSign in
Socket

@tectonique/api-standards-nestjs

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tectonique/api-standards-nestjs

API Standards for NestJS. API envelopes, Problem Details and data validation/sanitizing with Zod.

latest
Source
npmnpm
Version
0.0.20
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source



Logo of library api-standards

It's the NestJS superset of tectonique/api-standards 🔗 including ready to use data validation mechanism etc.

npm

🌩 API Standards – NestJS

This library is based on tectonique/api-standards 🔗.

It implements its Envelope and ProblemDetail schema for NestJS applications.

Additionally, this library provides low barrier validation mechanisms powered by Zod 🔗.

📖 Table of contents

📦 NPM Package

💾 Installation

Using npm:

npm i @tectonique/api-standards-nestjs

Using yarn:

yarn add @tectonique/api-standards-nestjs

To install all components use useApiStandards(app):

import { useApiStandards } from '@tectonique/api-standards-nestjs';

async function bootstrap() {
    const app = await NestFactory.create(AppModule);

    // Register all NestJS API standards components.
    useApiStandards(app, () => {
        return InternalServerProblemDetail();
    });
    
    await app.listen(8080);
}

bootstrap();

🏁 Goal

The goal of the library is to help you create:

  • NestJS APIs with validated incoming data (query params, request bodies)
  • a scalable and type safe error handling system
  • 100% type safe API calls

Check out the following examples:

📑 Documentation

📨 Envelopes and ⚠️ Problem Details

💎 Zod powered data validation and transformation

📜 Changelog

🦔 Author

Peter Kuhmann
GitHub: hedgehogs-mind


Tectonique

Tectonique logo

Keywords

nest.js

FAQs

Package last updated on 18 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts