Question about attributeContext
Looking at schema.cdm.json it seems the attributeContext 'type' must be constrained to the following values:
"type": {
"enum": [
"entity",
"extendedEntity",
"attributeGroup",
"entityAsAttribute"
]
}
[ref]
Yet, in the object model the list is quite a bit larger, e.g. for TypeScript:
export enum cdmAttributeContextType {
entity,
entityReferenceExtends,
attributeDefinition,
attributeExcluded,
attributeGroup,
generatedSet,
generatedRound,
addedAttributeNewArtifact,
addedAttributeSupporting,
addedAttributeIdentity,
addedAttributeSelectedType,
addedAttributeExpansionTotal,
passThrough,
projection,
source,
operations,
operationAddCountAttribute,
operationAddSupportingAttribute,
operationAddTypeAttribute,
operationExcludeAttributes,
operationArrayExpansion,
operationCombineAttributes,
operationRenameAttributes,
operationReplaceAsForeignKey,
operationIncludeAttributes,
operationAddAttributeGroup,
operationAlterTraits,
operationAddArtifactAttribute,
unknown
}
[ref]
How come? It would seem that is I define an attributeContext of type entityReferenceExtends validation against the schema would fail...?
@miroslavplese would you know?
Hi @perdasilva , it looks like the schema.cdm.json file was just not updated as other CdmAttributeContextTypes were added. Feel free to update the schema.cdm.json file on your side if it is causing issues for you.
It's just a worry that the the tools can produce cdm that doesn't conform to the CDM schema XD
We plan on updating this in the future, but we do not currently have an ETA on it
This fix has been merged in.