-
Notifications
You must be signed in to change notification settings - Fork 3
Python 3 support #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
It is already used in tests
The whole docstring will now show in the "Implementation notes" section. Not sure if this is the right approach longterm...
It's less buggy than the existing implementation
/pet/<int:petId> -> /pet/{petId}
Experimental. Only handle jsonify for now. More to come.
…has issues with python 3 AST parsing and comments.
…ates inconsistent indentation
…e safely, need to cast zip() return to list
…properly (by ignoring)
…n value for get_docs, use __doc__ to get function pydoc
|
Hi @revmischa Thanks for the PR. I think it would be a lot easier to review if the different issues were in separate PRs rather than all-in-one. One thing I'm particularly confused about is the introduction of the new triple dash separator for a yaml endpoint description. My aim with the project was to find a way to generate a swagger schema without requiring any DSL/project-specific syntax. Anyway, I haven't run the code yet, but it looks like, after splitting out the yaml from the description, the yaml is thrown away when Any chance of fixing (+ maybe extending) the tests and extending the existing documentation to cover the new schema_class bit and the error responses? I'm not super clear on how that part works tbh. |
|
@mapleoin thanks for your reply. All good questions. example YAML: |
|
See also: These all use YAML for marking up method docs |
|
I like https://github.com/jmcarp/flask-apispec more |
|
Before I started this project, I looked at projects that require you to use their own schema language so they can generate a swagger spec. What I want to do here is the opposite. This project is all about removing the duplication between maintaining an API schema in parallel with the API code, regardless of whether that's in a docstring or not. HTTP verbs and arguments lists can be gotten from the method definitions and I'm looking at ways to inspect the return values of functions so that a responses specification can also be generated. |
|
I think getting flask_classful to work with flask_apispec and marshmallow would be cool. I'm trying to figure out how to make that work. |
Fixes parsing of AST and return
jsonify()function call detection.Support schema references via API
schema_classproperty.Get pydoc with
__doc__setup.py