projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
closes #8079
[arvados.git]
/
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 a2a5759c739bc1af3e83b586bd8dff96f1268e79..ba0f90f90c45d95925df0ae7892815d0b5c490b6 100644
(file)
--- a/
services/api/app/controllers/arvados/v1/schema_controller.rb
+++ b/
services/api/app/controllers/arvados/v1/schema_controller.rb
@@
-1,9
+1,16
@@
class Arvados::V1::SchemaController < ApplicationController
class Arvados::V1::SchemaController < ApplicationController
+ skip_before_filter :catch_redirect_hint
skip_before_filter :find_objects_for_index
skip_before_filter :find_object_by_uuid
skip_before_filter :find_objects_for_index
skip_before_filter :find_object_by_uuid
+ skip_before_filter :load_filters_param
+ skip_before_filter :load_limit_offset_order_params
+ skip_before_filter :load_read_auths
+ skip_before_filter :load_where_param
skip_before_filter :render_404_if_no_object
skip_before_filter :require_auth_scope
skip_before_filter :render_404_if_no_object
skip_before_filter :require_auth_scope
+ include DbCurrentTime
+
def index
expires_in 24.hours, public: true
discovery = Rails.cache.fetch 'arvados_v1_rest_discovery' do
def index
expires_in 24.hours, public: true
discovery = Rails.cache.fetch 'arvados_v1_rest_discovery' do
@@
-15,16
+22,21
@@
class Arvados::V1::SchemaController < ApplicationController
name: "arvados",
version: "v1",
revision: "20131114",
name: "arvados",
version: "v1",
revision: "20131114",
- generatedAt: Time.now.iso8601,
+ source_version: AppVersion.hash,
+ generatedAt: db_current_time.iso8601,
title: "Arvados API",
description: "The API to interact with Arvados.",
documentationLink: "http://doc.arvados.org/api/index.html",
title: "Arvados API",
description: "The API to interact with Arvados.",
documentationLink: "http://doc.arvados.org/api/index.html",
+ defaultCollectionReplication: Rails.configuration.default_collection_replication,
protocol: "rest",
baseUrl: root_url + "arvados/v1/",
basePath: "/arvados/v1/",
rootUrl: root_url,
servicePath: "arvados/v1/",
batchPath: "batch",
protocol: "rest",
baseUrl: root_url + "arvados/v1/",
basePath: "/arvados/v1/",
rootUrl: root_url,
servicePath: "arvados/v1/",
batchPath: "batch",
+ defaultTrashLifetime: Rails.application.config.default_trash_lifetime,
+ blobSignatureTtl: Rails.application.config.blob_signature_ttl,
+ maxRequestSize: Rails.application.config.max_request_size,
parameters: {
alt: {
type: "string",
parameters: {
alt: {
type: "string",
@@
-57,10
+69,10
@@
class Arvados::V1::SchemaController < ApplicationController
auth: {
oauth2: {
scopes: {
auth: {
oauth2: {
scopes: {
- "https://api.c
linicalfutur
e.com/auth/arvados" => {
+ "https://api.c
urovers
e.com/auth/arvados" => {
description: "View and manage objects"
},
description: "View and manage objects"
},
- "https://api.c
linicalfutur
e.com/auth/arvados.readonly" => {
+ "https://api.c
urovers
e.com/auth/arvados.readonly" => {
description: "View objects"
}
}
description: "View objects"
}
}
@@
-170,8
+182,8
@@
class Arvados::V1::SchemaController < ApplicationController
"$ref" => k.to_s
},
scopes: [
"$ref" => k.to_s
},
scopes: [
- "https://api.c
linicalfutur
e.com/auth/arvados",
- "https://api.c
linicalfutur
e.com/auth/arvados.readonly"
+ "https://api.c
urovers
e.com/auth/arvados",
+ "https://api.c
urovers
e.com/auth/arvados.readonly"
]
},
list: {
]
},
list: {
@@
-247,8
+259,8
@@
class Arvados::V1::SchemaController < ApplicationController
"$ref" => "#{k.to_s}List"
},
scopes: [
"$ref" => "#{k.to_s}List"
},
scopes: [
- "https://api.c
linicalfutur
e.com/auth/arvados",
- "https://api.c
linicalfutur
e.com/auth/arvados.readonly"
+ "https://api.c
urovers
e.com/auth/arvados",
+ "https://api.c
urovers
e.com/auth/arvados.readonly"
]
},
create: {
]
},
create: {
@@
-269,7
+281,7
@@
class Arvados::V1::SchemaController < ApplicationController
"$ref" => k.to_s
},
scopes: [
"$ref" => k.to_s
},
scopes: [
- "https://api.c
linicalfutur
e.com/auth/arvados"
+ "https://api.c
urovers
e.com/auth/arvados"
]
},
update: {
]
},
update: {
@@
-297,7
+309,7
@@
class Arvados::V1::SchemaController < ApplicationController
"$ref" => k.to_s
},
scopes: [
"$ref" => k.to_s
},
scopes: [
- "https://api.c
linicalfutur
e.com/auth/arvados"
+ "https://api.c
urovers
e.com/auth/arvados"
]
},
delete: {
]
},
delete: {
@@
-317,7
+329,7
@@
class Arvados::V1::SchemaController < ApplicationController
"$ref" => k.to_s
},
scopes: [
"$ref" => k.to_s
},
scopes: [
- "https://api.c
linicalfutur
e.com/auth/arvados"
+ "https://api.c
urovers
e.com/auth/arvados"
]
}
}
]
}
}
@@
-344,7
+356,7
@@
class Arvados::V1::SchemaController < ApplicationController
"$ref" => (action == 'index' ? "#{k.to_s}List" : k.to_s)
},
scopes: [
"$ref" => (action == 'index' ? "#{k.to_s}List" : k.to_s)
},
scopes: [
- "https://api.c
linicalfutur
e.com/auth/arvados"
+ "https://api.c
urovers
e.com/auth/arvados"
]
}
route.segment_keys.each do |key|
]
}
route.segment_keys.each do |key|
@@
-389,6
+401,6
@@
class Arvados::V1::SchemaController < ApplicationController
end
discovery
end
end
discovery
end
-
render json:
discovery
+
send_json
discovery
end
end
end
end