swagger-ui via bower and middleware

This commit is contained in:
domaindrivendev
2015-09-22 15:12:28 -07:00
parent 527bbd1cc3
commit c01edd2ded
66 changed files with 38131 additions and 106 deletions

View File

@@ -0,0 +1,14 @@
module SwaggerRails
class SwaggerUi < ActionDispatch::Static
IGNORE_PATHS = [ '', '/', '/index.html' ]
def call(env)
# Serve index.html via swagger_ui_controller
if IGNORE_PATHS.include?(env['PATH_INFO'])
@app.call(env)
else
super(env)
end
end
end
end