Skip to content

OpenAPI endpoint enumeration refactoring. #7127

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

carltongibson
Copy link
Collaborator

This just _inline method_s get_path() which wasn't really needed. It's preparatory to add reference component generation parallel to the current path operation generation.

It includes the commits from #7125 and #7126. So can be Rebase & Merged to close all three.
(They're intended as three commits for the history.)

for path, method, view in view_endpoints:
if not self.has_view_permissions(path, method, view):
continue

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here I intend for per path, method, view component generation, components (if any) then becoming parameters to get_operation()

@carltongibson
Copy link
Collaborator Author

@tfranzel-cashlink @gnuletik. Thanks both for your PRs in #7096 and #7124.

I've made some adjustments here to allow the access point I think we need, without needing to pass schema-level info down into the individual view inspector. I imagine now an AutoSchema.get_components(method) (do we need path as a parameter ?) method to return components. (We then need to pass these, if any, into get_operation(), so that they can be correctly referenced I'm supposing...)

I'll work on this going forward but if you see where I'm going with it and are inspired to jump-in, please do.

gnuletik added a commit to gnuletik/django-rest-framework that referenced this pull request Jan 12, 2020
@carltongibson carltongibson merged commit 496947b into encode:master Jan 21, 2020
gnuletik added a commit to gnuletik/django-rest-framework that referenced this pull request Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant