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

Vocabularies don't support namespace-scoped decorators #858

Open
mttrbrts opened this issue Jun 9, 2024 · 2 comments
Open

Vocabularies don't support namespace-scoped decorators #858

mttrbrts opened this issue Jun 9, 2024 · 2 comments

Comments

@mttrbrts
Copy link
Sponsor Member

mttrbrts commented Jun 9, 2024

Bug Report 🐛

The following model definition is valid...

@Term("My HR Model")
@Term_description("Reusable data definitions for the HR department.")
namespace acme.hr@1.0.0

When applying the extract-decorators command

concerto extract-decorators --model hr.cto --removeDecoratorsFromSource 

Produces a vocabulary file:

locale: en
namespace: [email protected]
declarations:
  - : My HR Model
    description: Reusable data definitions for the HR department.

Expected Behavior

I would expect a vocabulary file such as this:

locale: en
namespace: [email protected]
term: My HR Model
description: Reusable data definitions for the HR department.
declarations:
   ...

Possible Solution

  1. The @accordproject/concerto-vocabulary package should be updated to support namespace-scoped decorators
@sanketshevkar
Copy link
Member

How do we setup target for setting decorator on a model namespace? My assumption was target would look like this.

 {
                "$class": "[email protected]",
                "type": "UPSERT",
                "target": {
                    "$class": "[email protected]",
                    "namespace": "[email protected]"
}

But when I tried it out in code. It just applied the decorator on top of all the declarations and not on the namespace.
https://replit.com/@sanketshevkar/AccordProjectConcerto-Decorator-Command-Set#index.js

@dselman
Copy link
Sponsor Contributor

dselman commented Oct 9, 2024

@sanketshevkar can this now be closed?

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

3 participants