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

Make coercion and validation work off of @loopback/types #1319

Closed
3 tasks
shimks opened this issue May 10, 2018 · 4 comments
Closed
3 tasks

Make coercion and validation work off of @loopback/types #1319

shimks opened this issue May 10, 2018 · 4 comments

Comments

@shimks
Copy link
Contributor

shimks commented May 10, 2018

Description / Steps to reproduce / Feature proposal

For DP3, we'd like validation and coercion system implemented in the http-layer to use @loopback/types

Acceptance Criteria

  • Move types folder from @loopback/repository into its own package; Make sure this PR is refined and make sure it lands [WIP] feat: add @loopback/types to be the typing system #947
  • Move over the converters used in http coercion into appropriate files in @loopback/types with extensibility in mind.
    • Come up with a decorator system (@param or a new one if necessary) to introduce metadata to appropriately infer type metadata (for example Date)

See Reporting Issues for more tips on writing good issues

@shimks shimks changed the title Make coercion and validation extensible across all layers of the framework Make coercion and validation work off of @loopback/types May 17, 2018
@bajtos
Copy link
Member

bajtos commented May 28, 2018

@shimks we already have another story covering validation at REST layer, see #750:

Acceptance Criteria

  • Coerce incoming query string, path and header inputs into strings, numbers, booleans, Dates
    • Do not coerce timestamps (Unix timestamps in milliseconds)
  • Validate only that the output is correct for the chosen type

Notes

We should consider using either strong-remoting or AJV to perform the coercion

Assuming we implement #750 first, what would be the scope & acceptance criteria of this story #1319?

@bajtos bajtos added the p2 label May 28, 2018
@shimks
Copy link
Contributor Author

shimks commented May 28, 2018

@bajtos I believe the acceptance criteria should remain unchanged considering the scope of this task is to move over the converters used in http coercion into a 'LoopBack' typing hub. It might have been more appropriate to have changed the title to exclude 'validation', but there may be some overlap between the two and if there is, it should be small enough of a change to implement in one PR.

@stale
Copy link

stale bot commented Oct 28, 2019

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label Oct 28, 2019
@stale
Copy link

stale bot commented Nov 27, 2019

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants