jmcarp / flask-apispec

MIT License
655 stars 156 forks source link

Incompatible with apispec==3.0.0 #163

Closed decaz closed 5 years ago

decaz commented 5 years ago

I use flask-apispec==0.8.2. I've updated apispec to 3.0.0 and now have the following error:

my/app.py:175: in register_extensions                                                     
    spec.init_app(app)                                                                                                           
.venv/lib/python3.7/site-packages/flask_apispec/extension.py:62: in init_app                   
    deferred()                                                                                                             
my/api_spec.py:40: in _register                                                                                                                                                                           
    resource_class_kwargs=resource_class_kwargs,                                                                                                              
.venv/lib/python3.7/site-packages/flask_apispec/apidoc.py:37: in convert                                                                                                                                                                                                              return [self.get_path(rule, target, **kwargs) for rule in rules]                           
.venv/lib/python3.7/site-packages/flask_apispec/apidoc.py:37: in <listcomp>                                                                                                                                                                                                       
    return [self.get_path(rule, target, **kwargs) for rule in rules]                                                                
.venv/lib/python3.7/site-packages/flask_apispec/apidoc.py:48: in get_path                 
    for method, view in six.iteritems(operations)                                         
.venv/lib/python3.7/site-packages/flask_apispec/apidoc.py:49: in <dictcomp>                                              
    if method.lower() in (set(valid_methods) - {'head'})                                                                                                                                                    
.venv/lib/python3.7/site-packages/flask_apispec/apidoc.py:61: in get_operation                  
    'parameters': self.get_parameters(rule, view, docs, parent),                          

    def get_parameters(self, rule, view, docs, parent=None):                                                                
>       openapi = self.marshmallow_plugin.openapi                                              
E       AttributeError: 'MarshmallowPlugin' object has no attribute 'openapi'

.venv/lib/python3.7/site-packages/flask_apispec/apidoc.py:70: AttributeError
sloria commented 5 years ago

I don't have time to fix this now. Would you be up for sending a PR fixing compatibility?