factset / quart-openapi

Module for Quart to add Flask-RESTPlus like functionality
https://factset.github.io/quart-openapi/
Other
82 stars 22 forks source link

Optional Marshmallow integration raises import error #50

Closed devdupont closed 3 years ago

devdupont commented 3 years ago

The swagger.py file is raising a missing import error when importing the optional Marshmallow support.

from .marshmallow import MARSHMALLOW, schema_to_json

The issue is that schema_to_json is not available when the marshmallow and marshmallow_jsonschema libs raise an ImportError:

except ImportError:
    Schema = None
    JSONSchema = None
    MarshmallowValidationError = None
    MARSHMALLOW = False
    # No replacement for schema_to_json
devdupont commented 3 years ago

Tested with:

Quart                  0.14.1
quart-openapi          1.7.0
iron-road-dev commented 3 years ago

I get the same ImportError when using quart==0.14.1 and quart-openapi==1.7.0

Downgrading to quart==0.13.0 and quart-openapi==1.6.0 fixed the issue

zeroshade commented 3 years ago

@flyinactor91 @iron-road-dev once version 1.7.1 is finished deploying to pypi, please give that a try to fix this issue.

iron-road-dev commented 3 years ago

@zeroshade All is well with 1.7.1; thank you for the quick turn around.