Added versioning for the /papers controller
This commit is contained in:
parent
78de638645
commit
da564323a0
@ -8,7 +8,10 @@ import { RequestDto } from "src/core/domain/dtos/request.dto";
|
|||||||
/**
|
/**
|
||||||
* /papers/ route controller
|
* /papers/ route controller
|
||||||
*/
|
*/
|
||||||
@Controller('papers')
|
@Controller({
|
||||||
|
version: '1',
|
||||||
|
path: 'papers',
|
||||||
|
})
|
||||||
export class PapersController {
|
export class PapersController {
|
||||||
constructor(private searchService: SearchService) {}
|
constructor(private searchService: SearchService) {}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import morgan from 'morgan';
|
import morgan from 'morgan';
|
||||||
import { Logger, ValidationPipe } from '@nestjs/common';
|
import { Logger, ValidationPipe, VersioningType } from '@nestjs/common';
|
||||||
import { NestFactory } from '@nestjs/core';
|
import { NestFactory } from '@nestjs/core';
|
||||||
import { AppModule } from './infrastructure/modules/app.module';
|
import { AppModule } from './infrastructure/modules/app.module';
|
||||||
import { SwaggerModule, DocumentBuilder, SwaggerDocumentOptions } from '@nestjs/swagger';
|
import { SwaggerModule, DocumentBuilder, SwaggerDocumentOptions } from '@nestjs/swagger';
|
||||||
@ -19,6 +19,10 @@ async function bootstrap() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
app.enableVersioning({
|
||||||
|
type: VersioningType.URI,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration of the Swagger document
|
* Configuration of the Swagger document
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user