flask2postman
flask2postman copied to clipboard
Support Postman Collection Format v2
This pull requests adds support for Postman Collection Format v2.1.0. This change has been asked for in issue #9. The schema of this collection format can be found here: https://schema.getpostman.com/collection/json/v2.1.0/draft-07/docs/index.html
The default output format now is v2.1.0. I added an argument which lets the user export using v1:
flask2postman example.app --name "Example Collection" -v1 -i > example.json
Thanks for the work @Lanseuo! My last comment still stands but we're almost there. :fire:
Hey @ramnes, thanks for your review!
I tried to solve your concerns from your last comment. Unfortunately, it's impossible to only use the werkzeug.Map
object due to the fact that the properties blueprints
and view_functions
from the Flask app instance are required. Thus, I created a class method from_flask
that allows you to instantiate the collection from the flask app instance. This has the advantage that now different web frameworks could be easier implemented.
I also renamed the Blueprint
class to Folder
to use a more general term that is not unique to Flask.