@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.
@@ -16,28 +16,28 @@ export declare class JsonEntityStore extends Entity implements JsonEntityStoreOp
16
16
  * Path used to generate open spec.
17
17
  */
18
18
  path: string;
19
+ constructor(options: JsonEntityStoreOptions);
19
20
  /**
20
21
  * Ref to JsonSchema
21
22
  */
22
23
  protected _schema: JsonSchema;
23
24
  /**
24
- * Ref to JsonOperation when the decorated object is a method.
25
- */
26
- protected _operation: JsonOperation;
27
- /**
28
- * Ref to JsonParameter when the decorated object is a parameter.
25
+ * Return the JsonSchema
29
26
  */
30
- protected _parameter: JsonParameter;
27
+ get schema(): JsonSchema;
31
28
  [key: string]: any;
32
- constructor(options: JsonEntityStoreOptions);
33
29
  /**
34
- * Return the JsonSchema
30
+ * Ref to JsonOperation when the decorated object is a method.
35
31
  */
36
- get schema(): JsonSchema;
32
+ protected _operation: JsonOperation;
37
33
  /**
38
34
  * Return the JsonOperation
39
35
  */
40
36
  get operation(): JsonOperation | undefined;
37
+ /**
38
+ * Ref to JsonParameter when the decorated object is a parameter.
39
+ */
40
+ protected _parameter: JsonParameter;
41
41
  /**
42
42
  * Return the JsonParameter
43
43
  */
package/lib/index.js CHANGED
@@ -2221,7 +2221,11 @@ class JsonEntityStore extends core.Entity {
2221
2221
  if (core.isCollection(type)) {
2222
2222
  this.collectionType = type;
2223
2223
  } else {
2224
- this._type = type;
2224
+ this._type = type; // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)
2225
+
2226
+ if (this._type && core.isPlainObject(this._type)) {
2227
+ this._type = String;
2228
+ }
2225
2229
  }
2226
2230
  }
2227
2231
 
@@ -7315,10 +7319,6 @@ function Name(name) {
7315
7319
  store.parameter.name(name);
7316
7320
  break;
7317
7321
 
7318
- case core.DecoratorTypes.METHOD:
7319
- store.operation.name(name);
7320
- break;
7321
-
7322
7322
  default:
7323
7323
  store.parent.schema.addAlias(args[1], name);
7324
7324
  }