rspec-openapi 0.1.0 → 0.18.4

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +8 -0
  3. data/.github/release.yaml +24 -0
  4. data/.github/workflows/codeql-analysis.yml +39 -0
  5. data/.github/workflows/rubocop.yml +35 -0
  6. data/.github/workflows/test.yml +46 -0
  7. data/.rspec +2 -1
  8. data/.rubocop.yml +25 -0
  9. data/.rubocop_todo.yml +52 -0
  10. data/.simplecov_spawn.rb +16 -0
  11. data/CHANGELOG.md +287 -0
  12. data/Gemfile +28 -2
  13. data/README.md +267 -28
  14. data/Rakefile +8 -4
  15. data/bin/console +4 -3
  16. data/lib/rspec/openapi/components_updater.rb +98 -0
  17. data/lib/rspec/openapi/default_schema.rb +14 -2
  18. data/lib/rspec/openapi/extractors/hanami.rb +110 -0
  19. data/lib/rspec/openapi/extractors/rack.rb +31 -0
  20. data/lib/rspec/openapi/extractors/rails.rb +66 -0
  21. data/lib/rspec/openapi/extractors.rb +5 -0
  22. data/lib/rspec/openapi/hash_helper.rb +43 -0
  23. data/lib/rspec/openapi/key_transformer.rb +25 -0
  24. data/lib/rspec/openapi/minitest_hooks.rb +50 -0
  25. data/lib/rspec/openapi/record.rb +13 -3
  26. data/lib/rspec/openapi/record_builder.rb +65 -21
  27. data/lib/rspec/openapi/result_recorder.rb +63 -0
  28. data/lib/rspec/openapi/rspec_hooks.rb +21 -0
  29. data/lib/rspec/openapi/schema_builder.rb +166 -41
  30. data/lib/rspec/openapi/schema_cleaner.rb +129 -0
  31. data/lib/rspec/openapi/schema_file.rb +25 -3
  32. data/lib/rspec/openapi/schema_merger.rb +91 -21
  33. data/lib/rspec/openapi/schema_sorter.rb +35 -0
  34. data/lib/rspec/openapi/shared_hooks.rb +15 -0
  35. data/lib/rspec/openapi/version.rb +3 -1
  36. data/lib/rspec/openapi.rb +88 -2
  37. data/rspec-openapi.gemspec +19 -11
  38. data/scripts/rspec +11 -0
  39. data/scripts/rspec_with_simplecov +48 -0
  40. data/test.png +0 -0
  41. metadata +69 -15
  42. data/.travis.yml +0 -6
  43. data/lib/rspec/openapi/hooks.rb +0 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9534432fc4ab2f67ce016ed07e0c36c687c201e4c1c01388beb4d845a24def6d
4
- data.tar.gz: e7884e1ea34519588d2c008af56faaf7c7435f5c287ec5408515a6b66d16cb7c
3
+ metadata.gz: ec34ef0e56eb4c46221d956120a836d20addbfa8d636807effad4b93cf5ac8f8
4
+ data.tar.gz: 8b2c33feefc0f7173e6f31a09c66c9824b2f3f6124a24c6f56f59f7f5ff3e938
5
5
  SHA512:
