The OpenAPI document has the same summary text on Windows as on Linux #15

Closed
opened 2026-10-31 12:41:50 -04:00 by claude · 0 comments
Owner
  • Draft: REL-9
  • Priority: low (the Linux-built release is unaffected; a Windows-built document differs)
  • Agent: coder
  • Depends on: none
  • Decisions: none

Why

On Windows, XML-doc summaries in the generated document contain \r\n instead of \n (first
difference at $.paths./api/acme-settings.get.summary), even with an LF checkout, so
OpenApiSnapshotTests fails there and an exe built on Windows serves slightly different text.

What changes

src/dotnet/src/Ninlil.Web/OpenApi/XmlCrefTextDocumentFilter.cs (or a sibling document filter
registered next to it) normalises \r\n to \n in every summary, description and parameter
text. The committed snapshot must not change (no api-regen step needed; if it does change, stop
and hand over to api-regen).

Acceptance

  • A unit test feeds the filter a document with \r\n in an operation summary, a schema
    description and a parameter description, and asserts \n (fails before).
  • OpenApiSnapshotTests passes on Linux unchanged and on Lofnheim natively.

Source

RP-4 report finding 3 ("OpenApiSnapshotTests fails on Windows even with an LF checkout");
release-prep.md:159 ("CRLF OpenAPI summaries on Windows").

- **Draft:** REL-9 - **Priority:** low (the Linux-built release is unaffected; a Windows-built document differs) - **Agent:** coder - **Depends on:** none - **Decisions:** none ### Why On Windows, XML-doc summaries in the generated document contain `\r\n` instead of `\n` (first difference at `$.paths./api/acme-settings.get.summary`), even with an LF checkout, so `OpenApiSnapshotTests` fails there and an exe built on Windows serves slightly different text. ### What changes `src/dotnet/src/Ninlil.Web/OpenApi/XmlCrefTextDocumentFilter.cs` (or a sibling document filter registered next to it) normalises `\r\n` to `\n` in every summary, description and parameter text. The committed snapshot must not change (no `api-regen` step needed; if it does change, stop and hand over to `api-regen`). ### Acceptance - [ ] A unit test feeds the filter a document with `\r\n` in an operation summary, a schema description and a parameter description, and asserts `\n` (fails before). - [ ] `OpenApiSnapshotTests` passes on Linux unchanged and on Lofnheim natively. ### Source RP-4 report finding 3 ("OpenApiSnapshotTests fails on Windows even with an LF checkout"); `release-prep.md:159` ("CRLF OpenAPI summaries on Windows").
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#15
No description provided.