X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5d7bef4122c59bec9145f2853b76170b4ddca67f..6b77f5f193b9c7e931d2e0b0712c1b27cd547fc8:/services/api/app/controllers/application_controller.rb diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index f986e88cde..4625ef654c 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -427,7 +427,7 @@ class ApplicationController < ActionController::Base def append_info_to_payload(payload) super - payload[:request_id] = response.headers['X-Request-Id'] + payload[:request_id] = request.request_id payload[:client_ipaddr] = @remote_ip payload[:client_auth] = current_api_client_authorization.andand.uuid || nil end @@ -619,7 +619,11 @@ class ApplicationController < ActionController::Base def self._create_requires_parameters { - select: { type: 'array', required: false }, + select: { + type: 'array', + description: "Attributes of the new object to return in the response.", + required: false, + }, ensure_unique_name: { type: "boolean", description: "Adjust name to ensure uniqueness instead of returning an error on (owner_uuid, name) collision.", @@ -638,13 +642,21 @@ class ApplicationController < ActionController::Base def self._update_requires_parameters { - select: { type: 'array', required: false }, + select: { + type: 'array', + description: "Attributes of the updated object to return in the response.", + required: false, + }, } end def self._show_requires_parameters { - select: { type: 'array', required: false }, + select: { + type: 'array', + description: "Attributes of the object to return in the response.", + required: false, + }, } end @@ -653,7 +665,11 @@ class ApplicationController < ActionController::Base filters: { type: 'array', required: false }, where: { type: 'object', required: false }, order: { type: 'array', required: false }, - select: { type: 'array', required: false }, + select: { + type: 'array', + description: "Attributes of each object to return in the response.", + required: false, + }, distinct: { type: 'boolean', required: false, default: false }, limit: { type: 'integer', required: false, default: DEFAULT_LIMIT }, offset: { type: 'integer', required: false, default: 0 }, @@ -672,11 +688,6 @@ class ApplicationController < ActionController::Base } end - def client_accepts_plain_text_stream - (request.headers['Accept'].split(' ') & - ['text/plain', '*/*']).count > 0 - end - def render *opts if opts.first response = opts.first[:json]