Skip to content

feat: scaffolding for improved pass-throughs in schema#3055

Merged
hoffa merged 6 commits into
aws:developfrom
hoffa:passthrough-schema
Mar 23, 2023
Merged

feat: scaffolding for improved pass-throughs in schema#3055
hoffa merged 6 commits into
aws:developfrom
hoffa:passthrough-schema

Conversation

@hoffa

@hoffa hoffa commented Mar 23, 2023

Copy link
Copy Markdown
Contributor

Issue #, if available

Description of changes

Scaffolding to partly address limitation (3) in #2645:

Pass-through values are not validated. Pass-through properties (e.g. AccessLogSettings) are passed directly to underlying CloudFormation resources.

So instead of using the documentation from SAM, for pass-through properties we use the documentation straight from the source: from the actual property being passed-through to.

This means pass-through properties get accurate types, even for nested pass-throughs. Previously it would accept anything.

Before

Screenshot 2023-03-23 at 13 56 56

After

Screenshot 2023-03-23 at 13 56 42

Description of how you validated changes

Used schema modeline in VS Code, played around with templates that previously wouldn't have supported pass-throughs. With this change it shows the documentation straight from the source property.

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hoffa
hoffa marked this pull request as ready for review March 23, 2023 20:51
@hoffa
hoffa requested a review from a team as a code owner March 23, 2023 20:51

@GavinZZ GavinZZ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@hoffa
hoffa merged commit de9673e into aws:develop Mar 23, 2023
@hoffa
hoffa deleted the passthrough-schema branch March 23, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants