Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak xml docs #332

Merged
merged 3 commits into from
Mar 6, 2024
Merged

Conversation

osc-nseguin
Copy link
Contributor

@osc-nseguin osc-nseguin commented Mar 5, 2024

  • Use the recommended tag "exception" instead of "throws"
  • Format response status code list as a <list type="table">

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 christianhelle self-assigned this Mar 5, 2024
@christianhelle christianhelle added enhancement New feature, bug fix, or request .NET Pull requests that contain changes to .NET code labels Mar 5, 2024
@christianhelle
Copy link
Owner

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

@christianhelle
Copy link
Owner

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

Copy link
Contributor

@christianhelle

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

Copy link
Owner

@christianhelle christianhelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Copy link

sonarcloud bot commented Mar 6, 2024

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
Copy link
Owner

@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 😄

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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 Coverage Δ
unittests 97.34% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@christianhelle christianhelle merged commit 923a38e into christianhelle:main Mar 6, 2024
841 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request .NET Pull requests that contain changes to .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants