Adds a new --generate option that accepts a "generation aspect" argument, and can be specified multiple times. The available aspects are:
project-files - files like build.gradle.kts or Service.csproj
client-constructors - externally defined [wrapped] client constructors, and similar top-level Dafny module boilerplate (open to a better name for this one)
impl-stubs - stubbed out Dafny concrete operations modules and tests.
These options make it much quicker to create new libraries, especially new TestModels. The last option is intended to be used once to get started on files that do have to be manually edited, but the other two can be left on more permanently.
I set up a templated file mechanism for all these kinds of assets, since they are mostly static content with just a few pieces that depend on the service name/sdkID and other parameters. It uses the shared AbstractCodeWriter templating mechanism from the core Smithy implementation.
Also used this to generate the missing files to make Timestamp work for .NET (it doesn't work yet for Java because of some apparent confusion over Date vs. Instant)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes:
Adds a new
--generate
option that accepts a "generation aspect" argument, and can be specified multiple times. The available aspects are:project-files
- files likebuild.gradle.kts
orService.csproj
client-constructors
- externally defined [wrapped] client constructors, and similar top-level Dafny module boilerplate (open to a better name for this one)impl-stubs
- stubbed out Dafny concrete operations modules and tests.These options make it much quicker to create new libraries, especially new TestModels. The last option is intended to be used once to get started on files that do have to be manually edited, but the other two can be left on more permanently.
I set up a templated file mechanism for all these kinds of assets, since they are mostly static content with just a few pieces that depend on the service name/sdkID and other parameters. It uses the shared
AbstractCodeWriter
templating mechanism from the core Smithy implementation.Also used this to generate the missing files to make
Timestamp
work for .NET (it doesn't work yet for Java because of some apparent confusion overDate
vs.Instant
)By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.