Skip to content

🌿 Fern Regeneration -- April 23, 2026#139

Merged
bpapillon merged 3 commits into
mainfrom
fern-bot/2026-04-23T23-50Z
Apr 24, 2026
Merged

🌿 Fern Regeneration -- April 23, 2026#139
bpapillon merged 3 commits into
mainfrom
fern-bot/2026-04-23T23-50Z

Conversation

@fern-api

@fern-api fern-api Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

This PR regenerates code to match the latest API Definition.

@fern-api
fern-api Bot requested a review from a team as a code owner April 23, 2026 23:50
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.
@bpapillon
bpapillon merged commit 4a0f4e4 into main Apr 24, 2026
2 of 3 checks passed
@bpapillon
bpapillon deleted the fern-bot/2026-04-23T23-50Z branch April 24, 2026 14:49
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.

2 participants