CDM icon indicating copy to clipboard operation
CDM copied to clipboard

Question about attributeContext

Open perdasilva opened this issue 5 months ago • 4 comments

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...?

perdasilva avatar Sep 15 '24 20:09 perdasilva