johnstonskj / rust-atelier

Rust native core model for the AWS Smithy IDL
MIT License
77 stars 11 forks source link

Enable linting and validating models built from multiple input files #26

Closed stevelr closed 3 years ago

stevelr commented 3 years ago

If a smithy model file contains use statements that depend on shapes defined in other model files, cargo-atelier's lint and validate commands will generate fatal errors because of undefined shapes. If you concatenate all the model files that together define all the relevant shapes, it also fails, because the parser doesn't accept a file with multiple namespace declarations.

Atelier Models have the ability to merge multiple input sources into a single model, but not from the cli.

This PR makes the merge capability available from the command line by updating lint, validate, document, and transform commands to accept multiple input files.

All input files must be the same format (smithy). If multiple input files are attempted for json or another input file format, cargo-atelier reports an error and stops.

johnstonskj commented 3 years ago

Completed using model assembler.