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

Merge parameter data to preserve description in manually edited Openapi spec #149

Merged

Conversation

mercedesb
Copy link
Contributor

@mercedesb mercedesb commented Nov 30, 2023

Resolves #144

In the issue comment, I saw that we expect to be able to add/edit parameter descriptions and have them be preserved.

From my testing, it looks like that's not happening.

This is a small change that should keep the unique behavior on parameter name and in while preserving description if someone manually added it to the generated properties.

@mercedesb mercedesb force-pushed the dont-overwrite-parameter-descriptions branch from 5cd3059 to b83022e Compare November 30, 2023 22:10
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b95658c) 96.68% compared to head (8e40280) 96.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
+ Coverage   96.68%   96.73%   +0.05%     
==========================================
  Files          14       14              
  Lines         422      429       +7     
  Branches       94       95       +1     
==========================================
+ Hits          408      415       +7     
  Misses         14       14              

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

@mercedesb mercedesb force-pushed the dont-overwrite-parameter-descriptions branch from b123eba to 8e40280 Compare November 30, 2023 22:41
@mercedesb mercedesb changed the title merge parameter data to preserve description in openapi spec Merge parameter data to preserve description in manually edited Openapi spec Nov 30, 2023
@exoego exoego added the bug Something isn't working label Dec 1, 2023
Copy link
Owner

@exoego exoego left a comment

Choose a reason for hiding this comment

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

Thanks.

IIUC, this PR is a bugfix.
The previous implementation fails to preserve manually-added properties (description for this case).
I confirmed that description is gone without your fix.
Nice catch.

@exoego exoego merged commit 7804e0f into exoego:master Dec 1, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include property descriptions in response schema?
2 participants