Skip to content

Commit

Permalink
feature:swagger doc support
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojue committed Jan 10, 2024
1 parent d332f03 commit e294032
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/plugins/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
* @date 2020-01-15
* @fileoverview 重构router部分,使用依赖控制controller
*/
import Router = require('@koa/router');
import swaggerJsdoc from 'swagger-jsdoc';
import assert = require('assert');
import { Container } from 'inversify';
import is = require('is');
import Koa = require('koa');
import { koaSwagger } from 'koa2-swagger-ui';
import urljoin = require('url-join');
import Daruk from '../core/daruk';
import { darukContainer } from '../core/inversify.config';
import { koaSwagger } from 'koa2-swagger-ui';
import { TYPES } from '../core/types';
import { plugin } from '../decorators';
import is = require('is');
import Router = require('@koa/router');
import swaggerJsdoc from 'swagger-jsdoc';
import urljoin = require('url-join');
import {
CONTROLLER_CLASS,
CONTROLLER_CLASS_PREFIX,
Expand Down
3 changes: 2 additions & 1 deletion src/typings/daruk_options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ export interface Options {
middlewareOrder: string[];
name: string;
rootPath: string;
routerOptions:any;
debug: boolean;
bodyOptions: koaBody.IKoaBodyOptions;
exitHook: boolean;

swagger:any;
// monitor: {
// enable: boolean;
// v8AnalyticsPath: string;
Expand Down
1 change: 1 addition & 0 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"eofline": false,
"indent": [true, "spaces", 2],
"no-empty-interface": false,
"ordered-imports": false,
"jsdoc-format": false,
"no-redundant-jsdoc": false,
"unified-signatures": false
Expand Down

0 comments on commit e294032

Please sign in to comment.