Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sugar decorators for Filter and Where parameters #1749

Closed
4 tasks
bajtos opened this issue Sep 24, 2018 · 3 comments
Closed
4 tasks

Sugar decorators for Filter and Where parameters #1749

bajtos opened this issue Sep 24, 2018 · 3 comments
Labels
developer-experience Issues affecting ease of use and overall experience of LB users good first issue help wanted OpenAPI REST Issues related to @loopback/rest package and REST transport in general

Comments

@bajtos
Copy link
Member

bajtos commented Sep 24, 2018

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
@bajtos bajtos added developer-experience Issues affecting ease of use and overall experience of LB users post-GA REST Issues related to @loopback/rest package and REST transport in general labels Sep 24, 2018
@bajtos bajtos changed the title Sugar decorators for Filter and Where arguments Sugar decorators for Filter and Where parameters Sep 24, 2018
@dhmlau dhmlau removed the post-GA label Nov 2, 2018
@dhmlau dhmlau added 2019Q4 and removed 2019Q3 labels Aug 15, 2019
@dhmlau dhmlau added 2020Q1 and removed 2019Q4 labels Nov 2, 2019
@dougal83

This comment has been minimized.

@dhmlau
Copy link
Member

dhmlau commented Jan 10, 2020

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

@raymondfeng
Copy link
Contributor

Implemented by #4745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Issues affecting ease of use and overall experience of LB users good first issue help wanted OpenAPI REST Issues related to @loopback/rest package and REST transport in general
Projects
None yet
Development

No branches or pull requests

4 participants