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

Feat(Custom Variables) #101

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Feat(Custom Variables) #101

wants to merge 11 commits into from

Conversation

bshutterkion
Copy link
Collaborator

No description provided.

bshutterkion and others added 6 commits November 8, 2024 15:23
…s and improve error handling

- Added retrieval of custom variable type from API before processing values.
- Modified `UnpackCvValueJsonStr` and `PackCvValueIntoJsonStr` functions to handle string, list, and map types.
- Enhanced error messages for better diagnostics.
- Updated schema to support `default_value_list` and `default_value_map` fields.
- Improved data handling during read and update operations for `resourceCustomVariable`.

This update ensures that custom variable overrides and operations are processed according to their types, enhancing robustness and type-specific handling.
…variable types

- Updated `PackCvValueIntoJsonStr` and `UnpackCvValueJsonStr` to streamline handling for `string`, `list`, and `map` types.
- Enhanced JSON validation for lists and maps, ensuring input adheres to expected types.
- Introduced new schema fields (`value_list`, `value_map`) for handling lists and maps distinctly in `resourceCustomVariableOverride`.
- Adjusted `resourceCustomVariable` to use `default_value_string`, `default_value_list`, and `default_value_map` for clarity.
- Improved error messaging and handling to support comprehensive type checks and transformations.
…nctions

Refactored functions to use hc.HandleError for consistent error handling and reduced code duplication. Replaced diag.Diagnostic with concise error handling and used hc.SafeSet for secure value setting in resource data.
Replaced single `value` field with distinct fields (`value_string`, `value_list`, `value_map`) for more precise type handling. Updated schema and logic for consistent handling of different data types in custom variable overrides.
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.

1 participant