@gavdi/cap-mcp 1.3.0 → 1.3.1
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.
|
@@ -133,11 +133,9 @@ function constructResourceAnnotation(serviceName, target, annotations, definitio
|
|
|
133
133
|
const computedFields = new Set(Object.entries(model.definitions?.[entityTarget].elements ?? {})
|
|
134
134
|
.filter(([_, v]) => new Map(Object.entries(v).map(([key, value]) => [key.toLowerCase(), value])).get("@core.computed"))
|
|
135
135
|
.map(([k, _]) => k));
|
|
136
|
-
console.log("I AM TRYING TO PARSE", model.definitions);
|
|
137
136
|
const omittedFields = new Set(Object.entries(model.definitions?.[entityTarget].elements ?? {})
|
|
138
137
|
.filter(([_, v]) => v[constants_1.MCP_OMIT_PROP_KEY])
|
|
139
138
|
.map(([k, _]) => k));
|
|
140
|
-
console.log("OMITTED FIELDS", omittedFields);
|
|
141
139
|
const { properties, resourceKeys, propertyHints } = (0, utils_1.parseResourceElements)(definition, model);
|
|
142
140
|
const restrictions = (0, utils_1.parseCdsRestrictions)(annotations.restrict, annotations.requires);
|
|
143
141
|
return new structures_1.McpResourceAnnotation(annotations.name, annotations.description, target, serviceName, functionalities, properties, resourceKeys, foreignKeys, annotations.wrap, restrictions, computedFields, propertyHints, omittedFields);
|