Skip to content

Commit 597d8a4

Browse files
committed
Return subproject_of field in project details
Fixes #7300
1 parent c4635c5 commit 597d8a4

File tree

3 files changed

+147
-0
lines changed

3 files changed

+147
-0
lines changed

readthedocs/api/v3/tests/responses/projects-subprojects-detail.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,55 @@
3535
"url": "https://github.com/rtfd/subproject"
3636
},
3737
"slug": "subproject",
38+
"subproject_of": {
39+
"_links": {
40+
"_self": "https://readthedocs.org/api/v3/projects/project/",
41+
"builds": "https://readthedocs.org/api/v3/projects/project/builds/",
42+
"environmentvariables": "https://readthedocs.org/api/v3/projects/project/environmentvariables/",
43+
"redirects": "https://readthedocs.org/api/v3/projects/project/redirects/",
44+
"subprojects": "https://readthedocs.org/api/v3/projects/project/subprojects/",
45+
"superproject": "https://readthedocs.org/api/v3/projects/project/superproject/",
46+
"translations": "https://readthedocs.org/api/v3/projects/project/translations/",
47+
"versions": "https://readthedocs.org/api/v3/projects/project/versions/"
48+
},
49+
"created": "2019-04-29T10:00:00Z",
50+
"default_branch": "master",
51+
"default_version": "latest",
52+
"homepage": "http://project.com",
53+
"id": 1,
54+
"language": {
55+
"code": "en",
56+
"name": "English"
57+
},
58+
"modified": "2019-04-29T12:00:00Z",
59+
"name": "project",
60+
"programming_language": {
61+
"code": "words",
62+
"name": "Only Words"
63+
},
64+
"repository": {
65+
"type": "git",
66+
"url": "https://github.com/rtfd/project"
67+
}, "slug": "project",
68+
"subproject_of": null,
69+
"tags": [
70+
"tag",
71+
"project",
72+
"test"
73+
],
74+
"translation_of": null,
75+
"urls": {
76+
"builds": "https://readthedocs.org/projects/project/builds/",
77+
"documentation": "http://project.readthedocs.io/en/latest/",
78+
"home": "https://readthedocs.org/projects/project/",
79+
"versions": "https://readthedocs.org/projects/project/versions/"
80+
},
81+
"users": [
82+
{
83+
"username": "testuser"
84+
}
85+
]
86+
},
3887
"tags": [],
3988
"translation_of": null,
4089
"urls": {

readthedocs/api/v3/tests/responses/projects-subprojects-list.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,55 @@
4040
"url": "https://github.com/rtfd/subproject"
4141
},
4242
"slug": "subproject",
43+
"subproject_of": {
44+
"_links": {
45+
"_self": "https://readthedocs.org/api/v3/projects/project/",
46+
"builds": "https://readthedocs.org/api/v3/projects/project/builds/",
47+
"environmentvariables": "https://readthedocs.org/api/v3/projects/project/environmentvariables/",
48+
"redirects": "https://readthedocs.org/api/v3/projects/project/redirects/",
49+
"subprojects": "https://readthedocs.org/api/v3/projects/project/subprojects/",
50+
"superproject": "https://readthedocs.org/api/v3/projects/project/superproject/",
51+
"translations": "https://readthedocs.org/api/v3/projects/project/translations/",
52+
"versions": "https://readthedocs.org/api/v3/projects/project/versions/"
53+
},
54+
"created": "2019-04-29T10:00:00Z",
55+
"default_branch": "master",
56+
"default_version": "latest",
57+
"homepage": "http://project.com",
58+
"id": 1,
59+
"language": {
60+
"code": "en",
61+
"name": "English"
62+
},
63+
"modified": "2019-04-29T12:00:00Z",
64+
"name": "project",
65+
"programming_language": {
66+
"code": "words",
67+
"name": "Only Words"
68+
},
69+
"repository": {
70+
"type": "git",
71+
"url": "https://github.com/rtfd/project"
72+
}, "slug": "project",
73+
"subproject_of": null,
74+
"tags": [
75+
"tag",
76+
"project",
77+
"test"
78+
],
79+
"translation_of": null,
80+
"urls": {
81+
"builds": "https://readthedocs.org/projects/project/builds/",
82+
"documentation": "http://project.readthedocs.io/en/latest/",
83+
"home": "https://readthedocs.org/projects/project/",
84+
"versions": "https://readthedocs.org/projects/project/versions/"
85+
},
86+
"users": [
87+
{
88+
"username": "testuser"
89+
}
90+
]
91+
},
4392
"tags": [],
4493
"translation_of": null,
4594
"urls": {

readthedocs/api/v3/tests/responses/projects-subprojects-list_POST.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,55 @@
3535
"url": "https://github.com/rtfd/project"
3636
},
3737
"slug": "new-project",
38+
"subproject_of": {
39+
"_links": {
40+
"_self": "https://readthedocs.org/api/v3/projects/project/",
41+
"builds": "https://readthedocs.org/api/v3/projects/project/builds/",
42+
"environmentvariables": "https://readthedocs.org/api/v3/projects/project/environmentvariables/",
43+
"redirects": "https://readthedocs.org/api/v3/projects/project/redirects/",
44+
"subprojects": "https://readthedocs.org/api/v3/projects/project/subprojects/",
45+
"superproject": "https://readthedocs.org/api/v3/projects/project/superproject/",
46+
"translations": "https://readthedocs.org/api/v3/projects/project/translations/",
47+
"versions": "https://readthedocs.org/api/v3/projects/project/versions/"
48+
},
49+
"created": "2019-04-29T10:00:00Z",
50+
"default_branch": "master",
51+
"default_version": "latest",
52+
"homepage": "http://project.com",
53+
"id": 1,
54+
"language": {
55+
"code": "en",
56+
"name": "English"
57+
},
58+
"modified": "2019-04-29T12:00:00Z",
59+
"name": "project",
60+
"programming_language": {
61+
"code": "words",
62+
"name": "Only Words"
63+
},
64+
"repository": {
65+
"type": "git",
66+
"url": "https://github.com/rtfd/project"
67+
}, "slug": "project",
68+
"subproject_of": null,
69+
"tags": [
70+
"tag",
71+
"project",
72+
"test"
73+
],
74+
"translation_of": null,
75+
"urls": {
76+
"builds": "https://readthedocs.org/projects/project/builds/",
77+
"documentation": "http://project.readthedocs.io/en/latest/",
78+
"home": "https://readthedocs.org/projects/project/",
79+
"versions": "https://readthedocs.org/projects/project/versions/"
80+
},
81+
"users": [
82+
{
83+
"username": "testuser"
84+
}
85+
]
86+
},
3887
"tags": [],
3988
"translation_of": null,
4089
"urls": {

0 commit comments

Comments
 (0)