hapic
hapic copied to clipboard
Input/Output/Error management for your python controllers with Swagger doc generation
ErrorBuilder have a parameter `include_traceback`: write test about it.
* [ ] Stock hapic version into variable, see https://www.python.org/dev/peps/pep-0396/#rationale and use this value into setup.py. * [ ] update hapic making version script (into gitlab.algoo.fr/algoo/tools) to use this var...
I tried to do something like this : ``` @hapic.with_api_doc() @hapic.input_path(UserSchema(only=('user_id',))) def user_workspace(self, context, request: TracimRequest, hapic_data=None): pass ``` with : ``` class UserSchema(marshmallow.Schema): user_id = marshmallow.fields.Int(dump_only=True) email = marshmallow.fields.Email(required=True)...
For now, we permit to display or not a traceback when context is in debug mode. We should permit more flexible: When add exception handling with a decorator, or directly...
When using instance method like the fourth example here (https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/viewconfig.html#view-config-placement) with @view_config : ``` from pyramid.response import Response from pyramid.view import view_config class MyView(object): def __init__(self, request): self.request = request...
Find a solution to not set 'Content-Type' header if unallowed for all backend. https://github.com/algoo/hapic/commit/76d5f8c396583a53bd141b470216a4345a8c75c8 is pyramid specific solution for this. It should be replaced by something not pyramid specific.
When context not set the error is not very user friendly (ex when request object try to be created from context). Raise a more explicit error.
cf https://github.com/marshmallow-code/apispec/wiki/Ecosystem
### At present: Only one route (method, url) per controller is handled correctly : no documentation generation for others valids routes. **In Bottle**, that has no consequence because you need...
Actually, file are not supported in Flask and Pyramid Context (see https://github.com/algoo/hapic/pull/31).