Closed lonely-lockley closed 9 months ago
Current thoughts on import syntax. A choice has to be done between a more verbose, but explicit or shorter, but probably less clear to a user option.
Suppose, there's a container diagram for system test:
container test
service one
name = ...
Then an explicit named import would look like this with alias:
container another
import test in container one as externalService
And without an alias if it does not clash with other id's in current file:
container another
import test2 from context two
Declared imported id's then may be referenced in links as regular id's:
container another
import test from container one as externalService
import test2 from context two
service two
name = ...
links:
-> container externalService
-> test2
Or implicit anonymous import with shorter syntax
container another
service two
name = ...
links:
-> test from container one
Finally, I decided to implement both options to be more flexible
A good way to control diagram integrity is a file import. The suggestesd syntax for this issue looks like `import . as '
Import for the same project id must be prohibited.
Import should be allowed for the same or higher level. This means: one can import context level to container, but it is impossible to make inverse import.
Linker in Translator service must parse and check integrity for all imported files.
Imported elements must be treated as external on diagram.