@tsed/schema
Advanced tools
Comparing version 6.3.4 to 6.4.0
@@ -5,9 +5,14 @@ "use strict"; | ||
const change_case_1 = require("change-case"); | ||
const DEFAULT_PATTERN = "%c.%m"; | ||
/** | ||
* @ignore | ||
*/ | ||
function operationIdFormatter(pattern = "%c.%m") { | ||
function operationIdFormatter(pattern = "") { | ||
const OPERATION_IDS = new Map(); | ||
const transform = (name, propertyKey) => { | ||
const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey); | ||
return pattern === "" ? change_case_1.camelCase(str) : str; | ||
}; | ||
return (name, propertyKey, path = "") => { | ||
const operationId = change_case_1.camelCase(pattern.replace(/%c/, name).replace(/%m/, propertyKey)); | ||
const operationId = transform(name, propertyKey); | ||
const operationKey = name + propertyKey; | ||
@@ -14,0 +19,0 @@ if (!OPERATION_IDS.has(operationKey)) { |
{ | ||
"name": "@tsed/schema", | ||
"version": "6.3.4", | ||
"version": "6.4.0", | ||
"description": "JsonSchema module for Ts.ED Framework", | ||
@@ -18,4 +18,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@tsed/core": "6.3.4", | ||
"@tsed/openspec": "6.3.4", | ||
"@tsed/core": "6.4.0", | ||
"@tsed/openspec": "6.4.0", | ||
"change-case": "4.1.1", | ||
@@ -22,0 +22,0 @@ "tslib": "2.0.1" |
Sorry, the diff of this file is not supported yet
535822
9842
+ Added@tsed/core@6.4.0(transitive)
+ Added@tsed/openspec@6.4.0(transitive)
- Removed@tsed/core@6.3.4(transitive)
- Removed@tsed/openspec@6.3.4(transitive)
Updated@tsed/core@6.4.0
Updated@tsed/openspec@6.4.0