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

If a declaration is named "properties" then we can't write a valid vocabulary for it #982

Open
jamieshorten opened this issue Jan 30, 2025 · 0 comments

Comments

@jamieshorten
Copy link
Collaborator

jamieshorten commented Jan 30, 2025

Bug Report 🐛

If we have a model like

@Test2('world')
namespace [email protected]
@Term('A nice properties term')
concept properties {
  @Term('A cool string')
  o String someString
}

and run concerto extract-decorators --models MODEL.cto --removeDecoratorsFromSource true we get the following vocabulary.yml:

locale: en
namespace: [email protected]
declarations:
  - properties: A nice properties term
    properties:
      - someString: A cool string

Correct me if I'm missing something but that is an invalid YAML file due to the duplicated properties key. Trying to apply this vocab gives:

concerto decorate --models com.example.e2e.a.cto --vocabulary vocabulary_0.yml
10:29:53 - ERROR: YAMLParseError: Map keys must be unique at line 5, column 5:

  - properties: A nice properties term
    properties:

Expected Behavior

I'm not sure how/if we should handle this case or if there is a way to write a vocab for the properties concept in the above model.

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

1 participant