.setDescription("List ghost projects.<br> " +
"With the current architecture, it's no more possible to have invisible ghost projects. Therefore, the web service is deprecated.<br> " +
"Requires 'Administer System' permission.")
- .setResponseExample(Resources.getResource(getClass(), "projects-example-ghosts.json"))
+ .setResponseExample(Resources.getResource(getClass(), "ghosts-example.json"))
.setSince("5.2")
.setDeprecatedSince("6.6")
.addPagingParams(100, MAX_LIMIT)
"Require 'Create Projects' permission.")
.setSince("5.2")
.setDeprecatedSince("6.6")
- .setResponseExample(Resources.getResource(getClass(), "projects-example-provisioned.json"))
+ .setResponseExample(Resources.getResource(getClass(), "provisioned-example.json"))
.setHandler(this)
.addPagingParams(100, MAX_LIMIT)
.addSearchQuery("sonar", "names", "keys")
--- /dev/null
+{
+ "projects": [
+ {
+ "uuid": "ce4c03d6-430f-40a9-b777-ad877c00aa4d",
+ "key": "org.apache.hbas:hbase",
+ "name": "HBase",
+ "creationDate": "2015-03-04T23:03:44+0100",
+ "visibility": "public"
+ },
+ {
+ "uuid": "c526ef20-131b-4486-9357-063fa64b5079",
+ "key": "com.microsoft.roslyn:roslyn",
+ "name": "Roslyn",
+ "creationDate": "2013-03-04T23:03:44+0100",
+ "visibility": "private"
+ }
+ ],
+ "total": 2,
+ "p": 1,
+ "ps": 100
+}
+++ /dev/null
-{
- "projects": [
- {
- "uuid": "ce4c03d6-430f-40a9-b777-ad877c00aa4d",
- "key": "org.apache.hbas:hbase",
- "name": "HBase",
- "creationDate": "2015-03-04T23:03:44+0100",
- "visibility": "public"
- },
- {
- "uuid": "c526ef20-131b-4486-9357-063fa64b5079",
- "key": "com.microsoft.roslyn:roslyn",
- "name": "Roslyn",
- "creationDate": "2013-03-04T23:03:44+0100",
- "visibility": "private"
- }
- ],
- "total": 2,
- "p": 1,
- "ps": 100
-}
+++ /dev/null
-{
- "paging": {
- "total": 2,
- "pageIndex": 1,
- "pageSize": 100
- },
- "projects": [
- {
- "uuid": "ce4c03d6-430f-40a9-b777-ad877c00aa4d",
- "key": "org.apache.hbas:hbase",
- "name": "HBase",
- "creationDate": "2015-03-04T23:03:44+0100",
- "visibility": "public"
- },
- {
- "uuid": "c526ef20-131b-4486-9357-063fa64b5079",
- "key": "com.microsoft.roslyn:roslyn",
- "name": "Roslyn",
- "creationDate": "2013-03-04T23:03:44+0100",
- "visibility": "private"
- }
- ]
-}
--- /dev/null
+{
+ "paging": {
+ "total": 2,
+ "pageIndex": 1,
+ "pageSize": 100
+ },
+ "projects": [
+ {
+ "uuid": "ce4c03d6-430f-40a9-b777-ad877c00aa4d",
+ "key": "org.apache.hbas:hbase",
+ "name": "HBase",
+ "creationDate": "2015-03-04T23:03:44+0100",
+ "visibility": "public"
+ },
+ {
+ "uuid": "c526ef20-131b-4486-9357-063fa64b5079",
+ "key": "com.microsoft.roslyn:roslyn",
+ "name": "Roslyn",
+ "creationDate": "2013-03-04T23:03:44+0100",
+ "visibility": "private"
+ }
+ ]
+}
*/
package org.sonar.server.project.ws;
-import com.google.common.io.Resources;
import java.util.function.Consumer;
import org.apache.commons.lang.StringUtils;
import org.junit.Rule;
.setParam("organization", organization.getKey())
.execute();
- assertJson(result.getInput())
- .isSimilarTo(Resources.getResource(getClass(), "projects-example-ghosts.json"));
+ assertJson(result.getInput()).isSimilarTo(ws.getDef().responseExampleAsString());
}
@Test
*/
package org.sonar.server.project.ws;
-import com.google.common.io.Resources;
import org.apache.commons.lang.StringUtils;
import org.junit.Rule;
import org.junit.Test;
.setParam(PARAM_ORGANIZATION, org.getKey())
.execute();
- assertJson(result.getInput())
- .isSimilarTo(Resources.getResource(getClass(), "projects-example-provisioned.json"));
+ assertJson(result.getInput()).isSimilarTo(ws.getDef().responseExampleAsString());
}
@Test