Giter Club home page Giter Club logo

Comments (7)

rantav avatar rantav commented on August 12, 2024

Hi @sebaxq thanks for the issue (and very thanks for the proposed solution 😄)
However, I think I'm missing something.
In the example there are cases where not all {put,get,post,delete} are defined, yet it doesn't crash.
Could you provide a repro?

from flask-restful-swagger.

sebaolate avatar sebaolate commented on August 12, 2024

Hi @rantav I am creating an architecture and I am using inheritance to build services, here is on swagger breaks. I attached a picture of a small example.

screen shot 2014-07-02 at 11 57 49

from flask-restful-swagger.

rantav avatar rantav commented on August 12, 2024

Hi @sebaxq at first I thought it was b/c of inheritance and the fact that in the base class all four methods are defined but not all of them are defined in the concrete class.
So I created a test case here fd75de0

But this test passes. So I am still confused....
Would you be able to run this new test case I created and report?
cheer.

from flask-restful-swagger.

sebaolate avatar sebaolate commented on August 12, 2024

Hello, I run the test case and it crashes. I attached a picture with the error.
screen shot 2014-07-03 at 9 43 20

Here the module package info:

Metadata-Version: 1.0
Name: flask-restful-swagger
Version: 0.11
Summary: Extrarct swagger specs from your flast-restful project
Home-page: https://github.com/rantav/flask-restful-swagger
Author: Ran Tavory
Author-email: UNKNOWN
License: MIT
Description: Please see documentation here: https://github.com/rantav/flask-restful-swagger
Platform: UNKNOWN

from flask-restful-swagger.

rantav avatar rantav commented on August 12, 2024

Looks like a matter of versioning, maybe python version of a package version.

What does pip freeze tell you?

pip freeze
Flask==0.10.1
Flask-RESTful==0.2.8
Jinja2==2.7.1
MarkupSafe==0.18
SQLAlchemy==0.8.4
Werkzeug==0.9.4
distribute==0.6.35
itsdangerous==0.23
six==1.4.1
stevedore==0.8
virtualenvwrapper==3.7
wsgiref==0.1.2

And python --version:

python --version
Python 2.7.2

from flask-restful-swagger.

sebaolate avatar sebaolate commented on August 12, 2024

Sorry for the delay, here are my versions:

pip freeze
Flask==0.10
Flask-RESTful==0.2.12
Jinja2==2.7.3
MarkupSafe==0.19
SQLAlchemy==0.9.0
Werkzeug==0.9.4
distribute==0.7.3
itsdangerous==0.24
six==1.6.1
wsgiref==0.1.2

python --version
Python 2.7.5

My coworkers have the same error and we use my solution temporary.

from flask-restful-swagger.

rantav avatar rantav commented on August 12, 2024

Hi @sebaxq I'm sorry for the delay but I just can't repro your error.
I have installed the same python version as you have and all the dependencies at exactly the same version that you have but still no bug 😬

$ pip freeze
Flask==0.10
Flask-RESTful==0.2.12
Jinja2==2.7.3
MarkupSafe==0.19
SQLAlchemy==0.9.0
Werkzeug==0.9.4
aniso8601==0.82
distribute==0.6.35
itsdangerous==0.24
pytz==2014.4
six==1.6.1
stevedore==0.8
virtualenvwrapper==3.7
wsgiref==0.1.2

$ python --version
Python 2.7.5

and yet:

$ PYTHONPATH=. python examples/inheritance.py
 * Running on http://127.0.0.1:5000/
 * Restarting with reloader
# All OK

I'm at loss.
Also, your solution isn't clear to me. resource.dict doesn't exist, only __dict__ does.

from flask-restful-swagger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.