File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,16 @@ def test_get_config(self):
119
119
"filepath" : "/docs/index.rst" ,
120
120
},
121
121
},
122
+ "search" : {
123
+ "api_endpoint" : "/_/api/v3/search/" ,
124
+ "default_filter" : "subprojects:project/latest" ,
125
+ "filters" : [
126
+ ["Search only in this project" , "project:project/latest" ],
127
+ ["Search subprojects" , "subprojects:project/latest" ],
128
+ ],
129
+ "project" : "project" ,
130
+ "version" : "latest" ,
131
+ },
122
132
},
123
133
}
124
134
assert r .json () == expected
Original file line number Diff line number Diff line change @@ -115,6 +115,23 @@ def get(self, request):
115
115
"filepath" : "/docs/index.rst" ,
116
116
},
117
117
},
118
+ "search" : {
119
+ "project" : project .slug ,
120
+ "version" : version .slug ,
121
+ "api_endpoint" : "/_/api/v3/search/" ,
122
+ # TODO: figure it out where this data comes from
123
+ "filters" : [
124
+ [
125
+ "Search only in this project" ,
126
+ f"project:{ project .slug } /{ version .slug } " ,
127
+ ],
128
+ [
129
+ "Search subprojects" ,
130
+ f"subprojects:{ project .slug } /{ version .slug } " ,
131
+ ],
132
+ ],
133
+ "default_filter" : f"subprojects:{ project .slug } /{ version .slug } " ,
134
+ },
118
135
},
119
136
}
120
137
You can’t perform that action at this time.
0 commit comments