@Override public void define(NewController controller) { NewAction action = controller.createAction("projects") .setSince("5.2") .setHandler(this) .setDescription("List projects with their association status regarding a quality profile") .setResponseExample(getClass().getResource("projects-example.json")); action.setChangelog( new Change("7.2", "'more' response field is deprecated"), new Change("6.5", "'id' response field is deprecated"), new Change("6.0", "'uuid' response field is deprecated and replaced by 'id'"), new Change("6.0", "'key' response field has been added to return the project key")); action.createParam(PARAM_KEY) .setDescription("Quality profile key") .setRequired(true) .setExampleValue(UUID_EXAMPLE_01); action.addSelectionModeParam(); action.createSearchQuery("sonar", "projects") .setDeprecatedKey("query", "6.5"); action.createPageParam() .setDeprecatedKey("page", "6.5"); action.createPageSize(100, MAX_PAGE_SIZE); }
@Override public void define(NewController controller) { NewAction action = controller.createAction("projects") .setSince("5.2") .setHandler(this) .setDescription("List projects with their association status regarding a quality profile") .setResponseExample(getClass().getResource("projects-example.json")); action.setChangelog( new Change("7.2", "'more' response field is deprecated"), new Change("6.5", "'id' response field is deprecated"), new Change("6.0", "'uuid' response field is deprecated and replaced by 'id'"), new Change("6.0", "'key' response field has been added to return the project key")); action.createParam(PARAM_KEY) .setDescription("Quality profile key") .setRequired(true) .setExampleValue(UUID_EXAMPLE_01); action.addSelectionModeParam(); action.createSearchQuery("sonar", "projects") .setDeprecatedKey("query", "6.5"); action.createPageParam() .setDeprecatedKey("page", "6.5"); action.createPageSize(100, MAX_PAGE_SIZE); }
/** * Add predefined parameters related to pagination of results with a maximum page size. * Note the maximum is a documentation only feature. It does not check anything. */ public NewAction addPagingParams(int defaultPageSize, int maxPageSize) { createPageParam(); createPageSize(defaultPageSize, maxPageSize); return this; }
/** * Add predefined parameters related to pagination of results with a maximum page size. * Note the maximum is a documentation only feature. It does not check anything. */ public NewAction addPagingParams(int defaultPageSize, int maxPageSize) { createPageParam(); createPageSize(defaultPageSize, maxPageSize); return this; }