rswag-api 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/rswag/api/install/USAGE +1 -1
- data/lib/generators/rswag/api/install/install_generator.rb +1 -1
- data/lib/generators/rswag/api/install/templates/{rswag-api.rb → rswag_api.rb} +0 -0
- data/lib/rswag/api/configuration.rb +1 -1
- data/lib/rswag/api/middleware.rb +2 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6129a4ac5fd490fc4b8eadc903858e47d338041c1a5fef949de4bc49cb0622d
|
4
|
+
data.tar.gz: db9641f4174bca12a823fff82561164fc979dfb4787faf422faa84a312c8299d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0969810068efc4e74d6a2ddd6e0a267ae70197515ca2bb582669f6b5f2ee19ca11f8efc0f6cd1dffbfd9b60b2634c3fdc5697fdcf8fa2b1ed899c2152c90648
|
7
|
+
data.tar.gz: ff2968039b935e68d8eaa2fae8f9469d4694435181d552f78df86c2004144025c755e18d8c96578f91e6a4190743cc7debcfa659bdf5ed020d55be117306a1e0
|
File without changes
|
data/lib/rswag/api/middleware.rb
CHANGED
@@ -19,11 +19,12 @@ module Rswag
|
|
19
19
|
swagger = parse_file(filename)
|
20
20
|
@config.swagger_filter.call(swagger, env) unless @config.swagger_filter.nil?
|
21
21
|
mime = Rack::Mime.mime_type(::File.extname(path), 'text/plain')
|
22
|
+
headers = { 'Content-Type' => mime }.merge(@config.swagger_headers || {})
|
22
23
|
body = unload_swagger(filename, swagger)
|
23
24
|
|
24
25
|
return [
|
25
26
|
'200',
|
26
|
-
|
27
|
+
headers,
|
27
28
|
[ body ]
|
28
29
|
]
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rswag-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richie Morris
|
8
|
+
- Greg Myers
|
9
|
+
- Jay Danielian
|
8
10
|
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date:
|
13
|
+
date: 2020-04-05 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: railties
|
@@ -19,7 +21,7 @@ dependencies:
|
|
19
21
|
version: '3.1'
|
20
22
|
- - "<"
|
21
23
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
24
|
+
version: '7.0'
|
23
25
|
type: :runtime
|
24
26
|
prerelease: false
|
25
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +31,7 @@ dependencies:
|
|
29
31
|
version: '3.1'
|
30
32
|
- - "<"
|
31
33
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
34
|
+
version: '7.0'
|
33
35
|
description: Open up your API to the phenomenal Swagger ecosystem by exposing Swagger
|
34
36
|
files, that describe your service, as JSON endpoints
|
35
37
|
email:
|
@@ -42,12 +44,12 @@ files:
|
|
42
44
|
- Rakefile
|
43
45
|
- lib/generators/rswag/api/install/USAGE
|
44
46
|
- lib/generators/rswag/api/install/install_generator.rb
|
45
|
-
- lib/generators/rswag/api/install/templates/
|
47
|
+
- lib/generators/rswag/api/install/templates/rswag_api.rb
|
46
48
|
- lib/rswag/api.rb
|
47
49
|
- lib/rswag/api/configuration.rb
|
48
50
|
- lib/rswag/api/engine.rb
|
49
51
|
- lib/rswag/api/middleware.rb
|
50
|
-
homepage: https://github.com/
|
52
|
+
homepage: https://github.com/rswag/rswag
|
51
53
|
licenses:
|
52
54
|
- MIT
|
53
55
|
metadata: {}
|
@@ -66,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
68
|
- !ruby/object:Gem::Version
|
67
69
|
version: '0'
|
68
70
|
requirements: []
|
69
|
-
|
70
|
-
rubygems_version: 2.7.8
|
71
|
+
rubygems_version: 3.0.6
|
71
72
|
signing_key:
|
72
73
|
specification_version: 4
|
73
74
|
summary: A Rails Engine that exposes Swagger files as JSON endpoints
|