Skip to content

Commit 1accaf7

Browse files
author
Vladimir Kotal
committed
convert the expected repository paths to their native values
fixes #2556
1 parent d2d206c commit 1accaf7

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

apiary.apib

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Besides `/suggester` and `/search` endpoints, everything is accessible from `loc
2828

2929
+ Request (application/xml)
3030
+ Body
31-
31+
3232
```
3333
<?xml version="1.0" encoding="UTF-8"?>
3434
<java version="1.8.0_172" class="java.beans.XMLDecoder">
@@ -146,19 +146,22 @@ Besides `/suggester` and `/search` endpoints, everything is accessible from `loc
146146

147147
+ Request
148148
+ Body
149-
149+
150150
body – string representation of the value to set
151151

152152
+ Response 204
153153

154154
### returns the field value [GET]
155155

156156
+ Response 200 (application/json)
157-
157+
158158
## Project repositories [/projects/{project}/repositories]
159159

160160
### returns a list of repositories for the specified project [GET]
161161

162+
Native path separators (of the system running the service)
163+
will be used for repository paths.
164+
162165
+ Response 200 (application/json)
163166
+ Body
164167

@@ -173,7 +176,7 @@ Besides `/suggester` and `/search` endpoints, everything is accessible from `loc
173176

174177
+ Response 200 (application/json)
175178
+ Body
176-
179+
177180
["RCS","git","SCCS"]
178181

179182
## Project indexed flag [/projects/indexed]
@@ -182,9 +185,9 @@ Besides `/suggester` and `/search` endpoints, everything is accessible from `loc
182185

183186
+ Response 200 (application/json)
184187
+ Body
185-
188+
186189
["sc-2","sc-1"]
187-
190+
188191
## Repository type [/repositories/type{?repository}]
189192

190193
### return type of the repository [GET]

opengrok-web/src/test/java/org/opengrok/web/api/v1/controller/ProjectsControllerTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import java.io.IOException;
5656
import java.nio.file.Files;
5757
import java.nio.file.Path;
58+
import java.nio.file.Paths;
5859
import java.nio.file.StandardCopyOption;
5960
import java.util.ArrayList;
6061
import java.util.Arrays;
@@ -476,7 +477,9 @@ public void testGetRepos() throws Exception {
476477
File.separator + "closed").toPath());
477478

478479
// test
479-
assertEquals(Arrays.asList("/mercurial", "/mercurial/closed"), repos);
480+
assertEquals(
481+
new ArrayList<>(Arrays.asList(Paths.get("/mercurial").toString(), Paths.get("/mercurial/closed").toString())),
482+
repos);
480483

481484
// Test the types. There should be only one type for project with
482485
// multiple nested Mercurial repositories.

0 commit comments

Comments
 (0)