Skip to content

CI: Reduce document generation#3

Closed
dmytro-pryvedeniuk wants to merge 3 commits intomainfrom
reduce-document-generation
Closed

CI: Reduce document generation#3
dmytro-pryvedeniuk wants to merge 3 commits intomainfrom
reduce-document-generation

Conversation

@dmytro-pryvedeniuk
Copy link
Copy Markdown
Owner

No description provided.

dmytro-pryvedeniuk added a commit that referenced this pull request May 6, 2026
Switch some sample projects to OpenApi

Skip net8 for some test projects

Skip net8 for some test projects #2

Switch OpenApiDemonstrator and OtelWebApiWolverineMarten to OpenApi

Switch WebApiWithMarten to OpenApi

Switch some projects to OpenApi #3

Switch remaining projects to OpenApi
@dmytro-pryvedeniuk dmytro-pryvedeniuk force-pushed the reduce-document-generation branch from 59ff7b0 to 02220b2 Compare May 6, 2026 10:28
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

dmytro-pryvedeniuk added a commit that referenced this pull request May 8, 2026
* Use TargetFrameworks instead of TargetFramework to override Directory.Build.props

* Switch sample projects to OpenApi

Switch some sample projects to OpenApi

Skip net8 for some test projects

Skip net8 for some test projects #2

Switch OpenApiDemonstrator and OtelWebApiWolverineMarten to OpenApi

Switch WebApiWithMarten to OpenApi

Switch some projects to OpenApi #3

Switch remaining projects to OpenApi

* Remove not used .http files
dmytro-pryvedeniuk pushed a commit that referenced this pull request May 8, 2026
…eader path

Second-pass review fixes for PR #3.

Production
- Rename ApiVersioningPolicy.ChainsRequiringHeaderWriter to
  ChainsRequiringHeaderEmission to match the rest of the rename pass
  ("header state / emission" terminology). Property was already internal,
  so callers in WolverineHttpEndpointRouteBuilderExtensions are updated
  in lockstep.
- ApiVersionHeaderWriter.WriteAsync now resolves the writer via
  GetRequiredService<T>() inside the OnStarting callback. The previous
  GetService(typeof(...)) silently swallowed null and made lost headers
  invisible. Bootstrap registers the writer unconditionally as a singleton,
  so a missing registration is a programmer error and must fail fast.
- Add inline comments to the early-exit gate and the in-OnStarting re-fetch
  explaining why the writer must re-resolve the endpoint at flush time
  (middleware can re-route the request between frames).
- Mark WriteVersioningHeadersTo with EditorBrowsable(Advanced) and add a
  class-level XML doc explaining the asymmetry between WriteAsync (chain
  frame, locked by codegen) and the sync helper for advanced/middleware use.
- WolverineWebApi/Program.cs: pin placement intent of UseExceptionHandler
  with a "before MapWolverineEndpoints" comment.
- OrdersV1ThrowsEndpoint: throw message now identifies the source and
  flags it as IGNORE for log tailers.

Tests
- New ApiVersionHeaderWriterTests.missing_writer_in_request_services_throws
  pins the new fail-fast contract for the GetRequiredService change.
- New DEBUG-only ApiVersioningPolicyHeaderWiringTests.finalization_assert_-
  fires_when_writer_was_displaced exercises the Debug.Assert invariant
  in ApiVersionHeaderFinalizationPolicy via a throwing TraceListener.
  Guarded by #if DEBUG since the assert is no-op under RELEASE.
- api_versioning_error_path_header_tests:
  - Extract ExpectedSupportedVersions constant for "1.0, 3.0" with a
    pointer to Program.cs:303-306 so config drift produces a clear
    single failure rather than four near-identical ones.
  - Assert response body contains "global-exception-handler" on the 5xx
    test so a future change letting Wolverine answer the throws endpoint
    with its own 500 cannot turn the absent-headers assertion into a
    tautology.

Docs
- versioning.md exception-handler snippet: add the missing
  Microsoft.Extensions.DependencyInjection using and switch to
  GetRequiredService<T>() to match the production change.
@dmytro-pryvedeniuk dmytro-pryvedeniuk deleted the reduce-document-generation branch May 8, 2026 09:45
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