Skip to content

Commit

Permalink
feat: update openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
skgndi12 committed Nov 6, 2023
1 parent 862e624 commit 583d110
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/generate/openapi.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"title": "Mr.C API",
"version": "1.0.0"
"title": "mrc-api",
"version": "0.0.1"
},
"openapi": "3.0.3",
"paths": {
Expand Down
1 change: 0 additions & 1 deletion api/src/controller/http/dev/dev.v1.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export class DevV1Controller {
const prefix = '/v1/dev';

router
.use(express.json())
.route(`${prefix}/greeting`)
.post(this.greeting)
.all(methodNotAllowed);
Expand Down
6 changes: 4 additions & 2 deletions api/src/controller/http/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Tspec, TspecDocsMiddleware } from 'tspec';
import { Logger } from 'winston';

import apiSpecification from '@root/generate/openapi.json';
import { name, version } from '@root/package.json';

import { DevV1Controller } from '@controller/http/dev/dev.v1.controller';
import { HealthController } from '@controller/http/health/health.controller';
Expand All @@ -30,6 +31,7 @@ export class HttpServer {
this.app = express();
this.app.disable('x-powered-by');
this.app.set('trust proxy', 0);
this.app.use(express.json());
await this.buildApiDocument();
this.app.use('/api', this.middleware.accessLog);
this.app.use(
Expand Down Expand Up @@ -80,8 +82,8 @@ export class HttpServer {
outputPath: './generate/openapi.json',
specVersion: 3,
openapi: {
title: 'Mr.C API',
version: '1.0.0',
title: name,
version: version,
securityDefinitions: {
jwt: {
type: 'http',
Expand Down

0 comments on commit 583d110

Please sign in to comment.