Skip to content

History / Working with CSharp Client Testing

Revisions

  • docs: sync wiki with the client-testability branch Covers the parts of the branch that were not already documented, checked against the generator source rather than the commit messages. Generated endpoint results are now partial. `{Operation}EndpointResult` is emitted as `partial class` rather than `sealed`, unconditionally and with no marker-file flag. That is easy to confuse with `generatePartialModels`, which is opt-in and applies to models only, so every mention says so explicitly. Documented in API-Reference as part of a new Client Types table, in Working-with-CSharp-Client-Testing as a way to keep repeated test assertions next to the result, in Working-with-How-To-Guides next to the existing partial-model guidance, and in Migration-Guide as a no-action-required change. The typed client class stays sealed; each page points at `I{ClientName}` instead. ATC_API_SCH021 can break a build. The rule itself was already listed in Analyzer-Rules, but nothing said that a project consuming a third-party spec that declares `ProblemDetails` and building with TreatWarningsAsErrors will now fail. Marker-Files documents the override and the NoWarn escape hatch under Error Response Formats; Migration-Guide gives it a subsection and drops the "purely additive" framing that is no longer true. The old advice to fully qualify `ProblemDetails` at the call site is removed - the shadowed second type is no longer emitted, so the ambiguity it worked around cannot arise. Polymorphic base placement. Working-with-OpenAPI already described oneOf/anyOf as supported, which the branch makes true rather than changes; the one genuinely new user-visible detail is that the base and its converter land in its variants' Models namespace, and that a variant outside that set gets a using. Added as a sibling of the three strategy subsections since it applies to all of them. Development-Notes had the most staleness. The snapshot section described a workflow that no longer exists. It now covers the four master folders and the fact that each holds its own marker file, hint-name file naming flat in the folder, the three guard tests including Snapshots_HaveNoOrphans, and the compilation gate with its shrink-only ratchet - plus a step in "Adding a New Scenario" saying a new scenario is expected to compile. Also corrected: ServerDomain is in the compilation gate (its ratchet rows are derivative of their Server row), PolymorphicTypeEmitter now lives in SourceGenerator alongside RoslynSchemaExtractor, the sample folders are not nested under Minimal, and Atc.Rest.Api.Client.Testing and the two ThirdParty sample folders were missing. The hard-coded per-project test counts are dropped rather than re-derived; they were wrong and would go stale again.

    David Kallesen committed Sep 10, 2026
  • docs: document typedClientResultStyle and ATC_API_SCH021 - Analyzer-Rules: add ATC_API_SCH021 (spec-defined ProblemDetails ignored in EndpointPerOperation mode in favour of the built-in type). - Working-with-CSharp-Client-Testing: replace the obsolete "fully qualify ProblemDetails to avoid an ambiguous reference" caveat. The duplicate type is no longer generated, so there is only ever one ProblemDetails in scope and no qualification is needed. - Marker-Files / Working-with-CSharp-Client: document the typedClientResultStyle Throw|Result option (carried over from the earlier 2.4 work).

    David Kallesen committed Sep 8, 2026
  • docs: document the Atc.Rest.Api.Client.Testing package in the client testing page

    David Kallesen committed Sep 8, 2026
  • docs: add C# client testing page and document generated interfaces and result factories

    David Kallesen committed Sep 8, 2026