Merge pull request #239 from hdpuk86/master

update swagger-ui to 3.23.11
This commit is contained in:
Greg Myers 2020-04-04 19:53:18 +01:00 committed by GitHub
commit 05dfd08f15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 18 deletions

View File

@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
### Changed
- Update swagger-ui version to 3.23.11 [#239](https://github.com/rswag/rswag/pull/239)
### Deprecated
### Removed
### Fixed

View File

@ -50,6 +50,19 @@ Push to your fork and [submit a Pull Request][pr].
[pr]: https://github.com/rswag/rswag/compare/
## Updating Swagger UI
Find the latest versions of swagger-ui here:
https://github.com/swagger-api/swagger-ui/releases
Update the swagger-ui-dist version in the rswag-ui dependencies
```
./rswag-ui/package.json
```
Navigate to the rswag-ui folder and run npm install to update the package-lock.json
## Release
(for maintainers)

View File

@ -28,7 +28,8 @@ group :test do
gem 'rspec-rails'
gem 'generator_spec'
gem 'capybara'
gem 'capybara-webkit'
gem 'geckodriver-helper'
gem 'selenium-webdriver'
gem 'rswag-specs', path: './rswag-specs'
end

View File

@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"swagger-ui-dist": {
"version": "3.18.2",
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.18.2.tgz",
"integrity": "sha512-pWAEiKkgWUJvjmLW9AojudnutJ+NTn5g6OdNLj1iIJWwCkoy40K3Upwa24DqFbmIE4vLX4XplND61hp2L+s5vg=="
"version": "3.23.11",
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.23.11.tgz",
"integrity": "sha512-ipENHHH/sqpngTpHXUwg55eAOZ7b2UVayUwwuWPA6nQSPhjBVXX4zOPpNKUwQIFOl3oIwVvZF7mqoxH7pMgVzA=="
}
}
}

View File

@ -3,6 +3,6 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"swagger-ui-dist": "3.18.2"
"swagger-ui-dist": "3.23.11"
}
}

View File

@ -2,15 +2,15 @@
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160218212104) do
ActiveRecord::Schema.define(version: 2016_02_18_212104) do
create_table "blogs", force: :cascade do |t|
t.string "title"

View File

@ -5,8 +5,8 @@ RSpec.feature 'swagger-ui', js: true do
scenario 'browsing api-docs' do
visit '/api-docs'
expect(page).to have_content('GET /blogs Searches blogs')
expect(page).to have_content('POST /blogs Creates a blog')
expect(page).to have_content('GET /blogs/{id} Retrieves a blog')
expect(page).to have_content('GET /blogs Searches blogs', normalize_ws: true)
expect(page).to have_content('POST /blogs Creates a blog', normalize_ws: true)
expect(page).to have_content('GET /blogs/{id} Retrieves a blog', normalize_ws: true)
end
end

View File

@ -51,9 +51,12 @@ RSpec.configure do |config|
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")
Capybara.javascript_driver = :webkit
end
Capybara.register_driver :firefox_headless do |app|
options = ::Selenium::WebDriver::Firefox::Options.new
options.args << '--headless'
Capybara::Webkit.configure do |config|
config.block_unknown_urls
Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
end
Capybara.javascript_driver = :firefox_headless
end