Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
chore(express-openapi): cleanup + release
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiisol committed Jan 21, 2023
1 parent 9416cba commit 03f7c58
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions express-openapi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions express-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@decorators/express-openapi",
"version": "1.0.1-beta",
"version": "1.0.1",
"description": "node decorators - openapi decorators for swagger-ui-express and @decorators/express",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -35,4 +35,4 @@
"scripts": {
"compile": "tsc"
}
}
}
2 changes: 1 addition & 1 deletion express-openapi/src/decorators/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './path';
export * from './schema';
export * from './WithDefinitions';
export * from './with-definitions';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getMeta } from "@decorators/express/lib/src/meta";
import { getOpenApiDoc } from "../helpers";
import { getOpenApiMeta } from "../meta";
import { ParamDef, ParamLocation, PathMeta } from "../types";
import { getMeta } from '@decorators/express/lib/src/meta';
import { getOpenApiDoc } from '../helpers';
import { getOpenApiMeta } from '../meta';
import { ParamDef, ParamLocation, PathMeta } from '../types';

type WithDefinitionsOpts = {
tags?: string[]
Expand All @@ -19,7 +19,7 @@ export function WithDefinitions(options: WithDefinitionsOpts): ClassDecorator {
Object.keys(meta).forEach(methodName => {
const pathMeta = meta[methodName];
const routeParams = params[methodName];
getRoutes(routes, methodName).forEach(route => {
getRoutes(routes, methodName).forEach((route: { method: string; url: string; }) => {
// as openapi does not support nested urls, need to concat the controller url with the one from the method
const url = getPathName(basePath, route.url);
// the path might exist already (because of another http verb - ie GET /users and POST /users).
Expand Down

0 comments on commit 03f7c58

Please sign in to comment.