🌿 Fern Regeneration -- April 23, 2026#139
Merged
Merged
Conversation
The API spec now emits proper registered enums for RuleType, ConditionType, MetricPeriod, MetricPeriodMonthReset, and ComparableOperator instead of per-field inline string aliases. Update hand-written RulesEngine and Cache code, plus tests, to use the new registered enum names: RulesengineConditionConditionType -> RulesengineConditionType RulesengineConditionOperator -> ComparableOperator RulesengineConditionMetricPeriod -> RulesengineMetricPeriod RulesengineConditionMetricPeriodMonthReset -> RulesengineMetricPeriodMonthReset RulesengineCompanyMetricPeriod -> RulesengineMetricPeriod RulesengineCompanyMetricMonthReset -> RulesengineMetricPeriodMonthReset RulesengineRuleRuleType -> RulesengineRuleType RuleRuleType -> RuleType Since RulesengineCondition.Operator is now SchematicHQ.Client.ComparableOperator directly, drop the redundant hand-written ComparableOperator enum and ToComparableOperator extension in TypeConverter.cs. Convert the Compare* switch statements to switch on op.Value using the generated ComparableOperator.Values.* string constants. Also update CheckFlagWithEntitlementResponse.FromApiResponse to read data.RuleType?.Value (string) now that data.RuleType is RuleType?, and update TestClient.cs to wrap the string ruleType parameter via RuleType.FromCustom(...). Note: MockServer test files still have pre-existing compile errors from the Fern generator incorrectly wrapping list query params; those are unrelated to this change and out of scope.
fern-csharp-sdk v2.61.2 regressed the MockServer test generator: for
request fields typed as IEnumerable<T>, it emits a value wrapped in an
extra collection expression — e.g. `Ids = [new List<string>() { "ids" }]`
instead of `Ids = new List<string>() { "ids" }`. The wrapped expression
is a List<List<T>> which doesn't assign to IEnumerable<T>.
Unwrap the extra `[ ... ]` layer across the 45 affected MockServer test
files (both single-line and multi-line variants). These will regress on
the next regeneration until the generator bug is fixed upstream.
cbrady
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR regenerates code to match the latest API Definition.