From be141b88fe871c7e72b19a5cf1e0aa56bf28283a Mon Sep 17 00:00:00 2001 From: "Joshua C. Randall" Date: Sat, 12 Nov 2016 15:13:37 +0000 Subject: [PATCH] Switch from no_count to count to avoid issues with arv CLI / trollop --- services/api/app/controllers/application_controller.rb | 4 ++-- services/api/app/controllers/arvados/v1/schema_controller.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index ffbef1852b..1114ae14df 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -482,7 +482,7 @@ class ApplicationController < ActionController::Base :limit => @limit, :items => @objects.as_api_response(nil, {select: @select}) } - if params[:no_count].nil? || !params[:no_count] + if params[:count].nil? || params[:count] if @objects.respond_to? :except list[:items_available] = @objects. except(:limit).except(:offset). @@ -550,7 +550,7 @@ class ApplicationController < ActionController::Base distinct: { type: 'boolean', required: false }, limit: { type: 'integer', required: false, default: DEFAULT_LIMIT }, offset: { type: 'integer', required: false, default: 0 }, - no_count: { type: 'boolean', required: false, default: false }, + count: { type: 'boolean', required: false, default: true}, } end diff --git a/services/api/app/controllers/arvados/v1/schema_controller.rb b/services/api/app/controllers/arvados/v1/schema_controller.rb index a2f5c18209..3952db61b0 100644 --- a/services/api/app/controllers/arvados/v1/schema_controller.rb +++ b/services/api/app/controllers/arvados/v1/schema_controller.rb @@ -254,9 +254,10 @@ class Arvados::V1::SchemaController < ApplicationController description: "Return each distinct object.", location: "query" }, - no_count: { + count: { type: "boolean", - description: "Don't count items_available.", + description: "Count items_available.", + default: "true", location: "query" } }, -- 2.30.2