mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 07:16:40 +00:00
swagger-ui as middleware & upgrade to 3.12.2
This commit is contained in:
4
test-app/.byebug_history
Normal file
4
test-app/.byebug_history
Normal file
@@ -0,0 +1,4 @@
|
||||
exit
|
||||
env['PATH_INFO']
|
||||
env['SCRIPT_NAME']
|
||||
env
|
||||
@@ -37,7 +37,7 @@ class BlogsController < ApplicationController
|
||||
|
||||
def save_uploaded_file(field)
|
||||
return if field.nil?
|
||||
file = File.join('tmp', field.original_filename)
|
||||
file = File.join('public/uploads', field.original_filename)
|
||||
FileUtils.cp field.tempfile.path, file
|
||||
field.original_filename
|
||||
end
|
||||
|
||||
@@ -5,5 +5,6 @@ Rswag::Ui.configure do |c|
|
||||
# JSON endpoint and the second is a title that will be displayed in the document selector
|
||||
# NOTE: If you're using rspec-api to expose Swagger files (under swagger_root) as JSON endpoints,
|
||||
# then the list below should correspond to the relative paths for those endpoints
|
||||
|
||||
c.swagger_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs'
|
||||
end
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2016_02_18_212104) do
|
||||
ActiveRecord::Schema.define(version: 20160218212104) do
|
||||
|
||||
create_table "blogs", force: :cascade do |t|
|
||||
t.string "title", limit: 255
|
||||
t.string "title"
|
||||
t.text "content"
|
||||
t.string "thumbnail", limit: 255
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "thumbnail"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
0
test-app/public/uploads/.gitkeep
Normal file
0
test-app/public/uploads/.gitkeep
Normal file
BIN
test-app/public/uploads/thumbnail.png
Normal file
BIN
test-app/public/uploads/thumbnail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -53,3 +53,7 @@ RSpec.configure do |config|
|
||||
|
||||
Capybara.javascript_driver = :webkit
|
||||
end
|
||||
|
||||
Capybara::Webkit.configure do |config|
|
||||
config.block_unknown_urls
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user