-
-
Notifications
You must be signed in to change notification settings - Fork 226
fix!: Change reference resolution to use reference path instead of class name (fixes #342) #366
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
fix!: Change reference resolution to use reference path instead of class name (fixes #342) #366
Conversation
Codecov Report
@@ Coverage Diff @@
## main #366 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 47 46 -1
Lines 1490 1508 +18
=========================================
+ Hits 1490 1508 +18
Continue to review full report at Codecov.
|
…s,-when-components-title-is-different-from-the-name
I think this is finally ready for review! @dongfangtianyu originally reported the error, so if you could do a review pass (or at least test the new code with your OpenAPI documents) that would be super helpful. As always, I'd also like @packyg / @dtkav / @forest-benchling to take a look as well since they have the largest collection of documents and generated clients that I know of (and since this will probably mess with their fork). |
Oh and also @p1-ra and @p1-alexandrevaney are probably interested since you have a few other PRs open related to references. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
@attr.s(auto_attribs=True, frozen=True) | ||
class Class: | ||
""" Info about a generated class which will be in models """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know what you mean here, but this docstring is a little confusingly worded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a suggestion? Maybe "Info about a class to be generated"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "Represents Python class which will be generated from OpenAPI schema"?
It looks great ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…s,-when-components-title-is-different-from-the-name
Kind of old, but I've missed the notification. As for information, regarding #329 it almost fixes them all (tested on today
|
By removing the title attribute of the two failure specs (who was invalid title attribute I thinks), it works as expected:
|
Thanks for getting back to us @p1-ra! Glad to hear its working :) |
This one touches a lot of code and has multiple breaking changes:
--config
param should be passed in after the command (e.g.generate
) now instead of before it. Class name and module name overrides may apply differently than they used to but are hopefully more deterministic now.