Skip to content

fix: parser / add summary attribute to endpoint model #404

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

Merged

Conversation

p1-ra
Copy link
Contributor

@p1-ra p1-ra commented Apr 30, 2021

This PR add an optional summary attribute to the Endpoint model.

By reading the specs the field summary and description seem to be ~six of one, half-a-dozen of another.
Thus, merging the two fields in the already existing description attr of the Endpoint is probably a bad idea.

In my case I use it with a custom template to generate docstring. An other solution will be to use the summary value of the scheme as a fall-back value for the Endpoint description; but their is maybe someone out there that need these two fields.

@codecov
Copy link

codecov bot commented Apr 30, 2021

Codecov Report

Merging #404 (503a0ed) into main (518b501) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #404   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           46        46           
  Lines         1530      1531    +1     
=========================================
+ Hits          1530      1531    +1     
Impacted Files Coverage Δ
openapi_python_client/parser/openapi.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 518b501...503a0ed. Read the comment docs.

Copy link
Collaborator

@dbanty dbanty left a comment

Choose a reason for hiding this comment

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

There's potential for the same issue here where someone realizes that summary isn't being used by any internal code and removes it... but I think the answer to that is to document the entirety of this class which is out of scope for this PR.

@dbanty dbanty added this to the 0.9.0 milestone Apr 30, 2021
@dbanty dbanty merged commit 9b0302c into openapi-generators:main Apr 30, 2021
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