X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bef091f69353d5a1ec7ef6c4e84f81756023596b..0ee50ba86dd58c64384af28a55105421e8b0ad36:/services/api/app/controllers/arvados/v1/schema_controller.rb diff --git a/services/api/app/controllers/arvados/v1/schema_controller.rb b/services/api/app/controllers/arvados/v1/schema_controller.rb index 6f893bcc85..adac9960c4 100644 --- a/services/api/app/controllers/arvados/v1/schema_controller.rb +++ b/services/api/app/controllers/arvados/v1/schema_controller.rb @@ -17,7 +17,13 @@ class Arvados::V1::SchemaController < ApplicationController def index expires_in 24.hours, public: true - discovery = Rails.cache.fetch 'arvados_v1_rest_discovery' do + send_json discovery_doc + end + + protected + + def discovery_doc + Rails.cache.fetch 'arvados_v1_rest_discovery' do Rails.application.eager_load! discovery = { kind: "discovery#restDescription", @@ -38,6 +44,7 @@ class Arvados::V1::SchemaController < ApplicationController rootUrl: root_url, servicePath: "arvados/v1/", batchPath: "batch", + uuidPrefix: Rails.application.config.uuid_prefix, defaultTrashLifetime: Rails.application.config.default_trash_lifetime, blobSignatureTtl: Rails.application.config.blob_signature_ttl, maxRequestSize: Rails.application.config.max_request_size, @@ -49,8 +56,19 @@ class Arvados::V1::SchemaController < ApplicationController crunchLogThrottleLines: Rails.application.config.crunch_log_throttle_lines, crunchLimitLogBytesPerJob: Rails.application.config.crunch_limit_log_bytes_per_job, crunchLogPartialLineThrottlePeriod: Rails.application.config.crunch_log_partial_line_throttle_period, + remoteHosts: Rails.configuration.remote_hosts, + remoteHostsViaDNS: Rails.configuration.remote_hosts_via_dns, websocketUrl: Rails.application.config.websocket_address, workbenchUrl: Rails.application.config.workbench_address, + keepWebServiceUrl: Rails.application.config.keep_web_service_url, + gitUrl: case Rails.application.config.git_repo_https_base + when false + '' + when true + 'https://git.%s.arvadosapi.com/' % Rails.configuration.uuid_prefix + else + Rails.application.config.git_repo_https_base + end, parameters: { alt: { type: "string", @@ -105,7 +123,7 @@ class Arvados::V1::SchemaController < ApplicationController end object_properties = {} k.columns. - select { |col| col.name != 'id' }. + select { |col| col.name != 'id' && !col.name.start_with?('secret_') }. collect do |col| if k.serialized_attributes.has_key? col.name object_properties[col.name] = { @@ -380,6 +398,5 @@ class Arvados::V1::SchemaController < ApplicationController end discovery end - send_json discovery end end