jmcarp / flask-apispec

MIT License
655 stars 156 forks source link

apispec 4.0.0 #202

Closed mdantonio closed 4 years ago

mdantonio commented 4 years ago

apispec just released a new version containing breaking changes

and it is installed due to setup requirements:

REQUIRES = [
    [...]
    'apispec>=1.0.0',
]

Error:

/usr/local/lib/python3.8/dist-packages/flask_apispec/apidoc.py:92: in get_parameters
    converter = openapi.fields2parameters
E   AttributeError: 'OpenAPIConverter' object has no attribute 'fields2parameters'

This is from the changelog of apispec:

Refactoring:

OpenAPIConverter.field2parameters and OpenAPIConverter.property2parameter are removed. OpenAPIConverter.field2parameter becomes private. (:pr:581)

As a temporary fix (while working to support apispec 4.x) a

REQUIRES = [
    [...]
    'apispec>=1.0.0,<4',
]

would be helpful

Autopilot9369 commented 4 years ago

Are there any patch release for the issue?

catalanojuan commented 4 years ago

hey there, I just opened https://github.com/jmcarp/flask-apispec/pull/204 that solves this issue

kam193 commented 4 years ago

I introduced PR #206 with try to compatibility for apispec >= 4. This is backwards-incompatible change since apispec 4 has no backward compatibility - so I think the release with apispec pined to <4 should be released anyway.

cc: @sloria