Releases: skryukov/skooma
v0.3.7
What's Changed
- Add support for symbolic response codes by @alexkalderimis in #50
- Add schemas for OAS 3.1.2 & 3.2.0 by @skryukov in #51
New Contributors
- @alexkalderimis made their first contribution in #50
Full Changelog: v0.3.6...v0.3.7
v0.3.6
Added
- Add OpenAPI 3.1.1 schemas to enable schema validation. (@Envek)
Fixed
- Fix examples and callbacks support in Components. (@goodtouch)
New Contributors
- @goodtouch made their first contribution in #47
- @Envek made their first contribution in #48
Full Changelog: v0.3.5...v0.3.6
v0.3.5
Fixed
-
Fix the Enforce Access mode with additional properties. (@aburgel)
-
Introduce coverage storage to fix Minitest parallel workers reports. (@skarlcf)
-
Introduce
use_patterns_for_path_matchingoption to allow usingpathpatterns for path matching. (@jandouwebeekman)# spec/rails_helper.rb RSpec.configure do |config| # To enable path patterns, pass `use_patterns_for_path_matching: true` option: config.include Skooma::RSpec[Rails.root.join("docs", "openapi.yml"), use_patterns_for_path_matching: true], type: :request end
New Contributors
- @aburgel made their first contribution in #46
- @jandouwebeekman made their first contribution in #43
- @skarlcf made their first contribution in #36
Full Changelog: v0.3.4...v0.3.5
v0.3.4
Added
-
Experimental support for
readOnlyandwriteOnlykeywords. (@skryukov)# spec/rails_helper.rb RSpec.configure do |config| # To enable support for readOnly and writeOnly keywords, pass `enforce_access_modes: true` option: config.include Skooma::RSpec[Rails.root.join("docs", "openapi.yml"), enforce_access_modes: true], type: :request end
The enforce_access_modes option enables using one schema for both request and response bodies. For example, this schema will expect exactly {name, password} for POST/PUT request bodies and {id, name} for responses:
components:
schemas:
User:
type: object
required: [id, name, password]
additionalProperties: false
properties:
id:
type: integer
format: int64
readOnly: true
name:
type: string
password:
type: string
writeOnly: true- Support fallback parsers for vendor-specific media types. (@pvcarrera, @skryukov)
Full Changelog: v0.3.3...v0.3.4
v0.3.3
Fixed
- Fix coverage for Minitest. (@skryukov)
- Updated example comment for
Skooma::Minitestclass. (@artyomlagun)
New Contributors
- @artyomlagun made their first contribution in #32
Full Changelog: v0.3.2...v0.3.3
v0.3.2
Fixed
- Fix deprecation
MiniTest::Unit.after_tests is now Minitest.after_run. (@barnaclebarnes) - Exclude test helpers from eager loading. (@skryukov)
- Update oas-3.1 base schema. (@skryukov)
New Contributors
- @barnaclebarnes made their first contribution in #24
Full Changelog: v0.3.1...v0.3.2
v0.3.1
Added
-
Add coverage for tested API operations. (@skryukov)
# spec/rails_helper.rb RSpec.configure do |config| # To enable coverage, pass `coverage: :report` option, # and to raise an error when an operation is not covered, pass `coverage: :strict` option: config.include Skooma::RSpec[Rails.root.join("docs", "openapi.yml"), coverage: :report], type: :request end
$ bundle exec rspec # ... OpenAPI schema /openapi.yml coverage report: 110 / 194 operations (56.7%) covered. Uncovered paths: GET /api/uncovered 200 GET /api/partially_covered 403 # ...
Full Changelog: v0.3.0...v0.3.1
v0.3.0
Changed
-
BREAKING CHANGE: Pass
headersparameter to registeredBodyParsers. (@skryukov)# Before: Skooma::BodyParsers.register("application/xml", ->(body) { Hash.from_xml(body) }) # After: Skooma::BodyParsers.register("application/xml", ->(body, headers:) { Hash.from_xml(body) })
Fixed
- Fix wrong path when combined with Rails exceptions_app. (@ursm)
New Contributors
Full Changelog: v0.2.2...v0.3.0
v0.2.2
Added
- Add support for APIs mounted under a path prefix. (@skryukov)
# spec/rails_helper.rb
RSpec.configure do |config|
# ...
path_to_openapi = Rails.root.join("docs", "openapi.yml")
# pass path_prefix option if your API is mounted under a prefix:
config.include Skooma::RSpec[path_to_openapi, path_prefix: "/internal/api"], type: :request
endChanged
- Bump
json_skoomaversion to~> 0.2.0. (@skryukov)
Fixed
- Better checks to automatic request/response detection to prevent methods overrides via RSpec helpers (i.e.
subject(:response)). (@skryukov) - Fail response validation when expected response code or
responseskeyword aren't listed. (@skryukov)
Full Changelog: v0.2.1...v0.2.2