Open kubukoz opened 1 month ago
Are you looking for more than what's exposed in the SmithyBuildConfig
class? If so, can you elaborate on what differences you're looking for?
yes, I looked at the class, and it's useful as a way of reading the build files, but one still has to implement the loading of such a build config into a model - that's the missing part (as far as I can tell).
so, in pseudocode:
Path file = ...;
SmithyBuildConfig bc = SmithyBuildConfig.load(file);
// we don't have this
Model model = Model.fromBuildConfig(bc).assemble().unwrap();
// alternative syntax
Model model = bc.load().assemble().unwrap();
// another one
Model model = SmithyBuildConfig.load(bc).assemble().unwrap()
// also, the methods currently are shown to return ModelAssembler, but maybe it makes sense to return a ValidatedResult<Model> instead.
There are a lot of tools that could be built on top of Smithy, which would use
smithy-build.json
as the source of information about a model.Currently, in order to do so they would have to either:
I think it would be beneficial for the ecosystem to have more out-of-the-box support for loading a build config into a model. Presumably, this would have to be part of
smithy-build
.