Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

base_path parameter and relative pathes #48

Merged
merged 12 commits into from
May 12, 2020
Merged

base_path parameter and relative pathes #48

merged 12 commits into from
May 12, 2020

Conversation

NotJustPizza
Copy link
Contributor

You can now specify base path for yml files:

app = Flask(__name__)

@app.route("/spec")
def spec():
    base_path = os.path.join(app.root_path, 'docs')
    return jsonify(swagger(app), from_file_keyword="swagger_from_file", base_path=base_path)

and use relative pathes:

@app.route('/test', methods=['POST'])
def login():
    """
    swagger_from_file: test.yml
    """

@NotJustPizza
Copy link
Contributor Author

I added customizations made by @Steven-Eardley to this pull request

Copy link
Contributor

@atlithorn atlithorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My sincerest apologies. I somehow managed to turn off notifications on github and am first seeing this a year later when I stumbled inadvertently back to this project.

Copy link
Contributor

@atlithorn atlithorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a little work

README.md Outdated Show resolved Hide resolved
flask_swagger.py Outdated Show resolved Hide resolved
flask_swagger.py Outdated Show resolved Hide resolved
@NotJustPizza
Copy link
Contributor Author

@atlithorn All fixed

flask_swagger.py Outdated Show resolved Hide resolved
@NotJustPizza
Copy link
Contributor Author

@atlithorn Done

@NotJustPizza
Copy link
Contributor Author

@atlithorn Is there anything more that I should fix? Could you merge it?

@atlithorn atlithorn merged commit 0bb07da into getsling:master May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants