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

rochacbruno / flasgger
91%
master: 91%

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Repo Added 31 Mar 2017 09:40PM UTC
Files 5
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

LAST BUILD ON BRANCH static-js-url-config
branch: static-js-url-config
CHANGE BRANCH
x
Reset
  • static-js-url-config
  • 0.6.3
  • 0.6.4
  • 0.6.5
  • 0.6.6
  • 0.7.0
  • 0.8.0
  • 0.8.1
  • 0.8.3
  • 0.9.0
  • 0.9.1
  • 0.9.2
  • 242_fix_setup
  • dist-exclude-pycache
  • docker
  • markdown_readme
  • master
  • prepare_090
  • python-37-38-dev
  • release-0.9.1
  • release-0.9.2
  • requirements-dev-twine
  • test_1
  • update_ui

pending completion
251

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

1.82 hits per line

Relevant lines Covered
Build:
Build:
828 RELEVANT LINES 755 COVERED LINES
1.82 HITS PER LINE
Source Files on static-js-url-config
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
251 static-js-url-config 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... Pull #245 18 Sep 2018 06:05AM UTC web-flow travis-ci pending completion  
250 static-js-url-config 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... push 18 Sep 2018 06:05AM UTC javabrett travis-ci pending completion  
249 static-js-url-config 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'... Pull #245 18 Sep 2018 05:46AM UTC web-flow travis-ci pending completion  
248 static-js-url-config 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'... push 18 Sep 2018 05:39AM UTC javabrett travis-ci pending completion  
See All Builds (240)
  • Repo on GitHub
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

© 2025 Coveralls, Inc