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

Remove support for component type specific child attributes #1896

Open
ml019 opened this issue Dec 24, 2021 · 0 comments
Open

Remove support for component type specific child attributes #1896

ml019 opened this issue Dec 24, 2021 · 0 comments

Comments

@ml019
Copy link
Contributor

ml019 commented Dec 24, 2021

Expected Behaviour

The type of a component should be controlled via a mandatory Type attribute. With this in place, there is no requirement for type specific child attributes. Thus these can be removed and the overall depth of a hamlet solution reduced.

Similarly for links, the selection of subcomponents should be achieved via the use of the Subcomponent attribute and support for the component specific attributes removed. The Type attribute should also be used for resolution of any link conflicts to identically named subcomponents, and also to set the expectation of the target of the link.

Current Behaviour

The type can be specified either through the Type attribute or via specifically named child attributes.

Similarly links support both the Subcomponent attribute and subcomponent type specific attributes.

Possible Solution

  • change the component type detection local to rely solely on the Type attribute
  • change the link subcomponent target specification to be the Subcomponent attribute
  • would require all solutions to be upgraded to use this approach - hence the need for a breaking version

Context

  • reduce the nesting required in a solution file
  • remove the need to constantly extent the schema for links
  • provide consistency and "one way of doing things"
  • enable the use of more advanced JSON schema techniques where content can be driven off the value of an attribute
@ml019 ml019 changed the title Remove support for the Remove support for component type specific child attributes Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant