• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rochacbruno / flasgger / 251 / 1
91%
master: 91%

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Ran 18 Sep 2018 06:05AM UTC
Files 5
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Sep 2018 06:04AM UTC coverage: 91.184%. Remained the same
251.1

Pull #245

travis-ci

web-flow
Added configuration for swagger-ui and jquery js and css external-load URLs.

This change allows new Flasgger config keys to specify the URL location where jQuery and Swagger javascript sources,
and Swagger CSS are loaded from, allowing them to be loaded from Flasgger's static copies (default), or any URL, including hosted sources.
This can allow any compatible version of those libraries to be loaded, allowing the latest Swagger UI to be loaded by Flasgger templates.

The new, optional config keys are:

- swagger_ui_bundle_js
- swagger_ui_standalone_preset_js
- jquery_js
- swagger_ui_css

For example, the following can be used to load scripts from unpkg.com:

app = Flask(__name__)
app.config['SWAGGER'] = {
    'title': 'Colors API'
}
swagger_config = Swagger.DEFAULT_CONFIG
swagger_config['swagger_ui_bundle_js'] = '//unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js'
swagger_config['swagger_ui_standalone_preset_js'] = '//unpkg.com/swagger-ui-dist@3/swagger-ui-standalone-preset.js'
swagger_config['jquery_js'] = '//unpkg.com/jquery@2.2.4/dist/jquery.min.js'
swagger_config['swagger_ui_css'] = '//unpkg.com/swagger-ui-dist@3/swagger-ui.css'
Swagger(app, config=swagger_config)

As part of this change, template part flasgger/body_scripts.html was factored-out of index.html, making it easier to override and replace the body script load section entirely if desired.

Added a test/example.
Pull Request #245: Added configuration for swagger-ui and jquery js external-load URLs.

755 of 828 relevant lines covered (91.18%)

0.91 hits per line

Source Files on job 251.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 235
  • Travis Job 251.1
  • c517d075 on github
  • Prev Job for on static-js-url-config (#247.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc