Merge branch '16561-listen-url'
[arvados.git] / services / api / app / controllers / application_controller.rb
index f986e88cdebc19def2ac84c66190eddb6dfd90dd..4625ef654c05cdd177cfa87312a67c677e9a2973 100644 (file)
@@ -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]