@weclapp/sdk 2.0.0-dev.6 → 2.0.0-dev.7
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/dist/cli.js +11 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -386,11 +386,19 @@ const generateEntities = (schemas, enums) => {
|
|
|
386
386
|
const meta = isRelatedEntitySchema(property) ? property['x-weclapp'] : {};
|
|
387
387
|
if (meta.entity) {
|
|
388
388
|
const type = `${pascalCase(meta.entity)}[]`;
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
if (schemas.has(meta.entity)) {
|
|
390
|
+
referenceInterface.push({ name, type, required: true });
|
|
391
|
+
filterInterface.push({ name: meta.entity, type, required: true });
|
|
392
|
+
}
|
|
391
393
|
}
|
|
392
394
|
if (meta.service) {
|
|
393
|
-
|
|
395
|
+
if (schemas.has(meta.service)) {
|
|
396
|
+
referenceMappingsInterface.push({
|
|
397
|
+
name,
|
|
398
|
+
type: generateString(meta.service),
|
|
399
|
+
required: true,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
394
402
|
}
|
|
395
403
|
const type = convertToTypeScriptType(property, name).toString();
|
|
396
404
|
const comment = isNonArraySchemaObject(property) ?
|