Generate: Use rendered provider name instead of provider name in default templates #492
+40
−29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Fixes #177
Description
The
--rendered-provider-name
flag is an optional flag for thegenerate
command to provide an alternative provider name for rendering templates. Currently, this rendered provider name is not used in any of the default templates and is only used to supply a value to the.RenderedProviderName
template function.This PR replaces all uses of
.ProviderName
in the default templates with.RenderedProviderName
. Since the rendered provider name defaults to the provider name, this change should have no regressions for existing users who are not using the--rendered-provider-name
flag.Also, the
.ProviderShortName
function which is used in the default provider template, will now use the rendered provider name as a basis to generate the short name instead of the provider name.Given the following CLI input:
.ProviderShortName
should now returnScaffolding
(derived from--rendered-provider-name
) instead ofscaffolding
(derived from--provider-name
).Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.