]> source.dussan.org Git - sonarqube.git/commitdiff
document web service and action naming conventions
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 15 May 2015 09:08:51 +0000 (11:08 +0200)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 15 May 2015 09:08:51 +0000 (11:08 +0200)
server/sonar-server/src/main/java/org/sonar/server/ws/WsAction.java
sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java

index d0d339f27b6e60781b22cf3b4aaeeaf877d3483f..04a1fb9e01375c7bb98ac07714e155744fb0b4d8 100644 (file)
@@ -25,6 +25,7 @@ import org.sonar.api.server.ws.WebService;
 
 /**
  * Since 5.2, this interface is the base for Web Service marker interfaces
+ * Convention for naming implementations: <i>web_service_class_name</i>Action. ex: ProjectsWsAction, UsersWsAction
  */
 public interface WsAction extends RequestHandler, Definable<WebService.NewController> {
   // Marker interface
index 4a22a4da47418beb28be38f805f26d492a73b23d..43e0d461c0a54336ebed468dfaee7f9268c7ded9 100644 (file)
@@ -115,7 +115,8 @@ public interface WebService extends Definable<WebService.Context> {
      *
      * @param path the controller path must not start or end with "/". It is recommended to start with "api/"
      *             and to use lower-case format with underscores, for example "api/coding_rules". Usual actions
-     *             are "search", "list", "show", "create" and "delete"
+     *             are "search", "list", "show", "create" and "delete".
+     *             the plural form is recommended - ex: api/projects
      */
     public NewController createController(String path) {
       return new NewController(this, path);