-
Notifications
You must be signed in to change notification settings - Fork 301
OAS 3.0 schema generation #772
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
Conversation
There are some TODOs left from @n2ygk's work that I'm unsure of, and/or too unfamiliar to understand. However, for initial support for OAS 3.0, it is working well. |
@keyz182 I will try to take a look at this later this week. Meanwhile, I note there's ongoing activity w.r.t. openapi generateschema happening upstream at DRF including a bit of flaming :-) so you may want to build against DRF-master. (I haven't looked at your work yet, so maybe you are already doing this.) |
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.
Thanks for picking this up. It will be great to have OAS in DJA. All in all is this PR still very big. I have tried to go through it but I am sure I have overlooked things. So far I haven't looked at the tests yet but just the implementation because of lack of time. Once my comments are addressed I will need to review again anyway.
All in all when you look through the PR again it is important that you could look at:
- what code blocks are really necessary for basic OAS support (one comment I have added concerning this but there might be more). All what can be moved to a later PR makes this PR be approved quicker.
- update with upstream code. It seems upstream has moved quite a bit and this PR might be simplified therefore (some comments I have added concerning this).
Thanks for the feedback @sliverc - I'll try to get back and address your comments later this week (I have some other priorities to start this week off). |
FYI DRF 3.12 milestone continues to develop OAS schema definition Especially useful is this documentation |
Sorry - given current events, and new priorities at work, I'm not going to be able to address your concerns just now @sliverc. I will get back to it though. |
hey! can you pick this up again? |
I will try to handle it if no one got the time. will try to split the PR in smaller chunks |
@auvipy Sorry, I'm not going to have time for a few months at least unfortunately :( If you want to take over, I'm happy to give pointers where I can. |
OK I will take this over and feel free to review. |
I've just had a quick look at current drf master (still pre-3.12) and have noticed a few things that might impact this code if not already dealt with:
|
FYI - I've got some free time this week so started looking at this, especially w.r.t. changes to upstream DRF and will be pushing a rebase shortly. |
Thats great! Looking forwarded to it |
0f05799
to
b4c37c1
Compare
working my way backwards from master through earlier versions of DRF to eventually get tox tests to conditionalize as appropriate and otherwise run cleanly. |
See also PR #804 which I've copied the change over here just to keep this moving and cleanly rebaseable. |
Codecov Report
@@ Coverage Diff @@
## master #772 +/- ##
==========================================
+ Coverage 97.77% 97.87% +0.10%
==========================================
Files 58 62 +4
Lines 3104 3443 +339
==========================================
+ Hits 3035 3370 +335
- Misses 69 73 +4
Continue to review full report at Codecov.
|
I won't have the time right now to closely look at this as in DRF there has been many changes and this is a fairly large PR. @n2ygk I guess you won't see this as ready though right? As there are quite a few TODOs in the code. And possibly as there are many changes in DRF we should properly also wait till 3.12 is released. |
No, still a draft. I have to check out a few more items and fix them to
align with DRF 3.12.
…On Wed, Aug 19, 2020 at 10:35 AM Oliver Sauder ***@***.***> wrote:
I won't have the time right now to closely look at this as in DRF there
has been many changes and this is a fairly large PR.
@n2ygk <https://github.com/n2ygk> I guess you won't see this as ready
though right? As there are quite a few TODOs in the code. And possibly as
there are many changes in DRF we should properly also wait till 3.12 is
released.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#772 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBHS5Z4UJSV6RYMSN52VHTSBPPLHANCNFSM4KYT2BNQ>
.
|
This is getting closer to reviewable. I'll do another rebase when I'm ready and will then request your review. |
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.
Things I still need to do before a final review request:
- Check on Oliver's remaining open review comments
- See if
SchemaGenerator.schema_init
might be included in upstream DRF. - Decide what TODOs can be deferred for now vs. must haves.
@n2ygk went through the conversations and marked the once solved which are. Besides the relationship issue there are also some conversations though which you might have overlooked. |
@sliverc please hold off on further review until I solve #772 (comment) |
Yes I think I have a solution for that problem I was working
…On Fri, Oct 23, 2020 at 9:51 AM Oliver Sauder ***@***.***> wrote:
@n2ygk <https://github.com/n2ygk> Do you think you will get to the open
OAS issues in the next few days?
If not once #846
<#846>
is merged I would be fine if we release 4.0.0 nowish (mainly to support
newest DRF version) and postpone this to the next minor version 4.1.0 as it
is fully backwards compatible. What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#772 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBHS57UUIM2YQK2XAZP2YTSMGC6XANCNFSM4KYT2BNQ>
.
|
- <typename> gets added e.g. in swagger-ui and breaks queries
This reverts commit 5855b65.
Improve comment describing the need to monkey-patch view.action.
@sliverc Ready for your review. |
Thanks for your work on this! This now looks good as a start and can be vetted as it is used more widely. |
Nice work @n2ygk ! |
@sliverc It looks like travis has stalled. |
Not stalled but running really slowly. So far 3+ hours in and not done yet. |
Hmm, this tweet says something about .org vs. .com |
Fixes #604
Fixes #644
Description of the Change
Extends DRF >= 3.12's generateschema to produce a jsonapi-formatted OAS schema document.
Builds on @n2ygk's work in #689
Checklist
CHANGELOG.md
updated (only for user relevant changes)AUTHORS