Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get arguments from query string in future versions ? #597

Open
Sladerix opened this issue Mar 29, 2024 · 2 comments
Open

Get arguments from query string in future versions ? #597

Sladerix opened this issue Mar 29, 2024 · 2 comments
Labels
question Further information is requested

Comments

@Sladerix
Copy link

Hi everybody, I went to the request parser section in the documentation and there is a red banner saying that the module will be deprecated.
So what is the current correct way to extract the arguments from the query string?

e.g. http://localhost:5000/api/v1/**animals?legs=4**

Thanks in advance

@Sladerix Sladerix added the question Further information is requested label Mar 29, 2024
@peter-doggart
Copy link
Contributor

The Request parser is unlikely to be removed, so I would continue to use it - I do in my projects. The warning was put in when the library was under active development; however, it's currently in maintenance only. Ultimately, there are much more advanced libraries available if you require detailed validation, like marshmallow or pydantic (neither of which are integrated into flask-restx currently).

@WilliamChen-luckbob
Copy link

WilliamChen-luckbob commented Apr 3, 2024

The Request parser is unlikely to be removed, so I would continue to use it - I do in my projects. The warning was put in when the library was under active development; however, it's currently in maintenance only. Ultimately, there are much more advanced libraries available if you require detailed validation, like marshmallow or pydantic (neither of which are integrated into flask-restx currently).

That means, if I want detailed custom input validation, unless I modify the source code of Flask-RESTx myself, I can only write additional validation code in the business code, and cannot just integrate them using parser or model into @api.doc or @api.expect, right?

Does Flask-RESTx have a superclass similar to the ConstraintValidator interface in Java to implement custom validation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants