Giter VIP home page Giter VIP logo

Comments (3)

jamietanna avatar jamietanna commented on May 30, 2024

Thanks for the interest! I think right now, I'd prefer to avoid adding the dependency (especially as it'll pull a number of dependencies) and since the work off the back of #1142 I'd love to keep us as lean as possible.

What sort of template functions are you looking for?

It is possible to modify the existing template functions to add the helpers we need?

Or to call oapi-codegen as a library (but needs better documenting in #1487) ?

from oapi-codegen.

deefdragon avatar deefdragon commented on May 30, 2024

The most common funcs I've pulled in are dig, haskey, list,and get functions. Specifically I use those to work with the extensions that I have added to my openapi yaml. (fail is useful for validation reasons as well, tho much less necessary as compared to the other 4.)

If I were to generalize, I think the datastructure funcs are the ones that would provide the most given the purpose of oapi-codegen. Most of them are implementable without imports, tho the merge ones are debatable.

from oapi-codegen.

deefdragon avatar deefdragon commented on May 30, 2024

Ive gone through the list of functions that may be useful from sprig for dict/list manipulation.

  • list, append, prepend, first, rest, last, initial, reverse, uniq, without, has, slice, concat, chunk
  • dict, get, set, unset, hasKey, pluck, keys, values, pick, omit, dig

Most of the Must variants etc. are not that useful in this lib I think, so those can be excluded. I also excluded the merge funcs as those pulled in an external library, and I dont think people are going to require merging maps.

I have not gone through and looked at the string manipulation functions yet, but I can almost guarantee some of those would be useful. Still, Id rather start out "small" if its believed worth it to any of these at all.

from oapi-codegen.

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.