rspec-api-docs 0.14.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +9 -2
- data/lib/rspec_api_docs/formatter/resource/example.rb +3 -3
- data/lib/rspec_api_docs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 429a0afbea16cd5fab5920685e2f16838f1a21db064866dd40b0eff090067fa7
|
|
4
|
+
data.tar.gz: 6183e6c6a015ceef0dc302c9228a1220fbd9db0f4dea53e198db118d84a3e902
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afaabc98ee7a6582c7c6e468db19f317ad9f52e9e808f8098aed2c1d7aba298749a7a24e4801825f7471a2d3a493c25c1e95606347837768dace45d983b400f1
|
|
7
|
+
data.tar.gz: 7c24db70cfe476134d29d9d0bbb526f860821dc06037529cc9834bc094991f59d45fbecdb2d1f86f0684b51d6b45520260091b8260fe6e59321e5d45c860c62b
|
data/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
## 0.
|
|
9
|
+
## [1.0.0] - 2018-09-24
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- The JSON response body will only be documented when the content type is `application/json` [#12] ([@2potatocakes])
|
|
13
|
+
|
|
14
|
+
## [0.14.0] - 2018-07-21
|
|
10
15
|
|
|
11
16
|
### Added
|
|
12
17
|
- This CHANGELOG file.
|
|
@@ -14,8 +19,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
14
19
|
### Changed
|
|
15
20
|
- Include the request body in the generated JSON [#9] ([@2potatocakes])
|
|
16
21
|
|
|
17
|
-
[Unreleased]: https://github.com/twe4ked/rspec-api-docs/compare/
|
|
22
|
+
[Unreleased]: https://github.com/twe4ked/rspec-api-docs/compare/v1.0.0...HEAD
|
|
23
|
+
[1.0.0]: https://github.com/twe4ked/rspec-api-docs/compare/v0.14.0...v1.0.0
|
|
18
24
|
[0.14.0]: https://github.com/twe4ked/rspec-api-docs/compare/v0.13.0...v0.14.0
|
|
19
25
|
|
|
20
26
|
[#9]: https://github.com/twe4ked/rspec-api-docs/pull/9
|
|
27
|
+
[#12]: https://github.com/twe4ked/rspec-api-docs/pull/12
|
|
21
28
|
[@2potatocakes]: https://github.com/2potatocakes
|
|
@@ -62,7 +62,7 @@ module RspecApiDocs
|
|
|
62
62
|
request_content_type: request.content_type,
|
|
63
63
|
response_status: response.status,
|
|
64
64
|
response_status_text: response_status_text(response.status),
|
|
65
|
-
response_body: response_body(response.body),
|
|
65
|
+
response_body: response_body(response.body, content_type: response.content_type),
|
|
66
66
|
response_headers: response_headers(response.headers),
|
|
67
67
|
response_content_type: response.content_type,
|
|
68
68
|
}
|
|
@@ -132,8 +132,8 @@ module RspecApiDocs
|
|
|
132
132
|
body_content.empty? ? nil : body_content
|
|
133
133
|
end
|
|
134
134
|
|
|
135
|
-
def response_body(body)
|
|
136
|
-
unless body.empty?
|
|
135
|
+
def response_body(body, content_type:)
|
|
136
|
+
unless body.empty? || content_type != 'application/json'
|
|
137
137
|
parsed_body = JSON.parse(body, symbolize_names: true)
|
|
138
138
|
response_fields.each do |f|
|
|
139
139
|
unless f.example.nil?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec-api-docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Odin Dutton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-09-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
178
178
|
version: '0'
|
|
179
179
|
requirements: []
|
|
180
180
|
rubyforge_project:
|
|
181
|
-
rubygems_version: 2.
|
|
181
|
+
rubygems_version: 2.7.6
|
|
182
182
|
signing_key:
|
|
183
183
|
specification_version: 4
|
|
184
184
|
summary: Generate API documentation using RSpec
|