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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rails/swagger/engine.rb +3 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ca0079ec6e56d59984482c58ba8f88848f0c4cf
4
- data.tar.gz: 74419e6fdc5516c8f86b52791c56c7acce3b0904
3
+ metadata.gz: 042e9785d813113e7b564fbf749427f2ffe1e1b1
4
+ data.tar.gz: a0c8e5dc0cdb6bfab7aeb99d90320daeeab983e3
5
5
  SHA512:
6
- metadata.gz: 9513137bdc27e6caed663bf6a6efe819ae089be425d9b9d1eecac25a1fc00b26f37d3d84bc70aec51fa4fea51fc536cd8c763765703b82307c68f9c9ebfe6951
7
- data.tar.gz: f047a592844a8cf8b44fee3ee267ac09916674295b92de1325ca30382184e0d303c74d9bfc4c15582d9cf3f903c9b1d8e9e012e8d8c1ac05bc684ee9bed6c1af
6
+ metadata.gz: 9c105c75ccfc2ba21357a383f66cdc979c9643d1850c9d35e7f69fbb33951095265ae601c79cf3e2740c80d843953be0212a67249ab53a67233d64cef1a8bc5a
7
+ data.tar.gz: 3b2957c92d4b5645cb845f24e6e439bda15d90b9413496c6b57e98cdb87ca4ebc0c9d630de8de91acc59ccfebb47aabd6cdd03231e7c072f78c405f004f29a42
@@ -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.1
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-13 00:00:00.000000000 Z
11
+ date: 2017-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jschema