MongoEngine / flask-mongoengine

MongoEngine flask extension with WTF model forms support
Other
840 stars 256 forks source link

Integrate with Flask RESTplus extension #407

Open bl4ckst0ne opened 3 years ago

bl4ckst0ne commented 3 years ago

Hey, I am building a REST API server via flask-restx (a fork of flask-restplus, which is a fork of flask-restful). In those extensions, they have models, for representing, validating and marshalling the data of the API. Also, there is a feature to generate swagger file using those models.

So, I thought it will be great if we can add an imtegration to that, just like Flask-WTF. :)

I will be glad to help, if you want to :).

bl4ckst0ne commented 3 years ago

Is there anyone to discuss with about the idea?

VetriMaaran commented 3 years ago

I have also created an API with flask-restX and MongoDB. Can you elaborate on what you need?

bl4ckst0ne commented 3 years ago

@VetriMaaran, sure. Essentially, I want a converter from MongoEngine's model to flask-restx's model & request parser. That way, you don't need to write your models twice.

Actually, I don't know if it helps, since there is an open issue for redesigning the models system. Yet, I am not sure when it should occur.

insspb commented 3 years ago

@bl4ckst0ne any prs are welcome

pythonhubdev commented 3 years ago

So it is like

mongoengine.StringField()

is to be converted to fields.String automatically am I right?

bl4ckst0ne commented 3 years ago

@pythonhubpy Correct! Yet, this is a simple case. :)

pythonhubdev commented 3 years ago

@pythonhubpy Correct! Yet, this is a simple case. :)

Yeah I too thought of this we shall try to make it has a pull request. Let's work.on it.

insspb commented 2 years ago

Hi @bl4ckst0ne, @pythonhubpy , @VetriMaaran I just checked Flask-RESTPlus and it considered as unmaintained. It was forked to Flask RESTX, but Flask RESTX has last activity only in 2021, so it looks like not heavily maintained too.

There also was no PR's proposed from anybody on this integration.

As I am alone here right now, I think that such integration has no big sense. What you think? I am not working with Flask right now, and maybe did not see something, or some project, that replace Flask RESTX and Flask RESTPlus