Avoid breaking endpoints when apidoc decorators are in the wrong order
(or when an endpoint function is missing a docstring)
Details
Details
- Reviewers
ardumont - Group Reviewers
Reviewers - Commits
- R65:258b7c230245: apidoc: harden the decorator stack
rDWAPPS258b7c230245: apidoc: harden the decorator stack
Tests to be added once we're OK with the Apidoc logic changes.
Diff Detail
Diff Detail
- Repository
- rDWAPPS Web applications
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
swh/web/ui/apidoc.py | ||
---|---|---|
124 | Please remove if useless. | |
129 | Can you please try to clarify this code? If you don't find a way to improve on this, please, at least, add some comments to try and explain it. Thanks a bunch. | |
193 | Remove print please. | |
206–207 | It'd be nice to have a developer exception here when the docstring is missing. Something like for example (feel free to adapt ^^): if not f.__doc__: raise Exception('Apidoc %s: expected a docstring' ' for function %s' % (self.__class__.__name__, f.__name__)) |