Open chris-volk opened 8 months ago
In cli version:2.2.2 - was added behavior - wen provided file contains all what required for define aspect - it can be loaded from folder without namespace rules. From version 2.4.1, we support a default namespace's folder - which means if the required file was placed in a folder that does not match the namespace's rules, Model Resolver takes this folder as default ":" namespace and will try to find any ":resources" in the folder. Other namespaces will be resolved as usual, starting from the folder. @chris-volk Is this the behavior that is expected here? Or something else?
Is your task related to a problem? Please describe. Currently, when using the SAMM CLI with an individual Aspect Model (ttl file), an intuitive attempt is:
samm aspect AspectModel.ttl validate
This attempt fails since the clearly given input file will not be used since it is not in a folder complying with the namespaces, see https://eclipse-esmf.github.io/esmf-developer-guide/tooling-guide/samm-cli.html#models-directory-structure . For explaining this better to new users, there is the issue https://github.com/eclipse-esmf/esmf-sdk/issues/421 . Still, the issue means that users have to restructure everything into a chain of subfolders.
Describe the solution you'd like What a user naively wants is clearly "this is my single file, why don't you just do it", and in a case of "this is my folder with all the files where one is my input file and the others may be referenced, why don't you just do it".
For experienced users, a custom model resolution via script is possible (also for inclusion in pipelines), see https://github.com/eclipse-esmf/esmf-sdk/issues/98 .
Things to consider for a solution:
Describe alternatives you've considered It may be a consideration to (apart from "single files should alway work") craft a dedicated solution for the typical solution of github, i.e. allow the input of a github url containing a file and resolve it along the github repository (only if done correctly according to https://eclipse-esmf.github.io/esmf-developer-guide/tooling-guide/samm-cli.html#models-directory-structure or also if messy? see fuzzy search above ...)