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 · 6 comments
Open

Vocabularies don't support namespace-scoped decorators #858

mttrbrts opened this issue Jun 9, 2024 · 6 comments
Assignees
Labels
Type: Enhancement ✨ Improvement to process or efficiency

Comments

@mttrbrts
Copy link
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: acme.hr@1.0.0
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: acme.hr@1.0.0
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": "org.accordproject.decoratorcommands@0.3.0.Command",
                "type": "UPSERT",
                "target": {
                    "$class": "org.accordproject.decoratorcommands@0.3.0.CommandTarget",
                    "namespace": "test@1.0.0"
}

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
Contributor

dselman commented Oct 9, 2024

@sanketshevkar can this now be closed?

Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 15, 2024
@DianaLease DianaLease added Type: Enhancement ✨ Improvement to process or efficiency and removed Stale labels Dec 18, 2024
@DianaLease
Copy link
Member

@mttrbrts is this still relevant?

@sanketshevkar
Copy link
Member

My PR just fixed the issue with decoration of a namespace targeted decorater command. We still don't have YAML support to declare a vocabularies for a namespace.

@DibyamAgrawal
Copy link
Contributor

@sanketshevkar Can you please assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement ✨ Improvement to process or efficiency
Projects
None yet
Development

No branches or pull requests

5 participants