Skip to content

Add text/plain response support to IMessageResponseBuilder#45

Merged
davidkallesen merged 2 commits into
mainfrom
feature/support-text-response
Apr 22, 2026
Merged

Add text/plain response support to IMessageResponseBuilder#45
davidkallesen merged 2 commits into
mainfrom
feature/support-text-response

Conversation

@davidkallesen

Copy link
Copy Markdown
Collaborator

Summary

  • Unblock OpenAPI text/plain clients from the REST generator
  • Return raw text bodies verbatim without JSON deserialization
  • Refresh atc-coding-rules to 1.0.1 and bump analyzer packages

Changes

✨ Features

  • Add AddSuccessTextResponse(HttpStatusCode) to the builder
  • Add AddErrorTextResponse(HttpStatusCode) to the builder
  • Bypass the contract serializer for registered text status codes
  • Mirror AddTypedResponse<T> empty-body semantics (null for whitespace)

📝 Documentation

  • Add "Plain Text Responses" usage section to README
  • Update IMessageResponseBuilder block in the API reference
  • Add Plain Text Responses entry to the Features list and TOC

📦 Dependencies

  • Bump Atc.Analyzer 0.1.22 -> 0.1.23
  • Bump Meziantou.Analyzer 3.0.7 -> 3.0.50
  • Bump SonarAnalyzer.CSharp 10.19.0 -> 10.24.0
  • Bump Microsoft.SourceLink.GitHub 10.0.103 -> 10.0.203
  • Bump Microsoft.Testing.Extensions.CodeCoverage 18.4.1 -> 18.6.2
  • Bump Microsoft.Testing.Extensions.TrxReport 2.1.0 -> 2.2.1

🔥 Removal

  • Drop Asyncify package reference and editorconfig section
  • Drop SecurityCodeScan.VS2019 package reference

🔧 Configuration

  • Sync all .editorconfig files to atc-coding-rules v1.0.1
  • Replace external rule-URL comments with inline descriptions

Notes

  • Atc.Rest.Client targets netstandard2.0, so default interface
    methods are unavailable - the new methods are plain additions
  • Additive interface change; external implementers of
    IMessageResponseBuilder must add the two methods on upgrade
  • Charset is honored via ReadAsStringAsync; no extra handling needed
  • Enables the generator to switch EndpointPerOperation text clients
    from inline emission to the canonical builder pathway

…lder

  - Add AddSuccessTextResponse / AddErrorTextResponse that bypass the
    contract serializer and return the body verbatim as a string
  - Mirror AddTypedResponse<T> empty-body semantics (null for whitespace)
  - Cover via 9 tests (verbatim body, string-typed ContentObject, empty
    body, serializer-not-invoked, error path, coexistence, fluent chain)
  - Document the new methods in README with a usage section and API
    reference update
  - Sync .editorconfig files to atc-coding-rules v1.0.1 (inline rule
    descriptions, drop Asyncify / SecurityCodeScan sections)
  - Drop Asyncify and SecurityCodeScan.VS2019 package references
  - Bump Atc.Analyzer 0.1.22 -> 0.1.23
  - Bump Meziantou.Analyzer 3.0.7 -> 3.0.50
  - Bump SonarAnalyzer.CSharp 10.19.0 -> 10.24.0
  - Bump Microsoft.SourceLink.GitHub 10.0.103 -> 10.0.203
  - Bump Microsoft.Testing.Extensions.CodeCoverage 18.4.1 -> 18.6.2
  - Bump Microsoft.Testing.Extensions.TrxReport 2.1.0 -> 2.2.1
@davidkallesen davidkallesen merged commit 853a619 into main Apr 22, 2026
4 checks passed
@davidkallesen davidkallesen deleted the feature/support-text-response branch April 22, 2026 11:46
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