tags de swagger
This commit is contained in:
@@ -2,8 +2,10 @@ import { Body, Controller, Post } from '@nestjs/common';
|
||||
import { AuthService } from './auth.service';
|
||||
import { AuthLoginOperadorDto } from './dto/auth-login-operador.dto';
|
||||
import { AuthLoginUsuarioDto } from './dto/auth-login-usuario.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('auth')
|
||||
@ApiTags('auth')
|
||||
export class AuthController {
|
||||
constructor(private authService: AuthService) {}
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@ import { Body, Controller, Delete, Get, Param, Post } from '@nestjs/common';
|
||||
import { CarreraProgramaService } from './carrera-programa.service';
|
||||
import { CarreraProgramaCreateDto } from './dto/carrera-programa-create.dto';
|
||||
import { CarreraProgramaUpdateDto } from './dto/carrera-programa-update.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('carrera-programa')
|
||||
@ApiTags('carrera-programa')
|
||||
export class CarreraProgramaController {
|
||||
constructor(private carreraProgramaService: CarreraProgramaService) {}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { CarreraService } from './carrera.service';
|
||||
import { CarritoGetDto } from './dto/carrera-get-dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('carrera')
|
||||
@ApiTags('carrera')
|
||||
export class CarreraController {
|
||||
constructor(private carreraService: CarreraService) {}
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@ import { CarritoCreateDto } from './dto/carrito-create.dto';
|
||||
import { CarritoUpdateDto } from './dto/carrito-update.dto';
|
||||
import { CarritoGetDto } from './dto/carrito-get-dto';
|
||||
import { CarritoDto } from './dto/carrito.dto'
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('carrito')
|
||||
@ApiTags('carrito')
|
||||
export class CarritoController {
|
||||
constructor(private carritoService: CarritoService) {}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Controller, Get, Post, Put, Query } from '@nestjs/common';
|
||||
import { EquipoService } from './equipo.service';
|
||||
import { EquipoDto } from './dto/equipo.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('equipo')
|
||||
@ApiTags('equipo')
|
||||
export class EquipoController {
|
||||
constructor(private equipoService: EquipoService) {}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Body, Controller, Delete, Get, Post, Put, Param } from '@nestjs/common';
|
||||
import { HoraExcepcionService } from './hora-excepcion.service';
|
||||
import { HoraExcepcionDto } from './dto/hora-excepcion-create.dto'
|
||||
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('hora-excepcion')
|
||||
@ApiTags('hora-excepcion')
|
||||
export class HoraExcepcionController {
|
||||
constructor(private horaExcepcionService: HoraExcepcionService) {}
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@ import { Body, Controller, Get, Put, Query } from '@nestjs/common';
|
||||
import { InstitucionDiaService } from './institucion-dia.service';
|
||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
||||
import { InstitucionDiaUpdateDto } from './dto/institucion-dia-update.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('institucion-dia')
|
||||
@ApiTags('institucion-dia')
|
||||
export class InstitucionDiaController {
|
||||
constructor(private institucionDiaService: InstitucionDiaService) {}
|
||||
|
||||
|
||||
@@ -3,8 +3,10 @@ import { InstitucionInfraccionService } from './institucion-infraccion.service';
|
||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
||||
import { InstitucionInfraccionCreateDto } from './dto/institucion-infraccion-create.dto';
|
||||
import { InstitucionInfraccionUpdateDto } from './dto/institucion-infraccion-update.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('institucion-infraccion')
|
||||
@ApiTags('institucion-infraccion')
|
||||
export class InstitucionInfraccionController {
|
||||
constructor(
|
||||
private institucionInfraccionService: InstitucionInfraccionService,
|
||||
|
||||
@@ -3,8 +3,10 @@ import { InstitucionTipoCarritoService } from './institucion-tipo-carrito.servic
|
||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
||||
import { InstitucionTipoCarritoCreateDto } from './dto/institucion-tipo-carrito-create.dto';
|
||||
import { InstitucionTipoCarritoUpdateDto } from './dto/institucion-tipo-carrito-update.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('institucion-tipo-carrito')
|
||||
@ApiTags('institucion-tipo-carrito')
|
||||
export class InstitucionTipoCarritoController {
|
||||
constructor(
|
||||
private institucionTipoCarritoService: InstitucionTipoCarritoService,
|
||||
|
||||
@@ -2,8 +2,11 @@ import { Body, Controller, Get, Put, Query } from '@nestjs/common';
|
||||
import { InstitucionService } from './institucion.service';
|
||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
||||
import { InstitucionUpdateDto } from './dto/institucion-update.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
|
||||
@Controller('institucion')
|
||||
@ApiTags('institucion')
|
||||
export class InstitucionController {
|
||||
constructor(private institucionService: InstitucionService) {}
|
||||
|
||||
|
||||
+10
@@ -1,9 +1,19 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
|
||||
const config = new DocumentBuilder()
|
||||
.setTitle('pcpuma_unam_api')
|
||||
.setDescription('Api de Pc puma')
|
||||
.setVersion('1.0')
|
||||
.build();
|
||||
const document = SwaggerModule.createDocument(app, config);
|
||||
SwaggerModule.setup('api', app, document);
|
||||
|
||||
app.useGlobalPipes(new ValidationPipe({ whitelist: true }));
|
||||
await app.listen(3000);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,11 @@ import { ModuloService } from './modulo.service';
|
||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
||||
import { ModuloCreateDto } from './dto/modulo-create.dto';
|
||||
import { ModuloUpdateDto } from './dto/modulo-update.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
// import { Serealize } from '../interceptors/serialize.interceptor';
|
||||
|
||||
@Controller('modulo')
|
||||
@ApiTags('modulo')
|
||||
export class ModuloController {
|
||||
constructor(private moduloService: ModuloService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { MotivoService } from './motivo.service';
|
||||
import { MotivoDto } from './dto/motivo.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('motivo')
|
||||
@ApiTags('motivo')
|
||||
export class MotivoController {
|
||||
constructor(private motivoService: MotivoService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { MultaService } from './multa.service';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('multa')
|
||||
@ApiTags('multa')
|
||||
export class MultaController {
|
||||
constructor(private multaService: MultaService) {}
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ import { OperadorCreateDto } from './dto/operador-create.dto';
|
||||
import { OperadorOperadoresDto } from './dto/operador-operadores.dto';
|
||||
import { OperadorUpdateDto } from './dto/operador-update.dto';
|
||||
import { OperadorDto } from './dto/operador.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('operador')
|
||||
@ApiTags('operador')
|
||||
export class OperadorController {
|
||||
constructor(private operadorService: OperadorService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { Controller, Get, Post, Put } from '@nestjs/common';
|
||||
import { PrestamoService } from './prestamo.service';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('prestamo')
|
||||
@ApiTags('prestamo')
|
||||
export class PrestamoController {
|
||||
constructor(private prestamoService: PrestamoService) {}
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@ import { Body, Controller, Get, Post, Query } from '@nestjs/common';
|
||||
import { ProgramaService } from './programa.service';
|
||||
import { ProgramaCreateDto } from './dto/programa-create.dto';
|
||||
import { ProgramaDto } from './dto/programa.dto'
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('programa')
|
||||
@ApiTags('programa')
|
||||
export class ProgramaController {
|
||||
constructor(private programaService: ProgramaService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { StatusService } from './status.service';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
|
||||
@Controller('status')
|
||||
@ApiTags('status')
|
||||
export class StatusController {
|
||||
constructor(private statusService: StatusService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { TipoEntradaService } from './tipo-entrada.service';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('tipo-entrada')
|
||||
@ApiTags('tipo-entrada')
|
||||
export class TipoEntradaController {
|
||||
constructor(private tipoEntradaService: TipoEntradaService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { Body, Controller, Get, Post } from '@nestjs/common';
|
||||
import { TipoUsuarioService } from './tipo-usuario.service';
|
||||
import { TipoUsuarioUpdateDto } from './dto/tipo-usuario-update.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('tipo-usuario')
|
||||
@ApiTags('tipo-usuario')
|
||||
export class TipoUsuarioController {
|
||||
constructor(private tipoUsuarioService: TipoUsuarioService) {}
|
||||
|
||||
|
||||
@@ -10,8 +10,10 @@ import {
|
||||
import { FileInterceptor } from '@nestjs/platform-express';
|
||||
import { UploadFileService } from './upload-file.service';
|
||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
@Controller('upload-file')
|
||||
@ApiTags('upload-file')
|
||||
export class UploadFileController {
|
||||
constructor(private uploadFileService: UploadFileService) {}
|
||||
|
||||
|
||||
@@ -14,8 +14,11 @@ import { UsuarioUpdateDto } from './dto/usuario-update.dto';
|
||||
import { UsuarioUsuariosDto } from './dto/usuario-usuarios.dto';
|
||||
import { UsuarioDto } from './dto/usuario.dto';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import {ApiTags} from '@nestjs/swagger'
|
||||
|
||||
|
||||
@Controller('usuario')
|
||||
@ApiTags('usuario')
|
||||
export class UsuarioController {
|
||||
constructor(private usuarioService: UsuarioService) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user