aiohttp-apispec icon indicating copy to clipboard operation
aiohttp-apispec copied to clipboard

Example in README has outdated code

Open ghost opened this issue 6 years ago • 3 comments

Hi all,

Thank you for this fantastic library, it will be very useful for me!

I was experimenting with this library for a project of mine and noticed that the README has an out of date usage of marshmallow.Schema where the strict=True argument is passed.

In marshmallow > 3 there was a breaking change introduced as per the changelog: https://marshmallow.readthedocs.io/en/stable/changelog.html?highlight=strict#b7-2018-02-03

I'm happy to put up a PR to update the README if you need!

ghost avatar Nov 04 '19 02:11 ghost

had the same issue

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/foo/__main__.py", line 6, in <module>
    from boatlife.main import main
  File "/foo/main.py", line 41, in <module>
    @request_schema(RequestSchema(strict=True))
TypeError: __init__() got an unexpected keyword argument 'strict'

maybe also useful to include in the readme:

npm install --save swagger-ui-dist
cp -R node_modules/swagger-ui-dist /path/to/your/static-dir/swagger

thijstriemstra avatar Nov 04 '19 19:11 thijstriemstra

Hi there, is there any update on this?

ghost avatar Nov 12 '19 23:11 ghost

Hi! Yes, it would be cool to include a list of difference between marshmallow < 3 and marshmallow >= 3 into documentation (and I know that many people still use 2.x versions). @sad-boy-uoa you are welcome to put up a PR. I will appreciate it:)

maximdanilchenko avatar Nov 13 '19 10:11 maximdanilchenko