@sap-ux/annotation-converter
Advanced tools
Comparing version 0.6.0 to 0.6.1
# @sap-ux/annotation-converter | ||
## 0.6.1 | ||
### Patch Changes | ||
- 946cf8f: Annotations on properties of a ComplexType are now resolved | ||
## 0.6.0 | ||
@@ -4,0 +10,0 @@ |
@@ -32,2 +32,3 @@ "use strict"; | ||
function resolveTarget(converter, startElement, path, annotationsTerm) { | ||
var _a; | ||
// absolute paths always start at the entity container | ||
@@ -60,4 +61,6 @@ if (path.startsWith('/')) { | ||
else if (startElement._type === 'Property') { | ||
// property: start at the entity type the property belongs to | ||
startElement = converter.getConvertedEntityType((0, utils_1.substringBeforeFirst)(startElement.fullyQualifiedName, '/')); | ||
// property: start at the entity type or complex type the property belongs to | ||
const parentElementFQN = (0, utils_1.substringBeforeFirst)(startElement.fullyQualifiedName, '/'); | ||
startElement = | ||
(_a = converter.getConvertedEntityType(parentElementFQN)) !== null && _a !== void 0 ? _a : converter.getConvertedComplexType(parentElementFQN); | ||
} | ||
@@ -64,0 +67,0 @@ const result = pathSegments.reduce((current, segment) => { |
{ | ||
"name": "@sap-ux/annotation-converter", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "SAP Fiori OData - Annotation converter", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -116,4 +116,6 @@ import type { | ||
} else if (startElement._type === 'Property') { | ||
// property: start at the entity type the property belongs to | ||
startElement = converter.getConvertedEntityType(substringBeforeFirst(startElement.fullyQualifiedName, '/')); | ||
// property: start at the entity type or complex type the property belongs to | ||
const parentElementFQN = substringBeforeFirst(startElement.fullyQualifiedName, '/'); | ||
startElement = | ||
converter.getConvertedEntityType(parentElementFQN) ?? converter.getConvertedComplexType(parentElementFQN); | ||
} | ||
@@ -120,0 +122,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
304110
4491