]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 Initial work on Coding Rules app init WS
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 14 May 2014 15:28:48 +0000 (17:28 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 14 May 2014 15:38:15 +0000 (17:38 +0200)
sonar-core/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
sonar-server/src/main/java/org/sonar/server/rule2/ws/AppAction.java [new file with mode: 0644]
sonar-server/src/main/java/org/sonar/server/rule2/ws/RulesWebService.java
sonar-server/src/test/java/org/sonar/server/rule2/ws/AppActionTest.java [new file with mode: 0644]
sonar-server/src/test/java/org/sonar/server/rule2/ws/RulesWebServiceTest.java
sonar-server/src/test/resources/org/sonar/server/rule2/ws/AppActionTest/app.json [new file with mode: 0644]

index 4bd463979006adb892bfaab73d16b7423926c547..1081d4f61e0112d9b608268ad3afd047f38e261a 100644 (file)
@@ -87,6 +87,7 @@ min=Min
 minor=Minor
 more=More
 more_actions=More Actions
+moreCriteria=+ More Criteria
 name=Name
 name_too_long_x=Name is too long (maximum is {0} characters)
 none=None
@@ -1739,6 +1740,70 @@ rules.status.deprecated=Deprecated
 rules.status.ready=Ready
 
 
+#------------------------------------------------------------------------------
+#
+# CODING RULES
+#
+#------------------------------------------------------------------------------
+coding_rules.activate=Activate
+coding_rules.activate_in=Activate In
+coding_rules.activate_in_quality_profile=Activate In Quality Profile
+coding_rules.activate_in_all_quality_profiles=Activate In All {0} Profiles
+coding_rules.add_note=Add Note
+coding_rules.available_since=Available Since
+coding_rules.bulk_change=Bulk Change
+coding_rules.change_severity=Change Severity
+coding_rules.change_severity_in=Change Severity In
+coding_rules.change_details=Change Details of Quality Profile
+coding_rules.extend_description=Extend Description
+coding_rules.deactivate_in=Deactivate In
+coding_rules.deactivate=Deactivate
+coding_rules.deactivate_in_quality_profile=Deactivate In Quality Profile
+coding_rules.deactivate_in_all_quality_profiles=Deactivate In All {0} Profiles
+coding_rules.found=Found
+coding_rules.inherits="{0}" inherits "{1}"
+coding_rules.key=Key:
+coding_rules.new_search=New Search
+coding_rules.no_results=No Coding Rules
+coding_rules.no_tags=No tags
+coding_rules.order=Order
+coding_rules.ordered_by=Ordered By
+coding_rules.original=Original:
+coding_rules.page=Coding Rules
+coding_rules.parameters=Parameters
+coding_rules.parameters.default_value=Default Value:
+coding_rules.permalink=Permalink
+coding_rules.quality_profiles=Quality Profiles
+coding_rules.quality_profile=Quality Profile
+coding_rules.repository=Repository:
+coding_rules.revert_to_parent_definition=Revert to Parent Definition
+coding_rules._rules=rules
+coding_rules.select_tag=Select Tag
+
+coding_rules.filters.activation=Activation
+coding_rules.filters.activation.active=Active
+coding_rules.filters.activation.inactive=Inactive
+coding_rules.filters.activation.help=Activation criterion is available when a quality profile is selected
+coding_rules.filters.availableSince=Available Since
+coding_rules.filters.characteristic=Characteristic
+coding_rules.filters.description=Description
+coding_rules.filters.quality_profile=Quality Profile
+coding_rules.filters.inheritance=Inheritance
+coding_rules.filters.inheritance.inactive=Inheritance criterion is available when an inherited quality profile is selected
+coding_rules.filters.inheritance.not_inherited=Not Inherited
+coding_rules.filters.inheritance.inherited=Inherited
+coding_rules.filters.inheritance.overriden=Overriden
+coding_rules.filters.key=Key
+coding_rules.filters.language=Language
+coding_rules.filters.name=Name
+coding_rules.filters.repository=Repository
+coding_rules.filters.severity=Severity
+coding_rules.filters.status=Status
+coding_rules.filters.tag=Tag
+
+coding_rules.sort.creation_date=Creation Date
+coding_rules.sort.name=Name
+
 #------------------------------------------------------------------------------
 #
 # EMAIL CONFIGURATION
index 4d6d34a8e76d46fb9b96e937a66efa66f31f0c8b..3e92fc1e203eff822ca8f73f327b0cc0f4a7f155 100644 (file)
@@ -120,11 +120,7 @@ import org.sonar.server.qualityprofile.RegisterQualityProfiles;
 import org.sonar.server.qualityprofile.index.ActiveRuleIndex;
 import org.sonar.server.qualityprofile.index.ActiveRuleNormalizer;
 import org.sonar.server.qualityprofile.persistence.ActiveRuleDao;
-import org.sonar.server.qualityprofile.ws.BulkRuleActivationActions;
-import org.sonar.server.qualityprofile.ws.ProfilesWs;
-import org.sonar.server.qualityprofile.ws.QProfileRecreateBuiltInAction;
-import org.sonar.server.qualityprofile.ws.QProfilesWs;
-import org.sonar.server.qualityprofile.ws.RuleActivationActions;
+import org.sonar.server.qualityprofile.ws.*;
 import org.sonar.server.rule.*;
 import org.sonar.server.rule.ws.*;
 import org.sonar.server.rule2.RegisterRules;
@@ -340,6 +336,7 @@ class ServerComponents {
     pico.addSingleton(org.sonar.server.rule2.ws.ShowAction.class);
     pico.addSingleton(TagsAction.class);
     pico.addSingleton(SetTagsAction.class);
+    pico.addSingleton(org.sonar.server.rule2.ws.AppAction.class);
 
     // rule tags
     pico.addSingleton(ESRuleTags.class);
diff --git a/sonar-server/src/main/java/org/sonar/server/rule2/ws/AppAction.java b/sonar-server/src/main/java/org/sonar/server/rule2/ws/AppAction.java
new file mode 100644 (file)
index 0000000..cfdbb51
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonar.server.rule2.ws;
+
+import org.elasticsearch.common.collect.Maps;
+import org.sonar.api.i18n.I18n;
+import org.sonar.api.resources.Language;
+import org.sonar.api.resources.Languages;
+import org.sonar.api.rule.RuleStatus;
+import org.sonar.api.server.debt.DebtCharacteristic;
+import org.sonar.api.server.debt.DebtModel;
+import org.sonar.api.server.debt.internal.DefaultDebtCharacteristic;
+import org.sonar.api.server.ws.Request;
+import org.sonar.api.server.ws.RequestHandler;
+import org.sonar.api.server.ws.Response;
+import org.sonar.api.server.ws.WebService;
+import org.sonar.api.utils.text.JsonWriter;
+import org.sonar.server.qualityprofile.QProfile;
+import org.sonar.server.qualityprofile.QProfiles;
+import org.sonar.server.rule.RuleRepositories;
+import org.sonar.server.rule.RuleRepositories.Repository;
+
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @since 4.4
+ */
+public class AppAction implements RequestHandler {
+
+  private static final String[] MESSAGES = {
+    "all", // All
+    "any", // Any
+    "apply", // Apply
+    "are_you_sure", // Are you sure?
+    "bold", // Bold
+    "bulk_change", // Bulk Change
+    "bulleted_point", // Bulleted point
+    "cancel", // Cancel
+    "change_verb", // Change
+    "code", // Code
+    "delete", // Delete
+    "Done", // Done
+    "edit", // Edit
+    "markdown.helplink", // Markdown Help
+    "moreCriteria", // + More Criteria
+    "save", // Save
+    "search_verb", // Search
+    "severity", // Severity
+    "update_verb", // Update
+
+    "severity.BLOCKER", // Blocker
+    "severity.CRITICAL", // Critical
+    "severity.MAJOR", // Major
+    "severity.MINOR", // Minor
+    "severity.INFO", // Info
+
+    "coding_rules.activate", // Activate
+    "coding_rules.activate_in", // Activate In
+    "coding_rules.activate_in_quality_profile", // Activate In Quality Profile
+    "coding_rules.activate_in_all_quality_profiles", // Activate In All {0} Profiles
+    "coding_rules.add_note", // Add Note
+    "coding_rules.available_since", // Available Since
+    "coding_rules.bulk_change", // Bulk Change
+    "coding_rules.change_severity", // Change Severity
+    "coding_rules.change_severity_in", // Change Severity In
+    "coding_rules.change_details", // Change Details of Quality Profile
+    "coding_rules.extend_description", // Extend Description
+    "coding_rules.deactivate_in", // Deactivate In
+    "coding_rules.deactivate", // Deactivate
+    "coding_rules.deactivate_in_quality_profile", // Deactivate In Quality Profile
+    "coding_rules.deactivate_in_all_quality_profiles", // Deactivate In All {0} Profiles
+    "coding_rules.found", // Found
+    "coding_rules.inherits", // "{0}" inherits "{1}"
+    "coding_rules.key", // Key:
+    "coding_rules.new_search", // New Search
+    "coding_rules.no_results", // No Coding Rules
+    "coding_rules.no_tags", // No tags
+    "coding_rules.order", // Order
+    "coding_rules.ordered_by", // Ordered By
+    "coding_rules.original", // Original:
+    "coding_rules.page", // Coding Rules
+    "coding_rules.parameters", // Parameters
+    "coding_rules.parameters.default_value", // Default Value:
+    "coding_rules.permalink", // Permalink
+    "coding_rules.quality_profiles", // Quality Profiles
+    "coding_rules.quality_profile", // Quality Profile
+    "coding_rules.repository", // Repository:
+    "coding_rules.revert_to_parent_definition", // Revert to Parent Definition
+    "coding_rules._rules", // rules
+    "coding_rules.select_tag", // Select Tag
+
+    "coding_rules.filters.activation", // Activation
+    "coding_rules.filters.activation.active", // Active
+    "coding_rules.filters.activation.inactive", // Inactive
+    "coding_rules.filters.activation.help", // Activation criterion is available when a quality profile is selected
+    "coding_rules.filters.availableSince", // Available Since
+    "coding_rules.filters.characteristic", // Characteristic
+    "coding_rules.filters.description", // Description
+    "coding_rules.filters.quality_profile", // Quality Profile
+    "coding_rules.filters.inheritance", // Inheritance
+    "coding_rules.filters.inheritance.inactive", // Inheritance criterion is available when an inherited quality profile is selected
+    "coding_rules.filters.inheritance.not_inherited", // Not Inherited
+    "coding_rules.filters.inheritance.inherited", // Inherited
+    "coding_rules.filters.inheritance.overriden", // Overriden
+    "coding_rules.filters.key", // Key
+    "coding_rules.filters.language", // Language
+    "coding_rules.filters.name", // Name
+    "coding_rules.filters.repository", // Repository
+    "coding_rules.filters.severity", // Severity
+    "coding_rules.filters.status", // Status
+    "coding_rules.filters.tag", // Tag
+
+    "coding_rules.sort.creation_date", // Creation Date
+    "coding_rules.sort.name" // Name
+  };
+
+  private final Languages languages;
+  private final RuleRepositories ruleRepositories;
+  private final I18n i18n;
+  private final DebtModel debtModel;
+  private final QProfiles qProfiles;
+
+  public AppAction(Languages languages, RuleRepositories ruleRepositories, I18n i18n, DebtModel debtModel, QProfiles qProfiles) {
+    this.languages = languages;
+    this.ruleRepositories = ruleRepositories;
+    this.i18n = i18n;
+    this.debtModel = debtModel;
+    this.qProfiles = qProfiles;
+  }
+
+  @Override
+  public void handle(Request request, Response response) throws Exception {
+    JsonWriter json = response.newJsonWriter();
+    json.beginObject();
+    addProfiles(json);
+    addLanguages(json);
+    addRuleRepositories(json);
+    addStatuses(json);
+    addCharacteristics(json);
+    addMessages(json);
+    json.endObject().close();
+  }
+
+  private void addProfiles(JsonWriter json) {
+    json.name("qualityprofiles").beginArray();
+    for (QProfile profile: qProfiles.allProfiles()) {
+      json.beginObject()
+        .prop("name", profile.name())
+        .prop("lang", profile.language())
+        .prop("parent", profile.parent())
+        .endObject();
+    }
+    json.endArray();
+  }
+
+  private void addLanguages(JsonWriter json) {
+    json.name("languages").beginObject();
+    for (Language language: languages.all()) {
+      json.prop(language.getKey(), language.getName());
+    }
+    json.endObject();
+  }
+
+  private void addRuleRepositories(JsonWriter json) {
+    json.name("repositories").beginArray();
+    for (Repository repo: ruleRepositories.repositories()) {
+      json.beginObject()
+        .prop("key", repo.key())
+        .prop("name", repo.name())
+        .prop("language", repo.language())
+        .endObject();
+    }
+    json.endArray();
+  }
+
+  private void addStatuses(JsonWriter json) {
+    json.name("statuses").beginObject();
+    for (RuleStatus status: RuleStatus.values()) {
+      if (status != RuleStatus.REMOVED) {
+        json.prop(status.toString(), i18n.message(Locale.getDefault(), "rules.status." + status.toString().toLowerCase(), status.toString()));
+      }
+    }
+    json.endObject();
+  }
+
+  private void addCharacteristics(JsonWriter json) {
+    Map<Integer, DefaultDebtCharacteristic> caracById = Maps.newHashMap();
+    for (DebtCharacteristic carac: debtModel.allCharacteristics()) {
+      DefaultDebtCharacteristic fullCarac = (DefaultDebtCharacteristic) carac;
+      caracById.put(fullCarac.id(), fullCarac);
+    }
+    json.name("characteristics").beginObject();
+    for (DefaultDebtCharacteristic carac: caracById.values()) {
+      json.prop(carac.key(), carac.isSub() ? caracById.get(carac.parentId()).name() + ": " + carac.name() : carac.name());
+    }
+    json.endObject();
+  }
+
+  private void addMessages(JsonWriter json) {
+    json.name("messages").beginObject();
+    for (String message: MESSAGES) {
+      json.prop(message, i18n.message(Locale.getDefault(), message, message));
+    }
+    json.endObject();
+  }
+
+  void define(WebService.NewController controller) {
+    controller.createAction("app")
+      .setDescription("Data required for rendering the page 'Coding Rules'")
+      .setInternal(true)
+      .setHandler(this);
+  }
+}
index b665e0c2749f08edd8383772bb1c931ebca4c7e4..37a0771fe6c42dc322c2e1a372def6f5c2f99231 100644 (file)
@@ -27,12 +27,14 @@ public class RulesWebService implements WebService {
   private final ShowAction show;
   private final TagsAction tags;
   private final SetTagsAction setTags;
+  private final AppAction app;
 
-  public RulesWebService(SearchAction search, ShowAction show, TagsAction tags, SetTagsAction setTags) {
+  public RulesWebService(SearchAction search, ShowAction show, TagsAction tags, SetTagsAction setTags, AppAction app) {
     this.search = search;
     this.show = show;
     this.tags = tags;
     this.setTags = setTags;
+    this.app = app;
   }
 
   @Override
@@ -45,6 +47,7 @@ public class RulesWebService implements WebService {
     show.define(controller);
     tags.define(controller);
     setTags.define(controller);
+    app.define(controller);
 
     controller.done();
   }
diff --git a/sonar-server/src/test/java/org/sonar/server/rule2/ws/AppActionTest.java b/sonar-server/src/test/java/org/sonar/server/rule2/ws/AppActionTest.java
new file mode 100644 (file)
index 0000000..e2d2507
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonar.server.rule2.ws;
+
+import com.google.common.collect.ImmutableList;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.stubbing.Answer;
+import org.sonar.api.i18n.I18n;
+import org.sonar.api.resources.Language;
+import org.sonar.api.resources.Languages;
+import org.sonar.api.server.debt.DebtCharacteristic;
+import org.sonar.api.server.debt.DebtModel;
+import org.sonar.api.server.debt.internal.DefaultDebtCharacteristic;
+import org.sonar.server.qualityprofile.QProfile;
+import org.sonar.server.qualityprofile.QProfiles;
+import org.sonar.server.rule.RuleRepositories;
+import org.sonar.server.ws.WsTester;
+
+import java.util.Locale;
+
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.class)
+public class AppActionTest {
+
+  @Mock
+  Languages languages;
+
+  @Mock
+  RuleRepositories ruleRepositories;
+
+  @Mock
+  I18n i18n;
+
+  @Mock
+  DebtModel debtModel;
+
+  @Mock
+  QProfiles qProfiles;
+
+  @Test
+  public void should_generate_app_init_info() throws Exception {
+    WsTester tester = new WsTester(new RulesWebService(
+      mock(SearchAction.class), mock(ShowAction.class), mock(TagsAction.class), mock(SetTagsAction.class),
+      new AppAction(languages, ruleRepositories, i18n, debtModel, qProfiles)));
+
+
+    QProfile profile1 = new QProfile().setName("Profile One").setLanguage("bf");
+    QProfile profile2 = new QProfile().setName("Profile Two").setLanguage("bf").setParent("Profile One");
+    when(qProfiles.allProfiles()).thenReturn(ImmutableList.of(profile1, profile2));
+
+    Language brainfsck = mock(Language.class);
+    when(brainfsck.getKey()).thenReturn("bf");
+    when(brainfsck.getName()).thenReturn("Brainf*ck");
+    Language whitespace = mock(Language.class);
+    when(whitespace.getKey()).thenReturn("ws");
+    when(whitespace.getName()).thenReturn("Whitespace");
+    when(languages.all()).thenReturn(new Language[] { brainfsck, whitespace });
+
+    RuleRepositories.Repository repo1 = mock(RuleRepositories.Repository.class);
+    when(repo1.key()).thenReturn("squid");
+    when(repo1.name()).thenReturn("SonarQube");
+    when(repo1.language()).thenReturn("bf");
+    RuleRepositories.Repository repo2 = mock(RuleRepositories.Repository.class);
+    when(repo2.key()).thenReturn("squid");
+    when(repo2.name()).thenReturn("SonarQube");
+    when(repo2.language()).thenReturn("ws");
+    when(ruleRepositories.repositories()).thenReturn(ImmutableList.of(repo1, repo2));
+
+    when(i18n.message(isA(Locale.class), anyString(), anyString())).thenAnswer(new Answer<String>() {
+      @Override
+      public String answer(InvocationOnMock invocation) throws Throwable {
+        return (String) invocation.getArguments()[1];
+      }
+    });
+
+    int parentId = 42;
+    DefaultDebtCharacteristic char1 = new DefaultDebtCharacteristic();
+    char1.setId(parentId).setKey("REUSABILITY").setName("Reusability");
+    DefaultDebtCharacteristic char2 = new DefaultDebtCharacteristic();
+    char2.setId(24).setParentId(parentId).setKey("MODULARITY").setName("Modularity");
+    when(debtModel.allCharacteristics()).thenReturn(ImmutableList.<DebtCharacteristic>of(char1, char2));
+
+    tester.newGetRequest("api/rules2", "app").execute().assertJson(this.getClass(), "app.json");
+  }
+}
index 08ecaf0a911564d0dd906d695f06571ee2132ec3..d416f30ec101ebc52af1952e0dc56352c55eb5d1 100644 (file)
@@ -82,11 +82,12 @@ public class RulesWebServiceTest {
     WebService.Controller controller = context.controller("api/rules2");
 
     assertThat(controller).isNotNull();
-    assertThat(controller.actions()).hasSize(4);
+    assertThat(controller.actions()).hasSize(5);
     assertThat(controller.action("search")).isNotNull();
     assertThat(controller.action("show")).isNotNull();
     assertThat(controller.action("tags")).isNotNull();
     assertThat(controller.action("set_tags")).isNotNull();
+    assertThat(controller.action("app")).isNotNull();
   }
 
   @Test
@@ -234,4 +235,4 @@ public class RulesWebServiceTest {
       .setInheritance("NONE")
       .setSeverity("BLOCKER");
   }
-}
\ No newline at end of file
+}
diff --git a/sonar-server/src/test/resources/org/sonar/server/rule2/ws/AppActionTest/app.json b/sonar-server/src/test/resources/org/sonar/server/rule2/ws/AppActionTest/app.json
new file mode 100644 (file)
index 0000000..98b084b
--- /dev/null
@@ -0,0 +1,109 @@
+{
+  "qualityprofiles": [
+    {"name": "Profile One", "lang": "bf"},
+    {"name": "Profile Two", "lang": "bf", "parent": "Profile One"}
+  ],
+  "languages": {
+    "bf": "Brainf*ck",
+    "ws": "Whitespace"
+  },
+  "repositories": [
+    {"key": "squid", "name": "SonarQube", "language": "bf"},
+    {"key": "squid", "name": "SonarQube", "language": "ws"},
+  ],
+  "statuses": {
+    "BETA": "rules.status.beta",
+    "DEPRECATED": "rules.status.deprecated",
+    "READY": "rules.status.ready"
+  },
+  "characteristics": {
+    "REUSABILITY": "Reusability",
+    "MODULARITY": "Reusability: Modularity"
+  },
+  "messages": {
+    "all": "all",
+    "any": "any",
+    "apply": "apply",
+    "are_you_sure": "are_you_sure",
+    "bold": "bold",
+    "bulk_change": "bulk_change",
+    "bulleted_point": "bulleted_point",
+    "cancel": "cancel",
+    "change_verb": "change_verb",
+    "code": "code",
+    "delete": "delete",
+    "Done": "Done",
+    "edit": "edit",
+    "markdown.helplink": "markdown.helplink",
+    "moreCriteria": "moreCriteria",
+    "save": "save",
+    "search_verb": "search_verb",
+    "severity": "severity",
+    "update_verb": "update_verb",
+
+    "severity.BLOCKER": "severity.BLOCKER",
+    "severity.CRITICAL": "severity.CRITICAL",
+    "severity.MAJOR": "severity.MAJOR",
+    "severity.MINOR": "severity.MINOR",
+    "severity.INFO": "severity.INFO",
+
+    "coding_rules.activate": "coding_rules.activate",
+    "coding_rules.activate_in": "coding_rules.activate_in",
+    "coding_rules.activate_in_quality_profile": "coding_rules.activate_in_quality_profile",
+    "coding_rules.activate_in_all_quality_profiles": "coding_rules.activate_in_all_quality_profiles",
+    "coding_rules.add_note": "coding_rules.add_note",
+    "coding_rules.available_since": "coding_rules.available_since",
+    "coding_rules.bulk_change": "coding_rules.bulk_change",
+    "coding_rules.change_severity": "coding_rules.change_severity",
+    "coding_rules.change_severity_in": "coding_rules.change_severity_in",
+    "coding_rules.change_details": "coding_rules.change_details",
+    "coding_rules.extend_description": "coding_rules.extend_description",
+    "coding_rules.deactivate_in": "coding_rules.deactivate_in",
+    "coding_rules.deactivate": "coding_rules.deactivate",
+    "coding_rules.deactivate_in_quality_profile": "coding_rules.deactivate_in_quality_profile",
+    "coding_rules.deactivate_in_all_quality_profiles": "coding_rules.deactivate_in_all_quality_profiles",
+    "coding_rules.found": "coding_rules.found",
+    "coding_rules.inherits": "coding_rules.inherits",
+    "coding_rules.key": "coding_rules.key",
+    "coding_rules.new_search": "coding_rules.new_search",
+    "coding_rules.no_results": "coding_rules.no_results",
+    "coding_rules.no_tags": "coding_rules.no_tags",
+    "coding_rules.order": "coding_rules.order",
+    "coding_rules.ordered_by": "coding_rules.ordered_by",
+    "coding_rules.original": "coding_rules.original",
+    "coding_rules.page": "coding_rules.page",
+    "coding_rules.parameters": "coding_rules.parameters",
+    "coding_rules.parameters.default_value": "coding_rules.parameters.default_value",
+    "coding_rules.permalink": "coding_rules.permalink",
+    "coding_rules.quality_profiles": "coding_rules.quality_profiles",
+    "coding_rules.quality_profile": "coding_rules.quality_profile",
+    "coding_rules.repository": "coding_rules.repository",
+    "coding_rules.revert_to_parent_definition": "coding_rules.revert_to_parent_definition",
+    "coding_rules._rules": "coding_rules._rules",
+    "coding_rules.select_tag": "coding_rules.select_tag",
+
+    "coding_rules.filters.activation": "coding_rules.filters.activation",
+    "coding_rules.filters.activation.active": "coding_rules.filters.activation.active",
+    "coding_rules.filters.activation.inactive": "coding_rules.filters.activation.inactive",
+    "coding_rules.filters.activation.help": "coding_rules.filters.activation.help",
+    "coding_rules.filters.availableSince": "coding_rules.filters.availableSince",
+    "coding_rules.filters.characteristic": "coding_rules.filters.characteristic",
+    "coding_rules.filters.description": "coding_rules.filters.description",
+    "coding_rules.filters.quality_profile": "coding_rules.filters.quality_profile",
+    "coding_rules.filters.inheritance": "coding_rules.filters.inheritance",
+    "coding_rules.filters.inheritance.inactive": "coding_rules.filters.inheritance.inactive",
+    "coding_rules.filters.inheritance.not_inherited": "coding_rules.filters.inheritance.not_inherited",
+    "coding_rules.filters.inheritance.inherited": "coding_rules.filters.inheritance.inherited",
+    "coding_rules.filters.inheritance.overriden": "coding_rules.filters.inheritance.overriden",
+    "coding_rules.filters.key": "coding_rules.filters.key",
+    "coding_rules.filters.language": "coding_rules.filters.language",
+    "coding_rules.filters.name": "coding_rules.filters.name",
+    "coding_rules.filters.repository": "coding_rules.filters.repository",
+    "coding_rules.filters.severity": "coding_rules.filters.severity",
+    "coding_rules.filters.status": "coding_rules.filters.status",
+    "coding_rules.filters.tag": "coding_rules.filters.tag",
+
+    "coding_rules.sort.creation_date": "coding_rules.sort.creation_date",
+    "coding_rules.sort.name": "coding_rules.sort.name"
+  }
+}