6
- metadata.gz: 50af774aa04fc4fc47a52b89ce4355b313faa5d201796aff05f30fdb275d411b6f1bfcbb7762f3a6363484cec9ab69067c70dba1fc867f163631061d0629c874
7
- data.tar.gz: 7498b91af6496b0d4a500405c194584425ca32276f6c9fedbbe92f431c370a035210f99ec103a33d595dc4f18cc2de361cea98f327a4324d3ebbd23a3bcfbb54
6
+ metadata.gz: e2e12be8f18ac6e3c6641bb3b128bad631c120f4400148f999b758b1b2820b44dd047569036c1adc4393b001a438f2595aacf5869540411ec077c054a6b8d4c3
7
+ data.tar.gz: 347a1c54c418ad9957b3137b2d7db8c0c74496b473cdaf9f14dc9e4dab0205340e510317c324ff68494e237b27a369642d7cba2687b6eaa88318a70387557f37
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "monthly"
7
+ labels:
8
+ - "chore"
@@ -0,0 +1,24 @@
1
+ changelog:
2
+ exclude:
3
+ labels:
4
+ - ignore-for-release
5
+ authors:
6
+ - octocat
7
+ categories:
8
+ - title: 🛠 Breaking Changes
9
+ labels:
10
+ - semver-major
11
+ - breaking-change
12
+ - title: 🎉 Exciting New Features
13
+ labels:
14
+ - semver-minor
15
+ - enhancement
16
+ - title: 🐞 Bugfixes
17
+ labels:
18
+ - bug
19
+ - title: 📄 Documentation
20
+ labels:
21
+ - documentation
22
+ - title: 📦 Other Changes
23
+ labels:
24
+ - "*"
@@ -0,0 +1,39 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ # The branches below must be a subset of the branches above
8
+ branches: [ "master" ]
9
+ schedule:
10
+ - cron: '20 22 * * 2'
11
+
12
+ jobs:
13
+ analyze:
14
+ name: Analyze
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ actions: read
18
+ contents: read
19
+ security-events: write
20
+
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ language: [ 'ruby' ]
25
+
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@v4
29
+
30
+ - name: Initialize CodeQL
31
+ uses: github/codeql-action/init@v3
32
+ with:
33
+ languages: ${{ matrix.language }}
34
+
35
+ - name: Autobuild
36
+ uses: github/codeql-action/autobuild@v3
37
+
38
+ - name: Perform CodeQL Analysis
39
+ uses: github/codeql-action/analyze@v3
@@ -0,0 +1,35 @@
1
+ name: "Rubocop"
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+
9
+ jobs:
10
+ rubocop:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: 3.3
23
+ bundler-cache: true
24
+
25
+ - name: Rubocop run
26
+ run: |
27
+ bash -c "
28
+ bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
29
+ [[ $? -ne 2 ]]
30
+ "
31
+
32
+ - name: Upload Sarif output
33
+ uses: github/codeql-action/upload-sarif@v3
34
+ with:
35
+ sarif_file: rubocop.sarif
@@ -0,0 +1,46 @@
1
+ name: test
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ types:
8
+ - opened
9
+ - synchronize
10
+ - reopened
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ container: ${{ matrix.ruby }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ include:
19
+ - ruby: ruby:2.7
20
+ - ruby: ruby:3.0
21
+ - ruby: ruby:3.1
22
+ - ruby: ruby:3.1
23
+ rails: 6.1.7
24
+ - ruby: ruby:3.1
25
+ rails: 7.0.8
26
+ - ruby: ruby:3.3
27
+ rails: 7.1.3.2
28
+ coverage: coverage
29
+ env:
30
+ RAILS_VERSION: ${{ matrix.rails == '' && '6.1.6' || matrix.rails }}
31
+ COVERAGE: ${{ matrix.coverage || '' }}
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - name: bundle install
35
+ run: bundle install -j$(nproc) --retry 3
36
+ - run: bundle exec rspec
37
+ timeout-minutes: 1
38
+ - run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
39
+ name: codecov-action@v4 workaround
40
+ - name: Upload coverage reports
41
+ uses: codecov/codecov-action@v5
42
+ if: matrix.coverage == 'coverage'
43
+ with:
44
+ fail_ci_if_error: true
45
+ files: ./coverage/coverage.xml
46
+ token: ${{ secrets.CODECOV_TOKEN }}
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
+ --exclude-pattern spec/requests/**/*_spec.rb
1
2
  --format documentation
3
+ --require rspec/openapi
2
4
  --color
3
- --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,25 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ NewCops: enable
5
+ SuggestExtensions: false
6
+ TargetRubyVersion: 2.7
7
+ Exclude:
8
+ - 'spec/apps/**/*'
9
+ - 'vendor/**/*'
10
+
11
+ Style/TrailingCommaInHashLiteral:
12
+ EnforcedStyleForMultiline: consistent_comma
13
+ Style/TrailingCommaInArguments:
14
+ EnforcedStyleForMultiline: consistent_comma
15
+ Style/TrailingCommaInArrayLiteral:
16
+ EnforcedStyleForMultiline: consistent_comma
17
+ Style/ClassAndModuleChildren:
18
+ EnforcedStyle: compact
19
+ Exclude:
20
+ - 'lib/rspec/openapi/version.rb'
21
+ Layout/FirstArrayElementIndentation:
22
+ EnforcedStyle: consistent
23
+ Metrics/BlockLength:
24
+ Exclude:
25
+ - 'spec/**/*'
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,52 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2024-04-20 21:25:22 UTC using RuboCop version 1.62.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 14
10
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
11
+ Metrics/AbcSize:
12
+ Max: 46
13
+
14
+ # Offense count: 1
15
+ # Configuration parameters: CountComments, CountAsOne.
16
+ Metrics/ClassLength:
17
+ Max: 195
18
+
19
+ # Offense count: 9
20
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
21
+ Metrics/CyclomaticComplexity:
22
+ Max: 13
23
+
24
+ # Offense count: 22
25
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
26
+ Metrics/MethodLength:
27
+ Max: 36
28
+
29
+ # Offense count: 5
30
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
31
+ Metrics/PerceivedComplexity:
32
+ Max: 13
33
+
34
+ # Offense count: 1
35
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
36
+ # SupportedStyles: snake_case, normalcase, non_integer
37
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
38
+ Naming/VariableNumber:
39
+ Exclude:
40
+ - 'spec/integration_tests/roda_test.rb'
41
+
42
+ # Offense count: 7
43
+ # Configuration parameters: AllowedConstants.
44
+ Style/Documentation:
45
+ Exclude:
46
+ - 'spec/**/*'
47
+ - 'test/**/*'
48
+ - 'lib/rspec/openapi.rb'
49
+ - 'lib/rspec/openapi/minitest_hooks.rb'
50
+ - 'lib/rspec/openapi/result_recorder.rb'
51
+ - 'lib/rspec/openapi/schema_file.rb'
52
+ - 'lib/rspec/openapi/shared_hooks.rb'
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ unless ENV['COVERAGE'] && ENV['COVERAGE'].empty?
4
+ require 'simplecov'
5
+ require 'simplecov-cobertura'
6
+
7
+ SimpleCov.at_fork.call(Process.pid)
8
+ SimpleCov.formatter SimpleCov::Formatter::MultiFormatter.new([
9
+ SimpleCov::Formatter::CoberturaFormatter,
10
+ ])
11
+ SimpleCov.start do
12
+ enable_coverage :branch
13
+ add_filter '/spec/'
14
+ add_filter '/scripts/'
15
+ end
16
+ end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,290 @@
1
+ # THIS CHANGELOG IS DEPRECATED!!
2
+
3
+ Refer https://github.com/exoego/rspec-openapi/releases instead.
4
+
5
+ ## v0.12.0
6
+
7
+ - feat: Initial support of complex schema with manually-added `oneOf`
8
+ [#174](https://github.com/exoego/rspec-openapi/pull/174)
9
+ - chore: Test with Ruby 3.3 and Rails 7.1.x
10
+ [#169](https://github.com/exoego/rspec-openapi/pull/169)
11
+
12
+ ## v0.11.0
13
+ - feat: Allow path-based config overrides
14
+ [#162](https://github.com/exoego/rspec-openapi/pull/162)
15
+ - enhancement: Sort HTTP methods, response status codes, and contents lexicographically
16
+ [#163](https://github.com/exoego/rspec-openapi/pull/163)
17
+ - enhancement: Remove parameters that conflict with security schemas
18
+ [#166](https://github.com/exoego/rspec-openapi/pull/166)
19
+
20
+ ## v0.10.0
21
+ - bugfix: Merge parameter data to preserve description in manually edited Openapi spec
22
+ [#149](https://github.com/exoego/rspec-openapi/pull/149)
23
+ - feat: Add ability to configure which path params to ignore
24
+ [#150](https://github.com/exoego/rspec-openapi/pull/150)
25
+ - feat: Add custom title
26
+ [#147](https://github.com/exoego/rspec-openapi/pull/147)
27
+ - feat: Add ability to define custom summary and tags builders
28
+ [#148](https://github.com/exoego/rspec-openapi/pull/148)
29
+ - enhancement: Sort paths lexicographically so the order of paths is more stable and predictable
30
+ [#155](https://github.com/exoego/rspec-openapi/pull/155)
31
+ - enhancement: requestBody should not merge requestBody from error examples
32
+ [#154](https://github.com/exoego/rspec-openapi/pull/154)
33
+
34
+ ## v0.9.0
35
+ - bugfix: Fix engine path resolution
36
+ [#113](https://github.com/exoego/rspec-openapi/pull/113)
37
+ - bugfix: fix multiple uploaded files
38
+ [#117](https://github.com/exoego/rspec-openapi/pull/117), [#126](https://github.com/exoego/rspec-openapi/pull/126)
39
+ - feat: Add required_request_params to metadata
40
+ [#114](https://github.com/exoego/rspec-openapi/pull/114)
41
+ - bugfix(minitest):
42
+ [#128](https://github.com/exoego/rspec-openapi/pull/128)
43
+ - doc(minitest): Add instructions for minitest triggered yaml generation
44
+ [#116](https://github.com/exoego/rspec-openapi/pull/116)
45
+ - chore: Don't dump records into temporary file
46
+ [#127](https://github.com/exoego/rspec-openapi/pull/127)
47
+
48
+ ## v0.8.1
49
+ - bugfix: Empty `required` array should not be present.
50
+ [#111](https://github.com/exoego/rspec-openapi/pull/111)
51
+
52
+ ## v0.8.0
53
+ - Set `required` in request body and response body
54
+ [#95](https://github.com/exoego/rspec-openapi/pull/95), [#98](https://github.com/exoego/rspec-openapi/pull/98)
55
+ - Generate OpenAPI with minitest instead of RSpec
56
+ [#90](https://github.com/exoego/rspec-openapi/pull/90)
57
+ - Generate security schemas via RSpec::OpenAPI.security_schemes
58
+ [#84](https://github.com/exoego/rspec-openapi/pull/84)
59
+ - Bunch of refactorings
60
+
61
+ ## v0.7.2
62
+ - $ref enhancements: Support $ref in arbitrary depth
63
+ [#82](https://github.com/k0kubun/rspec-openapi/pull/82)
64
+
65
+ ## v0.7.1
66
+ - $ref enhancements: Auto-generate components referenced in "items"
67
+ [#80](https://github.com/k0kubun/rspec-openapi/pull/80)
68
+ - Administration
69
+ - Setup RuboCop
70
+ [#73](https://github.com/k0kubun/rspec-openapi/pull/73)
71
+ - Setup CodeQL
72
+ [#73](https://github.com/k0kubun/rspec-openapi/pull/73)
73
+ - Bump Rails v6.0.3.x to fix bundle failure
74
+ [#72](https://github.com/k0kubun/rspec-openapi/pull/72)
75
+
76
+ ## v0.7.0
77
+ - Generate Response Headers
78
+ [#69](https://github.com/k0kubun/rspec-openapi/pull/69)
79
+ - Initial support for $ref
80
+ [#67](https://github.com/k0kubun/rspec-openapi/pull/67)
81
+ - Fixed an empty array is turned into nullable object wrongly
82
+ [#70](https://github.com/k0kubun/rspec-openapi/pull/70)
83
+
84
+ ## v0.6.1
85
+
86
+ * Stabilize the order parameter objects and preserve newer examples
87
+ [#59](https://github.com/k0kubun/rspec-openapi/pull/59)
88
+
89
+ ## v0.6.0
90
+
91
+ * Replace `RSpec::OpenAPI.server_urls` with `RSpec::OpenAPI.servers`
92
+ [#60](https://github.com/k0kubun/rspec-openapi/pull/60)
93
+
94
+ ## v0.5.1
95
+
96
+ * Clarify the version requirement for actionpack
97
+ [#62](https://github.com/k0kubun/rspec-openapi/pull/62)
98
+
99
+ ## v0.5.0
100
+
101
+ * Overwrite fields in an existing schema file instead of leaving all existing fields as is
102
+ [#55](https://github.com/k0kubun/rspec-openapi/pull/55)
103
+
104
+ ## v0.4.8
105
+
106
+ * Fix a bug in nested parameters handling
107
+ [#46](https://github.com/k0kubun/rspec-openapi/pull/46)
108
+
109
+ ## v0.4.7
110
+
111
+ * Add `info` config hash
112
+ [#43](https://github.com/k0kubun/rspec-openapi/pull/43)
113
+
114
+ ## v0.4.6
115
+
116
+ * Fix "No route matched for" error in engine routes
117
+ [#38](https://github.com/k0kubun/rspec-openapi/pull/38)
118
+
119
+ ## v0.4.5
120
+
121
+ * Fix linter issues for `tags` and `summary`
122
+ [#40](https://github.com/k0kubun/rspec-openapi/pull/40)
123
+
124
+ ## v0.4.4
125
+
126
+ * De-duplicate parameters by a combination of `name` and `in`
127
+ [#39](https://github.com/k0kubun/rspec-openapi/pull/39)
128
+
129
+ ## v0.4.3
130
+
131
+ * Allow customizing `schema`, `description`, and `tags` through `:openapi` metadata
132
+ [#36](https://github.com/k0kubun/rspec-openapi/pull/36)
133
+
134
+ ## v0.4.2
135
+
136
+ * Allow using Proc as `RSpec::OpenAPI.path`
137
+ [#35](https://github.com/k0kubun/rspec-openapi/pull/35)
138
+
139
+ ## v0.4.1
140
+
141
+ * Add `RSpec::OpenAPI.example_types` to hook types other than `type: :request`.
142
+ [#32](https://github.com/k0kubun/rspec-openapi/pull/32)
143
+
144
+ ## v0.4.0
145
+
146
+ * Drop `RSpec::OpenAPI.output` introduced in v0.3.20
147
+ * Guess whether it's JSON or not by the extension of `RSpec::OpenAPI.path`
148
+
149
+ ## v0.3.20
150
+
151
+ * Add `RSpec::OpenAPI.output` config to output JSON
152
+ [#31](https://github.com/k0kubun/rspec-openapi/pull/31)
153
+
154
+ ## v0.3.19
155
+
156
+ * Add `server_urls` and `request_headers` configs
157
+ [#30](https://github.com/k0kubun/rspec-openapi/pull/30)
158
+
159
+ ## v0.3.18
160
+
161
+ * Support nested query parameters
162
+ [#29](https://github.com/k0kubun/rspec-openapi/pull/29)
163
+
164
+ ## v0.3.17
165
+
166
+ * Rescue NotImplementedError in the after suite hook as well
167
+ [#28](https://github.com/k0kubun/rspec-openapi/pull/28)
168
+
169
+ ## v0.3.16
170
+
171
+ * Use `media_type` instead of `content_type` for Rails 6.1
172
+ [#26](https://github.com/k0kubun/rspec-openapi/pull/26)
173
+ * Avoid crashing the after suite hook when it fails to build schema
174
+ [#27](https://github.com/k0kubun/rspec-openapi/pull/27)
175
+
176
+ ## v0.3.15
177
+
178
+ * Fix an error when Content-Disposition header is inline
179
+ [#24](https://github.com/k0kubun/rspec-openapi/pull/24)
180
+
181
+ ## v0.3.14
182
+
183
+ * Avoid an error when an application calls `request.body.read`
184
+ [#20](https://github.com/k0kubun/rspec-openapi/pull/20)
185
+
186
+ ## v0.3.13
187
+
188
+ * Avoid crashing when there's no request made in a spec
189
+ [#19](https://github.com/k0kubun/rspec-openapi/pull/19)
190
+
191
+ ## v0.3.12
192
+
193
+ * Generate `nullable: true` for null fields in schema
194
+ [#18](https://github.com/k0kubun/rspec-openapi/pull/18)
195
+
196
+ ## v0.3.11
197
+
198
+ * Show a filename as an `example` for `ActionDispatch::Http::UploadedFile`
199
+ [#17](https://github.com/k0kubun/rspec-openapi/pull/17)
200
+
201
+ ## v0.3.10
202
+
203
+ * Add `info.version`
204
+ [#16](https://github.com/k0kubun/rspec-openapi/pull/16)
205
+
206
+ ## v0.3.9
207
+
208
+ * Initial support for multipart/form-data
209
+ [#12](https://github.com/k0kubun/rspec-openapi/pull/12)
210
+
211
+ ## v0.3.8
212
+
213
+ * Generate `type: 'number', format: 'float'` instead of `type: 'float'` for Float
214
+ [#11](https://github.com/k0kubun/rspec-openapi/issues/11)
215
+
216
+ ## v0.3.7
217
+
218
+ * Classify tag names and remove controller names from summary in Rails
219
+
220
+ ## v0.3.6
221
+
222
+ * Fix documents generated by Rails engines
223
+
224
+ ## v0.3.5
225
+
226
+ * Support finding routes in Rails engines
227
+
228
+ ## v0.3.4
229
+
230
+ * Generate tags by controller names
231
+ [#10](https://github.com/k0kubun/rspec-openapi/issues/10)
232
+
233
+ ## v0.3.3
234
+
235
+ * Avoid `JSON::ParserError` when a response body is no content
236
+ [#9](https://github.com/k0kubun/rspec-openapi/issues/9)
237
+
238
+ ## v0.3.2
239
+
240
+ * Stop generating format as path parameters in Rails
241
+ [#8](https://github.com/k0kubun/rspec-openapi/issues/8)
242
+
243
+ ## v0.3.1
244
+
245
+ * Add `RSpec::OpenAPI.description_builder` config to dynamically generate a description [experimental]
246
+ [#6](https://github.com/k0kubun/rspec-openapi/issues/6)
247
+
248
+ ## v0.3.0
249
+
250
+ * Initial support of rack-test and non-Rails apps [#5](https://github.com/k0kubun/rspec-openapi/issues/5)
251
+
252
+ ## v0.2.2
253
+
254
+ * Allow disabling `example` by `RSpec::OpenAPI.enable_example = false`
255
+
256
+ ## v0.2.1
257
+
258
+ * Generate `example` of request body and path / query params
259
+ [#4](https://github.com/k0kubun/rspec-openapi/issues/4)
260
+ * Remove a wrapper param created by Rails in request body
261
+ [#4](https://github.com/k0kubun/rspec-openapi/issues/4)
262
+
263
+ ## v0.2.0
264
+
265
+ * Generate `example` of response body [#3](https://github.com/k0kubun/rspec-openapi/issues/3)
266
+
267
+ ## v0.1.5
268
+
269
+ * Support detecting `float` type [#2](https://github.com/k0kubun/rspec-openapi/issues/2)
270
+
271
+ ## v0.1.4
272
+
273
+ * Avoid NoMethodError on nil Content-Type
274
+ * Include a space between controller and action in summary
275
+
276
+ ## v0.1.3
277
+
278
+ * Add `RSpec::OpenAPI.comment` configuration
279
+
280
+ ## v0.1.2
281
+
282
+ * Generate `required: true` for path params [#1](https://github.com/k0kubun/rspec-openapi/issues/1)
283
+
284
+ ## v0.1.1
285
+
286
+ * Generate a path like `/{id}` instead of `/:id`
287
+
1
288
  ## v0.1.0
2
289
 
3
290
  * Initial release
data/Gemfile CHANGED
@@ -1,8 +1,34 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in rspec-openapi.gemspec
4
6
  gemspec
5
7
 
6
- gem 'rails', '6.0.3.2'
8
+ gem 'rails', ENV['RAILS_VERSION'] || '6.0.6.1'
9
+
10
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
11
+ gem 'hanami', ENV['HANAMI_VERSION'] || '2.1.0'
12
+ gem 'hanami-controller', ENV['HANAMI_VERSION'] || '2.1.0'
13
+ gem 'hanami-router', ENV['HANAMI_VERSION'] || '2.1.0'
14
+
15
+ gem 'dry-logger', '1.0.3'
16
+ end
17
+
18
+ gem 'concurrent-ruby', '1.3.4'
19
+
20
+ gem 'roda'
21
+
22
+ gem 'rails-dom-testing', '~> 2.2'
7
23
  gem 'rspec-rails'
8
- gem 'pry'
24
+
25
+ group :test do
26
+ gem 'simplecov', git: 'https://github.com/exoego/simplecov.git', branch: 'branch-fix'
27
+ gem 'simplecov-cobertura'
28
+ gem 'super_diff'
29
+ end
30
+
31
+ group :development do
32
+ gem 'code-scanning-rubocop'
33
+ gem 'pry'
34
+ end