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

rochacbruno / flasgger / 248
91%
master: 91%

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Ran 18 Sep 2018 05:39AM UTC
Jobs 2
Files 5
Run time 4s
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

pending completion
248

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%)

1.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 248.1 18 Sep 2018 05:39AM UTC 0
91.18
Travis Job 248.1
2 248.2 18 Sep 2018 05:39AM UTC 0
91.18
Travis Job 248.2
Source Files on build 248
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #248
  • 265b3cd6 on github
  • Next Build on static-js-url-config (#250)
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