Skip to content

Add Validators and Transformers - #409

Merged
Brandon Foley (bfoley13) merged 11 commits into
mainfrom
brfole/validateandtransform
Nov 4, 2024
Merged

Add Validators and Transformers#409
Brandon Foley (bfoley13) merged 11 commits into
mainfrom
brfole/validateandtransform

Conversation

@bfoley13

@bfoley13 Brandon Foley (bfoley13) commented Oct 21, 2024

Copy link
Copy Markdown
Member

Description

Add Validators and Transformers into the DraftConfig GetVariableValue logic. This will allow validating and transforming variable input based on the defined kind within the DraftConfig.

Added ConditionalRef onto the BuilderVar, which can act as a reference to another variable that can affect the validation and transformation of the associated variable.

Migrated the rest of the templates and added some more validation on the template names.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Refactor

How Has This Been Tested?

Provide instructions so we can reproduce, and list any relevant details for your test configuration. Please mention if this is a breaking change which will impact consuming tool(s).

  • Unit Test:
  • E2E Test:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@bfoley13
Brandon Foley (bfoley13) marked this pull request as ready for review October 21, 2024 15:50

@Vidya2606 Vidya Reddy (Vidya2606) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

Comment thread pkg/config/draftconfig_template_test.go
Comment thread pkg/config/draftconfig_template_test.go Outdated
Comment thread pkg/config/draftconfig_template_test.go
@bfoley13
Brandon Foley (bfoley13) enabled auto-merge (squash) November 4, 2024 18:37
@bfoley13
Brandon Foley (bfoley13) merged commit dd66d6e into main Nov 4, 2024
@bfoley13
Brandon Foley (bfoley13) deleted the brfole/validateandtransform branch November 4, 2024 19: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