Skip to content

Sugar decorators for Filter and Where parameters #1749

Closed

Description

@bajtos

See #1679 (comment)

Let's add few more @param flavors to simplify declaration of Filter and Where arguments.

@param.query.filter(Todo)
// alias for @param.query.object('filter', getFilterSchemaFor(Todo))

@param.query.filter('filterObj', Todo)
// alias for @param.query.object('filterObj', getFilterSchemaFor(Todo))

@param.query.where(Todo)
// alias for @param.query.object('where', getWhereSchemaFor(Todo))

@param.query.where('whereObj', Todo)
// alias for @param.query.object('whereObj', getWhereSchemaFor(Todo))

Acceptance criteria

  • Implement @param.query.filter and @param.query.where as outlined above. Test must be included, try to work test first. (Follow TestDrivenDevelopment - start by adding a failing test, and so on.)
  • Update REST Controller template to use these new shortcuts
  • Update all example controllers to use these new shortcuts
  • Update code examples in the tutorial documentation pages to match the updated source code of controllers

Activity

  1. added
    developer-experienceIssues affecting ease of use and overall experience of LB users
    RESTIssues related to @loopback/rest package and REST transport in general
    on Sep 24, 2018
  2. changed the title [-]Sugar decorators for Filter and Where arguments[/-] [+]Sugar decorators for Filter and Where parameters[/+] on Sep 24, 2018
  3. dougal83 commented on Dec 17, 2019

    @dougal83
  4. dhmlau commented on Jan 10, 2020

    @dhmlau
    Member

    @bajtos @dougal83, what's your suggestion on how to handle this issue? (part of the Q1 planning). Thanks.

  5. 2 remaining items

  6. added and removed on Feb 7, 2020
  7. raymondfeng commented on Feb 28, 2020

    @raymondfeng
    Contributor

    Implemented by #4745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OpenAPIRESTIssues related to @loopback/rest package and REST transport in generaldeveloper-experienceIssues affecting ease of use and overall experience of LB usersgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions