Skip to content

How to modify CSS / Color using Swagger V2? #2788

@varun-krish

Description

@varun-krish

Problem statement

How to modify CSS / Color using Swagger V2?

Swagger specification

Hi,
I am using Swagger V2 (I need to because Swagger V3 isn't supported with my software, which uses flask) and to modify my style sheet from the default.

Essentially I'm trying to reproduce this file, but using uiversion v2 https://github.com/flasgger/flasgger/blob/master/examples/colors_external_js.py.

But this block of code does not work on v2.
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'

Anyone know how to make it work?

Thank you!

Environment

swagger version: V2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions