@tsed/schema 6.76.0 → 6.77.0
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/decorators/common/jsonEntityFn.d.ts +1 -1
- package/lib/domain/JsonEntityStore.d.ts +1 -1
- package/lib/index.js +12 -4
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +12 -4
- package/lib/index.modern.js.map +1 -1
- package/lib/utils/getJsonEntityStore.d.ts +4 -1
- package/package.json +5 -5
package/lib/index.modern.js
CHANGED
|
@@ -176,11 +176,22 @@ function execMapper(type, schema, options) {
|
|
|
176
176
|
*/
|
|
177
177
|
const JsonEntitiesContainer = new Map();
|
|
178
178
|
|
|
179
|
+
/**
|
|
180
|
+
* @ignore
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
function isJsonEntityStore(model) {
|
|
184
|
+
return model.isStore;
|
|
185
|
+
}
|
|
179
186
|
/**
|
|
180
187
|
* @ignore
|
|
181
188
|
*/
|
|
182
189
|
|
|
183
190
|
function getJsonEntityStore(...args) {
|
|
191
|
+
if (isJsonEntityStore(args[0])) {
|
|
192
|
+
return args[0];
|
|
193
|
+
}
|
|
194
|
+
|
|
184
195
|
const store = Store.from(...args);
|
|
185
196
|
|
|
186
197
|
if (!store.has("JsonEntityStore")) {
|
|
@@ -197,9 +208,6 @@ function getJsonEntityStore(...args) {
|
|
|
197
208
|
|
|
198
209
|
return store.get("JsonEntityStore");
|
|
199
210
|
}
|
|
200
|
-
function isJsonEntityStore(model) {
|
|
201
|
-
return model.isStore;
|
|
202
|
-
}
|
|
203
211
|
|
|
204
212
|
class JsonLazyRef {
|
|
205
213
|
constructor(getType) {
|
|
@@ -2870,7 +2878,7 @@ function get$1(entity, options) {
|
|
|
2870
2878
|
}
|
|
2871
2879
|
|
|
2872
2880
|
function getJsonSchema(model, options = {}) {
|
|
2873
|
-
const entity =
|
|
2881
|
+
const entity = getJsonEntityStore(model);
|
|
2874
2882
|
options = _extends({
|
|
2875
2883
|
endpoint: true,
|
|
2876
2884
|
groups: []
|