Skip to content

docs: fix incorrect and non-existent API references in markdown files#37

Merged
senrecep merged 1 commit into
mainfrom
docs/fix-markdown-code-examples
May 31, 2026
Merged

docs: fix incorrect and non-existent API references in markdown files#37
senrecep merged 1 commit into
mainfrom
docs/fix-markdown-code-examples

Conversation

@senrecep
Copy link
Copy Markdown
Owner

Summary

  • Fixed ~50 broken code examples across 12 documentation files
  • All referenced methods/types verified against actual source code
  • dotnet build passes — no source code changes, docs only

Changes

File Issues Fixed
README.MD Maybe.Return→From, Fallback→GetValueOrDefault, Rule.Create→Func+ToRule, RuleEngine.Create→And/Or, AddCSharpEssentials→AddEnhancedProblemDetails, onFailure→onError, AnyActionResult<T> return type, Error two-param signatures
Examples.RequestResponseLogging/README.md IServiceCollection→IApplicationBuilder, removed 6 non-existent options (LogRequestBody, PathFilter, etc.), ILogWriter internal note, real IgnorePaths+UseLogger API
Examples.EntityFrameworkCore/README.md BaseDbContext<T> generic + IServiceScopeFactory, ConfigureEnumConventions (not UseSnakeCaseNamingConvention), PaginateAsync (not ToPaginatedList), response.Next (not NextCursor)
Examples.Enums/README.md Real source-generated methods (not GetStringValue/GetCount/ParseEnum)
Examples.Json/README.md ConvertToJson/FromJson (not IsValidJson/ToPrettyJson/MinifyJson)
Examples.Time/README.md ToDateOnly/ToTimeOnly only (not StartOfDay..ToUnixTimestamp)
Examples.Any/README.md Any.Create<T0,T1> (not Any.From), full type params on Is<>/As<>, Any<T0,T1> naming
Examples.Rules/README.md Func<T,Result>.ToRule() (not Rule.Create<T>)
Examples.Core/README.md ToStringFromGuid, IfAdd/IfAddRange, GetRandomItem/GetRandomItems
docs/API_REFERENCE.md CSharpEssentials.Validation (not FluentValidation), ResultPattern namespace note, missing SuccessIf/FailureIf<TValue> overloads, Result.Try all 4 overloads, Match partial (not exhaustive)
CONTRIBUTING.md Added setup commands, .NET SDK requirement, updated GitHub Flow URL
BENCHMARKS.md .NET 11 marked as preview

Test plan

  • dotnet build passes (exit code 0)
  • All API references verified against source code before fixing
  • No source code modified — documentation only

🤖 Generated with Claude Code

Corrected ~50 broken code examples across 12 documentation files.
Examples referenced methods and types that do not exist in source,
which would cause compilation errors for users copying the snippets.

Key fixes:
- README.MD: Maybe.From (not Return), RuleEngine.And/Or (not Create),
  AnyActionResult<T> return type, Error two-param signatures, onError param
- Examples.RequestResponseLogging: IApplicationBuilder extension (not IServiceCollection),
  real opt.IgnorePaths+UseLogger API (removed 6 non-existent properties)
- Examples.EntityFrameworkCore: BaseDbContext<T> generic + IServiceScopeFactory,
  ConfigureEnumConventions (not UseSnakeCaseNamingConvention),
  PaginateAsync (not ToPaginatedList), response.Next (not NextCursor)
- Examples.Enums: real source-generated methods (not GetStringValue/GetCount/ParseEnum)
- Examples.Json: ConvertToJson/FromJson (not IsValidJson/ToPrettyJson/MinifyJson)
- Examples.Time: ToDateOnly/ToTimeOnly only (not StartOfDay..ToUnixTimestamp)
- Examples.Any: Any.Create<T0,T1> (not Any.From), full type params on Is<>/As<>
- Examples.Rules: Func<T,Result>.ToRule() (not Rule.Create<T>)
- Examples.Core: correct Guider, Collection, RandomItems method names
- API_REFERENCE.md: CSharpEssentials.Validation (not FluentValidation),
  ResultPattern namespace note, missing SuccessIf/FailureIf overloads
- CONTRIBUTING.md: added setup commands, .NET SDK requirement, updated GitHub Flow URL
- BENCHMARKS.md: .NET 11 marked as preview

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@senrecep senrecep merged commit 346ea14 into main May 31, 2026
6 checks passed
@senrecep senrecep deleted the docs/fix-markdown-code-examples branch May 31, 2026 08:15
@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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