@foal/core
Advanced tools
Comparing version 1.11.1 to 1.11.2
import { Class, ServiceManager } from '../core'; | ||
import { IOpenAPI } from './interfaces'; | ||
import { IApiPaths, IOpenAPI } from './interfaces'; | ||
export declare function canonicalisePath(path: string): string; | ||
export declare function throwErrorIfDuplicatePaths(paths: IApiPaths): void; | ||
/** | ||
@@ -4,0 +6,0 @@ * Create an OpenAPI document from a controller class. |
@@ -9,2 +9,6 @@ "use strict"; | ||
const utils_2 = require("./utils"); | ||
function canonicalisePath(path) { | ||
return path.replace(/{.*?}/g, () => '#'); | ||
} | ||
exports.canonicalisePath = canonicalisePath; | ||
function throwErrorIfDuplicatePaths(paths) { | ||
@@ -14,3 +18,3 @@ const originalPaths = []; | ||
for (const path in paths) { | ||
const convertedPath = path.replace(/{.*}/g, () => '#'); | ||
const convertedPath = canonicalisePath(path); | ||
const index = convertedPaths.indexOf(convertedPath); | ||
@@ -26,2 +30,3 @@ if (index !== -1) { | ||
} | ||
exports.throwErrorIfDuplicatePaths = throwErrorIfDuplicatePaths; | ||
function getPaths(controllerClass, operation, controllers) { | ||
@@ -28,0 +33,0 @@ const paths = {}; |
{ | ||
"name": "@foal/core", | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"description": "A Node.js and TypeScript framework, all-inclusive.", | ||
@@ -91,4 +91,4 @@ "main": "./lib/index.js", | ||
"devDependencies": { | ||
"@foal/ejs": "^1.11.1", | ||
"@foal/internal-test": "^1.11.1", | ||
"@foal/ejs": "^1.11.2", | ||
"@foal/internal-test": "^1.11.2", | ||
"@types/mocha": "~2.2.43", | ||
@@ -114,3 +114,3 @@ "@types/node": "~10.1.2", | ||
}, | ||
"gitHead": "3dec926f141773926de45e44457216146647e48f" | ||
"gitHead": "f1b3749d6e1c03b24205735faf5ebbfe653f7553" | ||
} |
353947
8955