Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about attributeContext #385

Open
perdasilva opened this issue Sep 15, 2024 · 3 comments
Open

Question about attributeContext #385

perdasilva opened this issue Sep 15, 2024 · 3 comments

Comments

@perdasilva
Copy link

perdasilva commented Sep 15, 2024

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
Copy link
Author

@miroslavplese would you know?

@mafrisci
Copy link
Collaborator

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.

@perdasilva
Copy link
Author

It's just a worry that the the tools can produce cdm that doesn't conform to the CDM schema XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants