Code Monkey home page Code Monkey logo

Comments (4)

ppetzold avatar ppetzold commented on September 15, 2024 1

There is a open issue for swagger support #173

Happy to accept a PR ;)

About the other question, not sure what you are exactly referring to with using POST. POST route do support query params as well - there shouldn't be an issue 🤔 But generally using POST route to retrieve listed items seems not quite right. Maybe reconsider?

from nestjs-paginate.

ppetzold avatar ppetzold commented on September 15, 2024 1

(1) either you parse the request on your own and pass the query object to paginate()

(2) or you could just hack the decorator usage to pass the req body. see decorator tests for howto: https://github.com/ppetzold/nestjs-paginate/blob/master/src/decorator.spec.ts

from nestjs-paginate.

Diaskhan avatar Diaskhan commented on September 15, 2024

https://stackoverflow.com/questions/68460951/use-interface-as-a-swagger-schema-nestjs-dto

from nestjs-paginate.

dkrantsberg avatar dkrantsberg commented on September 15, 2024

There is a open issue for swagger support #173

Happy to accept a PR ;)

About the other question, not sure what you are exactly referring to with using POST. POST route do support query params as well - there shouldn't be an issue 🤔 But generally using POST route to retrieve listed items seems not quite right. Maybe reconsider?

In general you're correct. But we have a scenario where we need to support $in filtering with ~1000-2000 items, which exceeds query string limit. Sending PaginateQuery in the request body would solve this issue.

from nestjs-paginate.

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.