1.0.14 • Published 2 years ago

nest-view v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago