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

rochacbruno / flasgger / 250
91%
master: 91%

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

push

travis-ci

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

755 of 828 relevant lines covered (91.18%)

1.82 hits per line

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