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

Use schema_url in SpectacularElementsView #1067

Merged
merged 4 commits into from
Sep 6, 2023
Merged

Conversation

q0w
Copy link
Contributor

@q0w q0w commented Sep 4, 2023

There is no _get_schema_url method

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3b028c2) 98.57% compared to head (b866f4f) 98.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1067   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files          68       68           
  Lines        8417     8417           
=======================================
  Hits         8297     8297           
  Misses        120      120           

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

@tfranzel
Copy link
Owner

tfranzel commented Sep 4, 2023

hi @q0w, good point, but it would probably be better to copy that missing method into this class.

the same as in the other views:

    def _get_schema_url(self, request):
        schema_url = self.url or get_relative_url(reverse(self.url_name, request=request))
        return set_query_parameters(
            url=schema_url,
            lang=request.GET.get('lang'),
            version=request.GET.get('version')
        )

@q0w
Copy link
Contributor Author

q0w commented Sep 5, 2023

@tfranzel updated.
Rapidoc view also does not have this method. Should it be updated too?

@tfranzel
Copy link
Owner

tfranzel commented Sep 5, 2023

sure, why not. You can update this PR if you like or open an new one.

@q0w
Copy link
Contributor Author

q0w commented Sep 6, 2023

Done.

@tfranzel tfranzel merged commit 949ad85 into tfranzel:master Sep 6, 2023
@q0w q0w deleted the patch-1 branch September 6, 2023 11:50
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