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

rochacbruno / flasgger / 248 / 2
91%
master: 91%

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Ran 18 Sep 2018 05:39AM 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 05:38AM UTC coverage: 91.184%. First build
248.2

push

travis-ci

javabrett
Added configuration for swagger-ui and jquery js external-load URLs.

This change allows new Flasgger config keys to specify the URL location where Swagger UI and jQuery javascript sources 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

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(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.

755 of 828 relevant lines covered (91.18%)

0.91 hits per line

Source Files on job 248.2
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 232
  • Travis Job 248.2
  • 265b3cd6 on github
  • Next Job for on static-js-url-config (#250.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