dox 2.1.0 → 2.2.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 +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +146 -0
- data/lib/dox/entities/example.rb +10 -3
- data/lib/dox/version.rb +1 -1
- metadata +4 -5
- data/CHANGES.md +0 -113
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ac14990e1aed86a15afdb17c5c35ad6ac8a53f77048b6b1603b60b33aef6525
|
|
4
|
+
data.tar.gz: d3b39910094b5bbb713a9955846484a191490e4679cb342e944ddcfd97485613
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d38a2f5c4a68bdc79ee57242008ec9b5d838478c75788404b83cabaa1faf886479495eeefaab182288a020a2b3bda5b7c800e2dcc82161b69a50ff23d5bef72d
|
|
7
|
+
data.tar.gz: 3d1f9d58ea318955a97cc1dccd6d6fa79bcf622b169e5d198a6dde5c3e1b97fdfa15dc36f4d3ada5393de72a43508b794ba69d95f75e8627836b2cb83f731e01
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.6.7
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v2.2.0 (2022-11-03)
|
|
4
|
+
|
|
5
|
+
### Enhancements
|
|
6
|
+
|
|
7
|
+
- Prepare dox for Rails 7.1 - Start using `#media_type` on request and response objects (removes following deprecation message):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
DEPRECATION WARNING: Rails 7.1 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead.
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## v2.1.0 (2021-03-26)
|
|
14
|
+
|
|
15
|
+
### Enhancements
|
|
16
|
+
|
|
17
|
+
- Added 'activesupport' as a runtime dependency
|
|
18
|
+
- Dropped 'rails' as a runtime dependency
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## v2.0.0 (2020-08-08)
|
|
22
|
+
|
|
23
|
+
### Enhancements
|
|
24
|
+
|
|
25
|
+
- Added `Dox.config.title`
|
|
26
|
+
- Added `Dox.config.header_description`
|
|
27
|
+
- Added `Dox.config.version`
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Breaking changes / Deprecations
|
|
31
|
+
|
|
32
|
+
- [BREAKING] The API description format changed from API-blueprint to OpenAPI.
|
|
33
|
+
- [BREAKING] Base structure is now defined in .json format
|
|
34
|
+
- [BREAKING] Output is written to a .json file
|
|
35
|
+
- [BREAKING] Html is rendered with Redoc instead of Aglio
|
|
36
|
+
- [BREAKING] Renamed `Dox.config.desc_folder_path` -> `Dox.config.descriptions_location`
|
|
37
|
+
- [BREAKING] Removed `endpoint` method from document resource block
|
|
38
|
+
- [DEPRECATED] `Dox.config.header_file_path`
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## v1.3.0 (2021-03-26)
|
|
42
|
+
|
|
43
|
+
### Enhancements
|
|
44
|
+
|
|
45
|
+
- Added 'activesupport' as a runtime dependency
|
|
46
|
+
- Dropped 'rails' as a runtime dependency
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## v1.2.0 (2019-11-27)
|
|
50
|
+
|
|
51
|
+
### Enhancements
|
|
52
|
+
|
|
53
|
+
- Support Multipart payload with pretty formatting (based on `content-type` header)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bugfixes
|
|
57
|
+
|
|
58
|
+
- Explicit passing of an empty hash for `params` in actions now works as expected
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## v1.1.0 (2018-02-19)
|
|
62
|
+
|
|
63
|
+
### Enhancements
|
|
64
|
+
|
|
65
|
+
- Full RSpec failure dump to stderr if any test fails when running tests with Dox::Formatter
|
|
66
|
+
- Support any payload format with pretty formatting for JSON and XML (based on `content-type` header)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Bugfixes
|
|
70
|
+
|
|
71
|
+
- Ignore subdomain request header in headers output
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## v1.0.2 (2017-06-10)
|
|
75
|
+
|
|
76
|
+
### Enhancements
|
|
77
|
+
|
|
78
|
+
- Set minimal Ruby version to 2.x
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Bugfixes
|
|
82
|
+
|
|
83
|
+
- Fixed parsing blank request body string
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## v1.0.1 (2017-06-10)
|
|
87
|
+
|
|
88
|
+
### Enhancements
|
|
89
|
+
|
|
90
|
+
- Add Rake tasks for generating documentation to Readme
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Bugfixes
|
|
94
|
+
|
|
95
|
+
- Fix printing request body for test examples
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## v1.0.0 (2017-05-06)
|
|
99
|
+
|
|
100
|
+
### Enhancements
|
|
101
|
+
|
|
102
|
+
- Guess path params for URI definition from example's request object
|
|
103
|
+
- Validate HTTP verbs specified in the descriptors' actions
|
|
104
|
+
- Document only examples whitelisted with `dox` tag
|
|
105
|
+
- Added option for whitelisting additional HTTP headers for examples
|
|
106
|
+
- Show request HTTP verb and fullpath for each action request
|
|
107
|
+
- Dox executable
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Bugfixes
|
|
111
|
+
|
|
112
|
+
- Ignore body in query params (Rails 4 issue) for example request URL
|
|
113
|
+
- Pull request and response objects from example metadata
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## v1.0.0.alpha (2016-10-18)
|
|
117
|
+
|
|
118
|
+
### Enhancements
|
|
119
|
+
|
|
120
|
+
- Updated the dependencies
|
|
121
|
+
- `extend Dox::DSL::Syntax` instead of `include Dox::DSL::Syntax` in descriptors
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Breaking changes / Deprecations
|
|
125
|
+
|
|
126
|
+
- [BREAKING] Raise errors on missing required dox attributes in descriptors
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## v0.0.3 (2016-06-22)
|
|
130
|
+
|
|
131
|
+
### Bugfixes
|
|
132
|
+
|
|
133
|
+
- Fixed example identifier for examples with query params
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## v0.0.2 (2016-06-14)
|
|
137
|
+
|
|
138
|
+
### Enhancements
|
|
139
|
+
|
|
140
|
+
- Created core classes and a DSL for manipulating the examples in specs
|
|
141
|
+
- Added usage to readme
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## v0.0.1 (2016-06-06)
|
|
145
|
+
|
|
146
|
+
- First release of the dox gem where the initial gem skeleton has been created
|
data/lib/dox/entities/example.rb
CHANGED
|
@@ -5,10 +5,8 @@ module Dox
|
|
|
5
5
|
|
|
6
6
|
attr_reader :desc, :name, :request_schema, :response_schema_success, :response_schema_fail
|
|
7
7
|
|
|
8
|
-
def_delegator :response, :status, :response_status
|
|
9
|
-
def_delegator :response, :content_type, :response_content_type
|
|
10
|
-
def_delegator :request, :content_type, :request_content_type
|
|
11
8
|
def_delegator :request, :method, :request_method
|
|
9
|
+
def_delegator :response, :status, :response_status
|
|
12
10
|
|
|
13
11
|
def initialize(details, request, response)
|
|
14
12
|
@desc = details[:description]
|
|
@@ -53,6 +51,15 @@ module Dox
|
|
|
53
51
|
end
|
|
54
52
|
end
|
|
55
53
|
|
|
54
|
+
# Rails 7 changes content_type result
|
|
55
|
+
def request_content_type
|
|
56
|
+
request.respond_to?(:media_type) ? request.media_type : request.content_type
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def response_content_type
|
|
60
|
+
response.respond_to?(:media_type) ? response.media_type : response.content_type
|
|
61
|
+
end
|
|
62
|
+
|
|
56
63
|
private
|
|
57
64
|
|
|
58
65
|
def format_content(http_env, content_type)
|
data/lib/dox/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Melita Kokot
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|
|
@@ -193,7 +193,7 @@ files:
|
|
|
193
193
|
- ".rubocop.yml"
|
|
194
194
|
- ".ruby-version"
|
|
195
195
|
- ".travis.yml"
|
|
196
|
-
-
|
|
196
|
+
- CHANGELOG.md
|
|
197
197
|
- CODE_OF_CONDUCT.md
|
|
198
198
|
- Gemfile
|
|
199
199
|
- LICENSE.txt
|
|
@@ -256,8 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
256
256
|
- !ruby/object:Gem::Version
|
|
257
257
|
version: '0'
|
|
258
258
|
requirements: []
|
|
259
|
-
|
|
260
|
-
rubygems_version: 2.7.6.2
|
|
259
|
+
rubygems_version: 3.0.3.1
|
|
261
260
|
signing_key:
|
|
262
261
|
specification_version: 4
|
|
263
262
|
summary: Generates API documentation for rspec in OpenAPI format.
|
data/CHANGES.md
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Version 2.1.0
|
|
4
|
-
|
|
5
|
-
Released on March 26, 2021
|
|
6
|
-
|
|
7
|
-
Add:
|
|
8
|
-
- 'activesupport' as a runtime dependency
|
|
9
|
-
|
|
10
|
-
Drop:
|
|
11
|
-
- 'rails' as a runtime dependency
|
|
12
|
-
|
|
13
|
-
## Version 2.0.0
|
|
14
|
-
|
|
15
|
-
Released on August 8, 2020
|
|
16
|
-
|
|
17
|
-
Change:
|
|
18
|
-
- BREAKING CHANGE The API description format changed from API-blueprint to OpenAPI.
|
|
19
|
-
- BREAKING CHANGE Base structure is now defined in .json format
|
|
20
|
-
- BREAKING CHANGE Output is written to a .json file
|
|
21
|
-
- BREAKING CHANGE Html is rendered with Redoc instead of Aglio
|
|
22
|
-
- Renamed `Dox.config.desc_folder_path` -> `Dox.config.descriptions_location`
|
|
23
|
-
- Depricated `Dox.config.header_file_path`
|
|
24
|
-
- Removed `endpoint` method from document resource block
|
|
25
|
-
|
|
26
|
-
New:
|
|
27
|
-
- Added `Dox.config.title`
|
|
28
|
-
- Added `Dox.config.header_description`
|
|
29
|
-
- Added `Dox.config.version`
|
|
30
|
-
|
|
31
|
-
## Version 1.2.0
|
|
32
|
-
|
|
33
|
-
Released on November 27, 2019
|
|
34
|
-
|
|
35
|
-
New:
|
|
36
|
-
- Support Multipart payload with pretty formatting (based on `content-type` header)
|
|
37
|
-
|
|
38
|
-
Fix:
|
|
39
|
-
- Explicit passing of an empty hash for `params` in actions now works as expected
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Version 1.1.0
|
|
43
|
-
|
|
44
|
-
Released on February 19, 2018
|
|
45
|
-
|
|
46
|
-
New:
|
|
47
|
-
- Full RSpec failure dump to stderr if any test fails when running tests with Dox::Formatter
|
|
48
|
-
- Support any payload format with pretty formatting for JSON and XML (based on `content-type` header)
|
|
49
|
-
|
|
50
|
-
Fix:
|
|
51
|
-
- Ignore subdomain request header in headers output
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## Version 1.0.1
|
|
55
|
-
|
|
56
|
-
Released on June 10, 2017
|
|
57
|
-
|
|
58
|
-
New:
|
|
59
|
-
- Add Rake tasks for generating documentation to Readme
|
|
60
|
-
|
|
61
|
-
Fix:
|
|
62
|
-
- Fix printing request body for test examples
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Version 1.0.0
|
|
66
|
-
|
|
67
|
-
Released on May 6, 2017
|
|
68
|
-
|
|
69
|
-
New:
|
|
70
|
-
- Guess path params for URI definition from example's request object
|
|
71
|
-
- Validate HTTP verbs specified in the descriptors' actions
|
|
72
|
-
- Document only examples whitelisted with `dox` tag
|
|
73
|
-
- Added option for whitelisting additional HTTP headers for examples
|
|
74
|
-
- Show request HTTP verb and fullpath for each action request
|
|
75
|
-
- Dox executable
|
|
76
|
-
|
|
77
|
-
Fix:
|
|
78
|
-
- Ignore body in query params (Rails 4 issue) for example request URL
|
|
79
|
-
- Pull request and response objects from example metadata
|
|
80
|
-
|
|
81
|
-
## Version 1.0.0.alpha
|
|
82
|
-
|
|
83
|
-
Released on October 18, 2016
|
|
84
|
-
|
|
85
|
-
- Updated the dependencies
|
|
86
|
-
|
|
87
|
-
New:
|
|
88
|
-
- Raise errors on missing required dox attributes in descriptors
|
|
89
|
-
- `extend Dox::DSL::Syntax` instead of `include Dox::DSL::Syntax` in descriptors
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## Version 0.0.3
|
|
93
|
-
|
|
94
|
-
Released on June 22, 2016
|
|
95
|
-
|
|
96
|
-
Fix:
|
|
97
|
-
- Fixed example identifier for examples with query params
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
## Version 0.0.2
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Released on June 14, 2016
|
|
104
|
-
|
|
105
|
-
- Created core classes and a DSL for manipulating the examples in specs
|
|
106
|
-
- Added usage to readme
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
## Version 0.0.1
|
|
110
|
-
|
|
111
|
-
Released on June 06, 2016
|
|
112
|
-
|
|
113
|
-
- First release of the dox gem where the initial gem skeleton has been created
|