Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion functions #388

Merged
merged 8 commits into from Aug 9, 2023

Conversation

joshfried-aws
Copy link
Contributor

Issue #, if available:
#312

Description of changes:
This PR adds the ability to apply the following conversion functions

  1. strings/floats-> ints
  2. strings/ints -> floats
  3. strings -> bools
  4. bools/floats/ints -> strings

This allows customers the ability to easily convert properties from schemas that may be better evaluated as a type other than the type defined in the schema (for example Min/MaxSize for AutoScalingGroups are string types, but it is helpful to evaluate them as numbers)


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

guard/src/rules/functions/converters.rs Outdated Show resolved Hide resolved
guard/src/rules/functions/converters.rs Outdated Show resolved Hide resolved
guard/src/rules/functions/converters.rs Outdated Show resolved Hide resolved
guard/src/rules/functions/converters.rs Show resolved Hide resolved
@Brianwithay21 Brianwithay21 self-requested a review August 9, 2023 19:37
@joshfried-aws joshfried-aws merged commit c38c942 into aws-cloudformation:main Aug 9, 2023
8 checks passed
@joshfried-aws joshfried-aws mentioned this pull request Aug 9, 2023
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.

None yet

3 participants