@ui5/task-adaptation
Version:
Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment
14 lines • 546 B
JavaScript
import MetadataJsonUtil from "../converter/metadataJsonUtil.js";
export default class RemoveAllSchemaNodesExceptAnnotations {
transform({ json }) {
const schema = MetadataJsonUtil.getSchemaNode(json);
for (const key of Object.keys(schema)) {
if (key !== "_attributes" && key !== "Annotations") {
delete schema[key];
}
}
return json;
// TODO: remove also references not used in annotations
}
}
//# sourceMappingURL=removeAllSchemaNodesExceptAnnotations.js.map