rails-swagger 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails/swagger/engine.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 042e9785d813113e7b564fbf749427f2ffe1e1b1
|
4
|
+
data.tar.gz: a0c8e5dc0cdb6bfab7aeb99d90320daeeab983e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c105c75ccfc2ba21357a383f66cdc979c9643d1850c9d35e7f69fbb33951095265ae601c79cf3e2740c80d843953be0212a67249ab53a67233d64cef1a8bc5a
|
7
|
+
data.tar.gz: 3b2957c92d4b5645cb845f24e6e439bda15d90b9413496c6b57e98cdb87ca4ebc0c9d630de8de91acc59ccfebb47aabd6cdd03231e7c072f78c405f004f29a42
|
data/lib/rails/swagger/engine.rb
CHANGED
@@ -95,6 +95,9 @@ module Rails
|
|
95
95
|
# instance of `ActionDispatch::Routing::Mapper`.
|
96
96
|
self.routes.draw do
|
97
97
|
scope module: base_module.name.underscore, format: false do
|
98
|
+
get "swagger.json", to: -> (env) do
|
99
|
+
[200, {"Content-Type" => "application/json"}, [engine.schema.to_json]]
|
100
|
+
end
|
98
101
|
router.draw self
|
99
102
|
end
|
100
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-swagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenaniah Cerny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jschema
|