Coder Social home page Coder Social logo

Comments (5)

greyli avatar greyli commented on May 18, 2024

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.

lafrech avatar lafrech commented on May 18, 2024

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.

greyli avatar greyli commented on May 18, 2024

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.

lafrech avatar lafrech commented on May 18, 2024

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.

greyli avatar greyli commented on May 18, 2024

I finally decided to revoke these changes and hope marshmallow-code/marshmallow#1829 would be implemented in the future.

from apiflask.

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.