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

API: return the api_version on the response #10276

Merged
merged 5 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions readthedocs/proxito/tests/responses/v0.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"api_version": "0",
"comment": "THIS RESPONSE IS IN ALPHA FOR TEST PURPOSES ONLY AND IT'S GOING TO CHANGE COMPLETELY -- DO NOT USE IT!",
"projects": {
"current": {
Expand Down
1 change: 1 addition & 0 deletions readthedocs/proxito/tests/responses/v1.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"api_version": "1",
"comment": "Undefined yet. Use v0 for now"
}
2 changes: 2 additions & 0 deletions readthedocs/proxito/views/hosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def _v0(self, project, version, build, filename, user):
project_features = project.features.all().values_list("feature_id", flat=True)

data = {
"api_version": "0",
"comment": (
"THIS RESPONSE IS IN ALPHA FOR TEST PURPOSES ONLY"
" AND IT'S GOING TO CHANGE COMPLETELY -- DO NOT USE IT!"
Expand Down Expand Up @@ -432,6 +433,7 @@ def _v0(self, project, version, build, filename, user):

def _v1(self, project, version, build, filename, user):
return {
"api_version": "1",
"comment": "Undefined yet. Use v0 for now",
}

Expand Down