You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flasgger also supports Marshmallow APISpec as base template for specification, if you are using APISPec from Marshmallow take a look at apispec example.
...
NOTE: If you want to use Marshmallow Schemas you also need to run pip install marshmallow apispec
Is some non-latest version of one of these required? Following the instructions as written results in apispec-0.39.0 and marshmallow-2.15.4, which results in TypeError when running the apispec example:
jab@pro ~> python3 -m virtualenv tmpvenv
Using base prefix '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7'
/usr/local/lib/python3.7/site-packages/virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
New python executable in /Users/jab/tmpvenv/bin/python3.7
Also creating executable in /Users/jab/tmpvenv/bin/python
Installing setuptools, pip, wheel...done.
jab@pro ~> cd tmpvenv
jab@pro ~/tmpvenv> . bin/activate.fish
(tmpvenv) jab@pro ~/tmpvenv> pip install flasgger
Collecting flasgger
Using cached https://files.pythonhosted.org/packages/59/25/d25af3ebe1f04f47530028647e3476b829b1950deab14237948fe3aea552/flasgger-0.9.0-py2.py3-none-any.whl
Collecting PyYAML>=3.0 (from flasgger)
Collecting six>=1.10.0 (from flasgger)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting mistune (from flasgger)
Using cached https://files.pythonhosted.org/packages/c8/8c/87f4d359438ba0321a2ae91936030110bfcc62fef752656321a72b8c1af9/mistune-0.8.3-py2.py3-none-any.whl
Collecting jsonschema>=2.5.1 (from flasgger)
Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting Flask>=0.10 (from flasgger)
Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
Collecting Werkzeug>=0.14 (from Flask>=0.10->flasgger)
Using cached https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl
Collecting itsdangerous>=0.24 (from Flask>=0.10->flasgger)
Collecting click>=5.1 (from Flask>=0.10->flasgger)
Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting Jinja2>=2.10 (from Flask>=0.10->flasgger)
Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->Flask>=0.10->flasgger)
Installing collected packages: PyYAML, six, mistune, jsonschema, Werkzeug, itsdangerous, click, MarkupSafe, Jinja2, Flask, flasgger
Successfully installed Flask-1.0.2 Jinja2-2.10 MarkupSafe-1.0 PyYAML-3.13 Werkzeug-0.14.1 click-6.7 flasgger-0.9.0 itsdangerous-0.24 jsonschema-2.6.0 mistune-0.8.3 six-1.11.0
(tmpvenv) jab@pro ~/tmpvenv> pip install marshmallow apispec
Collecting marshmallow
Using cached https://files.pythonhosted.org/packages/67/7d/5435c399acecd4398d77ef31ea80e02cee5368599ce6a980f9014e8ec5fd/marshmallow-2.15.4-py2.py3-none-any.whl
Collecting apispec
Using cached https://files.pythonhosted.org/packages/55/81/9f54520d3cb03ffb207ccef01298c037dcec83a111ec838aed971c7f9bf2/apispec-0.39.0-py2.py3-none-any.whl
Requirement already satisfied: PyYAML>=3.10 in ./lib/python3.7/site-packages (from apispec) (3.13)
Installing collected packages: marshmallow, apispec
Successfully installed apispec-0.39.0 marshmallow-2.15.4
(tmpvenv) jab@pro ~/tmpvenv> curl -O 'https://raw.githubusercontent.com/rochacbruno/flasgger/master/examples/apispec_example.py'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1527 100 1527 0 0 17232 0 --:--:-- --:--:-- --:--:-- 17352
(tmpvenv) jab@pro ~/tmpvenv> python apispec_example.py
Traceback (most recent call last):
File "apispec_example.py", line 15, in <module>
'apispec.ext.marshmallow',
TypeError: APISpec() takes no arguments
The text was updated successfully, but these errors were encountered:
There was a known issue in flasgger 0.9.0 caused by a change in apispec API, so hopefully this is a duplicate of #205 . flasgger 0.9.1 is just released - can you try again with the new release?
New to flasgger and was interested in the apispec example, but unfortunately the instructions seem out of date?
Quoting https://github.com/rochacbruno/flasgger#readme
Is some non-latest version of one of these required? Following the instructions as written results in apispec-0.39.0 and marshmallow-2.15.4, which results in TypeError when running the apispec example:
The text was updated successfully, but these errors were encountered: