christianhelle / refitter

Refit Client API Generator for OpenAPI
https://refitter.github.io
MIT License
157 stars 36 forks source link

Tweak xml docs #332

Closed osc-nseguin closed 4 months ago

osc-nseguin commented 4 months ago

Both of these somewhat improve the rendering of the generated comments in Visual Studio and Rider.

Before (Rider): image

After (Rider): image

Before (Visual Studio): image

After (Visual Studio): image

The generated code is a little uglier due to the flat nested XML. One could avoid this by refactoring the string builder utility methods.

christianhelle commented 4 months ago

@osc-nseguin Thanks for taking the time to improve this feature! Based on the screenshots, this is really cool!

christianhelle commented 4 months ago

@all-contributors please add @osc-nseguin for code

allcontributors[bot] commented 4 months ago

@christianhelle

I've put up a pull request to add @osc-nseguin! :tada:

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

christianhelle commented 4 months ago

@osc-nseguin The tests are unfortunately failing. Do you mind updating XmlDocumentationGeneratorTests? There are a couple of asserts there that check that the generated code contains the string <throws cref=\"ApiException\">, and this is no longer valid with your changes

Sorry, I got a bit impatient and pushed the fixes myself 😄

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.34%. Comparing base (0b3e451) to head (0cac175). Report is 30 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #332 +/- ## ========================================== + Coverage 97.33% 97.34% +0.01% ========================================== Files 63 63 Lines 2402 2412 +10 ========================================== + Hits 2338 2348 +10 Misses 40 40 Partials 24 24 ``` | [Flag](https://app.codecov.io/gh/christianhelle/refitter/pull/332/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Helle) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/christianhelle/refitter/pull/332/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Helle) | `97.34% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Helle#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.