From 03f7c586e8b7aeee3ee5eabee5bd57e8cdf35c74 Mon Sep 17 00:00:00 2001 From: Serhii Solonko Date: Sat, 21 Jan 2023 15:43:28 +0200 Subject: [PATCH] chore(express-openapi): cleanup + release --- express-openapi/package-lock.json | 10 +++++----- express-openapi/package.json | 4 ++-- express-openapi/src/decorators/index.ts | 2 +- .../{WithDefinitions.ts => with-definitions.ts} | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) rename express-openapi/src/decorators/{WithDefinitions.ts => with-definitions.ts} (92%) diff --git a/express-openapi/package-lock.json b/express-openapi/package-lock.json index 904271d..ad23fc9 100644 --- a/express-openapi/package-lock.json +++ b/express-openapi/package-lock.json @@ -1,12 +1,12 @@ { "name": "@decorators/express-openapi", - "version": "1.0.0-beta", + "version": "1.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@decorators/express-openapi", - "version": "1.0.0-beta", + "version": "1.0.1", "license": "MIT", "devDependencies": { "@decorators/di": ">=1.0.2", @@ -21,10 +21,10 @@ "node": ">10" }, "peerDependencies": { - "@decorators/di": ">=1.0.2", - "@decorators/express": ">=2.5.0", + "@decorators/di": ">=1.0.3", + "@decorators/express": ">=2.8.0", "express": ">=4.16.3", - "swagger-ui-express": ">=4.1.6" + "swagger-ui-express": ">=4.6.0" } }, "node_modules/@decorators/di": { diff --git a/express-openapi/package.json b/express-openapi/package.json index 6feba56..85390b1 100644 --- a/express-openapi/package.json +++ b/express-openapi/package.json @@ -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", @@ -35,4 +35,4 @@ "scripts": { "compile": "tsc" } -} \ No newline at end of file +} diff --git a/express-openapi/src/decorators/index.ts b/express-openapi/src/decorators/index.ts index c02ff9b..93f4310 100644 --- a/express-openapi/src/decorators/index.ts +++ b/express-openapi/src/decorators/index.ts @@ -1,3 +1,3 @@ export * from './path'; export * from './schema'; -export * from './WithDefinitions'; +export * from './with-definitions'; diff --git a/express-openapi/src/decorators/WithDefinitions.ts b/express-openapi/src/decorators/with-definitions.ts similarity index 92% rename from express-openapi/src/decorators/WithDefinitions.ts rename to express-openapi/src/decorators/with-definitions.ts index c322c91..26d04fd 100644 --- a/express-openapi/src/decorators/WithDefinitions.ts +++ b/express-openapi/src/decorators/with-definitions.ts @@ -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[] @@ -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).