Comments (5)
I also think marshmallow.validators
is a better module name than marshmallow.validate
(that's why I exposed them via apiflask.validators
). The one thing I can't easily change is the validate
keyword in field classes, if it can be validators
, then everything is consistent.
from apiflask.
As for #63, I wouldn't add such a layer for little benefit.
validate vs. validator was discussed in marshmallow-code/marshmallow#645 and this could be reopened if you bring arguments to back up your case.
For pre/post I'd naturally stick to marshmallow's convention, but I understand the will to be close to Flask. There is no best convention. It depends how much you want to expose marshmallow. If you expect users to be familiar with marshmallow, perhaps you should use marshmallow namings. In any case, those names are not expected to change on marshmallow side so your aliases shouldn't break anytime soon.
from apiflask.
The pre/post changes are not very necessary. But I do want to change validates
/validates_schema
to validate
/validate_schema
, the s
is quite redundant for me... Any reasons behind these validates
names in Marshmallow, is it just because the validate
namespace is occupied by the marshmallow.validate
module?
from apiflask.
TBH, I didn't write that and I can only guess.
This is suited as a question / suggestion in our bugtracker. You may link to this issue.
from apiflask.
I finally decided to revoke these changes and hope marshmallow-code/marshmallow#1829 would be implemented in the future.
from apiflask.
Related Issues (20)
- Deprecation warning with Flask 3.0 HOT 2
- Allow defining additional media types for a response
- `pagination_builder` data is not always compliant with PaginationSchema HOT 1
- Endpoints with authentication in debug mode HOT 1
- Support adding headers to the response schema HOT 2
- Support the OpenTelemetry into APIFlask
- OneOf, ContainsOnly for dataclass
- .
- Support Pydantic HOT 1
- Support `from apiflask import current_app` HOT 2
- `@app.error_processor` with specific errors HOT 2
- WebSocket support ?
- While handling marshmallow ValidationError containing other ValidationError(s), make_response fails HOT 5
- Re-use the File, Config field, and file-related validators from flask-marshmallow HOT 1
- `flask spec` command raises TypeError on decimal field validator
- Add support for a --quiet flag for the spec command HOT 2
- Behaviur when use files type parameters HOT 5
- Can APIFlask support Quart? HOT 1
- Create Combo Box HOT 1
- Create migration guides for deprecated/unmaintained Flask REST extensions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apiflask.