aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/apidocs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/apidocs_controller.rb')
-rw-r--r--app/controllers/apidocs_controller.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/app/controllers/apidocs_controller.rb b/app/controllers/apidocs_controller.rb
deleted file mode 100644
index 8b8fab8..0000000
--- a/app/controllers/apidocs_controller.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-class ApidocsController < ApplicationController
- def all
- apidocs = Rails.cache.fetch("apidocs/all") do
- nss = {}
- Api.routes.each { |route|
- next if route.route_nodoc
- next if route.route_method == "HEAD"
- namespace = route.route_namespace.sub(/^\//, "")
- nss[namespace] ||= []
- nss[namespace] << { method: route.route_method,
- description: route.route_description,
- path: route.route_path.sub(/^\//, "").sub(/\(\.:format\)$/, ""),
- params: route.route_params.map { |n, o| [n, { required: o[:required], description: o[:desc], type: o[:type] }] }.to_h,
- example_params: route.route_example_params,
- }
- }
- nss
- end
-
- render_json data: { namespaces: apidocs }
- end
-end