1.0.14 • Published 3 years ago

nest-view v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Nest View

Nest view is a module created to make easy data manipulation inside an application based on NestJS.

Instalation

This module is available in npm registry.

Dependencies

The first step to use this module is create a simple application based on NestJS.

Next step: install @nestjs/swagger in your application.

Now just install the module using npm command

$ npm install nest-view

Features

  • Create views to manipulate data
  • Use view to validate data
  • Use views to make schemas to use in nestJS swagger documentation

Usage

The first step to use this module is to create a view

View example


import { PropView, View } from 'nest-view';

@View()
export class Example {
  @PropView({ type: String })
  name: string;

  @PropView({ type: Number })
  age: number;
}

Now you're able to use this view to manipulate data and use to document your request's in swagger.

Swagger documentation


import { Body, Controller, Get } from '@nestjs/common';
import { ApiBodyView } from 'nest-view';
import { Example } from './view';

@Controller()
export class AppController {
  @Get()
  @ApiBodyView(Example)
  getHello(@Body() body: Example) {
    return;
  }
}
1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago