Skip to content

Conversation

@jdschleicher
Copy link
Owner

@jdschleicher jdschleicher commented Jul 10, 2025

Motivation and Context

When generating recipes based on source code, there tends to be references to standardValueSets that require extra efforts to get their associated picklist values in a faker function because the OOTB standard value sets are picklists WITHOUT any necessary xml markup capturing what values make up the picklist.

This feature created a dedicated field api name to picklist values to allow for local management of OOTB standardPicklistValues.

It's not an exhaustive list but is a start and can be easily added on to.

Any Technical Decisions to Note??

It took some fiddling to get there but the approach is simple --> if 'available picklist values' do not exist, then pass the field api name to the standard value set map, if nothing comes back from there, it is more than likely a global value set or a not-yet detailed standard value set

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 change)
  • Documentation update
  • Other (please describe):

How Has This Been Tested?

  • Tested on Windows
  • Tested on macOS
  • Tested on Linux
  • Added new unit tests
  • Updated existing tests

Test Details

Existing unit test structure allowed for adjustments and experimentation with how the solution would be solved.

New unit tests were added that leveraged expected mock XML markup that had no picklist value detail, and based on that scenario, would be sent to the standard value set map and, if an expected OOTB api name listed, would return expected picklist options

Checklist

  • Pull Request title captures expected version update
  • package.json version number updated
  • I have performed a self-review of my own 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

Changelog for branch: feature/standardValueSets

Generated on: 2025-08-01

Summary

  • Total commits: 13
  • Files added: 2
  • Files modified: 9
  • Files deleted: 0
  • Files renamed: 0

Changes at a glance

Added Files

Added File Commits History
src/treecipe/src/RecipeService/tests/FakerJSRecipeService.test.ts 3 View Full History
src/treecipe/src/ValueSetService/ValueSetService.ts 3 View Full History

Modified Files

Modified File Commits History
package-lock.json 2 View Full History
package.json 1 View Full History
src/treecipe/src/FakerRecipeProcessor/SnowfakeryRecipeProcessor/SnowfakeryRecipeProcessor.ts 1 View Full History
src/treecipe/src/RecipeFakerService.ts/FakerJSRecipeFakerService/FakerJSRecipeFakerService.ts 3 View Full History
src/treecipe/src/RecipeFakerService.ts/FakerJSRecipeFakerService/tests/FakerJSRecipeFakerService.test.ts 2 View Full History
src/treecipe/src/RecipeFakerService.ts/SnowfakeryRecipeFakerService/SnowfakeryRecipeFakerService.ts 4 View Full History
src/treecipe/src/RecipeService/RecipeService.ts 3 View Full History
src/treecipe/src/RecipeService/tests/RecipeService.test.ts 3 View Full History
src/treecipe/src/XMLProcessingService/tests/mocks/XMLMarkupMockService.ts 4 View Full History

Deleted Files

Deleted File Commits History

Renamed Files

Old Path New Path Commits History

@jdschleicher jdschleicher changed the title Feature/standard value sets Feature : 2.4.0 -- Feature/standard value sets Aug 1, 2025
@jdschleicher jdschleicher marked this pull request as ready for review August 1, 2025 08:58
@jdschleicher jdschleicher merged commit 302c79c into main Aug 1, 2025
2 checks passed
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