@tsed/schema 6.73.1 → 6.73.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/domain/JsonEntityStore.d.ts +9 -9
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +6 -6
- package/lib/index.modern.js.map +1 -1
- package/package.json +5 -5
package/lib/index.modern.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { constantCase, pascalCase, camelCase } from 'change-case';
|
|
2
|
-
import { Store, decoratorTypeOf, nameOf, isFunction, cleanObject, isPromise, isClass, isSymbol, isPrimitiveOrPrimitiveClass, isClassObject, isDate, isCollection, classOf, isArrowFn, primitiveOf, isArray, Hooks, uniq, isObject, uniqBy, deepMerge, toMap, Entity, DecoratorTypes, descriptorOf, Metadata, isPrimitiveClass, ancestorsOf, mergeReducerBuilder, UnsupportedDecoratorType, decorateMethodsOf, isString,
|
|
2
|
+
import { Store, decoratorTypeOf, nameOf, isFunction, cleanObject, isPromise, isClass, isSymbol, isPrimitiveOrPrimitiveClass, isClassObject, isDate, isCollection, classOf, isArrowFn, primitiveOf, isArray, Hooks, uniq, isObject, uniqBy, deepMerge, toMap, Entity, DecoratorTypes, descriptorOf, Metadata, isPlainObject, isPrimitiveClass, ancestorsOf, mergeReducerBuilder, UnsupportedDecoratorType, decorateMethodsOf, isString, isNumber, useDecorators, StoreSet } from '@tsed/core';
|
|
3
3
|
import micromatch from 'micromatch';
|
|
4
4
|
|
|
5
5
|
const HTTP_STATUS_MESSAGES = {
|
|
@@ -2217,7 +2217,11 @@ class JsonEntityStore extends Entity {
|
|
|
2217
2217
|
if (isCollection(type)) {
|
|
2218
2218
|
this.collectionType = type;
|
|
2219
2219
|
} else {
|
|
2220
|
-
this._type = type;
|
|
2220
|
+
this._type = type; // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)
|
|
2221
|
+
|
|
2222
|
+
if (this._type && isPlainObject(this._type)) {
|
|
2223
|
+
this._type = String;
|
|
2224
|
+
}
|
|
2221
2225
|
}
|
|
2222
2226
|
}
|
|
2223
2227
|
|
|
@@ -7312,10 +7316,6 @@ function Name(name) {
|
|
|
7312
7316
|
store.parameter.name(name);
|
|
7313
7317
|
break;
|
|
7314
7318
|
|
|
7315
|
-
case DecoratorTypes.METHOD:
|
|
7316
|
-
store.operation.name(name);
|
|
7317
|
-
break;
|
|
7318
|
-
|
|
7319
7319
|
default:
|
|
7320
7320
|
store.parent.schema.addAlias(args[1], name);
|
|
7321
7321
|
}
|