question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flasgger 0.9.1 does not reflect changes without restarting app

See original GitHub issue

I’m using latest flasgger==0.9.1 and create documentation in Yaml files using swag_from decorator. Whenever I change something in Yaml file (major or very minor change, whatever) I need to restart Python app in order to get changes reflected on Flasgger UI. I think it’s quite inconvenient - I see it worked well in flasgger==0.8.3 without reloading.

Here is my init:

def create_swagger(app):
    template = {
        "openapi": '3.0.0',
        "info": {
            "title": "my title",
            "description": "my description",
            "contact": {
                "responsibleOrganization": "my org",
                "email": "my mail",
                "url": "my url"
            },
            "version": "1.0"
        },
        "basePath": "/",
        "schemes": [
            "http",
            "https"
        ],
        "operationId": "getmyData"
    }

    config = {
            "headers": [
        ],
        "specs": [
            {
                "endpoint": 'api',
                "route": '/api.json',
                "rule_filter": lambda rule: True,  # all in
                "model_filter": lambda tag: True,  # all in
            }
        ],
        "static_url_path": "/flasgger_static",
        "swagger_ui": True,
        "specs_route": "/docs"        
    }    

    return Swagger(app, template=template, config=config)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
javabrettcommented, Oct 8, 2018

PR #250 .

1reaction
rochacbrunocommented, Oct 5, 2018

@strongbugman we can try to use the DEBUG flag, if flask in in debug mode then cache is disabled. What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flasgger 0.9.1 does not reflect changes without restarting app
I'm using latest flasgger==0.9.1 and create documentation in Yaml files using swag_from decorator. Whenever I change something in Yaml file ...
Read more >
Develop Flask without need to restart application [duplicate]
I try to use Flask to make a small app but the constant need to restart the application to see the results is...
Read more >
flasgger - PyPI
Flasgger is a Flask extension to extract OpenAPI-Specification from all Flask views registered in your API. Flasgger also comes with SwaggerUI embedded so ......
Read more >
Easy OpenAPI Specs and Swagger UI for Your Flask API
Flasgger is a Flask extension to extract OpenAPI-Specification from all Flask views ... You can also provide all your specs as template and...
Read more >
How to get code changes/updates to show in a flask app ...
Is it possible to have the changes reflect in the app when running with gunicorn without having to stop & restart the app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found