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

Support json configuration in model property definition #2336

Closed
angelwithaneye opened this issue Feb 5, 2019 · 5 comments
Closed

Support json configuration in model property definition #2336

angelwithaneye opened this issue Feb 5, 2019 · 5 comments
Labels
feature Repository Issues related to @loopback/repository package stale

Comments

@angelwithaneye
Copy link

angelwithaneye commented Feb 5, 2019

Description / Steps to reproduce / Feature proposal

All model properties are returned, regardless of the json option.

@property({ json: { out: false } })
email: string;

Current Behavior

All model properties are returned, regardless of the json option.

Expected Behavior

Properties with decorator property() with a spec like:

@property({ json: { out: false } })
email: string;

Should not be returned in the response.

See Reporting Issues for more tips on writing good issues

@bajtos
Copy link
Member

bajtos commented Feb 5, 2019

Hi @angelwithaneye, thank you for reporting the issue. I am afraid LB4 does not support JSON mapping in model properties yet.

cc @raymondfeng

@bajtos bajtos added feature Repository Issues related to @loopback/repository package labels Feb 5, 2019
@bajtos bajtos changed the title Property decorator with OPTIONS for JSON not respecting in/out Support json configuration in model property definition Feb 5, 2019
@angelwithaneye
Copy link
Author

Thanks for reviewing this. It would be a really nice feature as right now I need to create DTOs for some models which is duplicate work. This would be a really nice to have.

@jannyHou
Copy link
Contributor

jannyHou commented Feb 6, 2019

Could be related to #2082

@stale
Copy link

stale bot commented Feb 1, 2020

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 Feb 1, 2020
@stale
Copy link

stale bot commented Mar 3, 2020

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 Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Repository Issues related to @loopback/repository package stale
Projects
None yet
Development

No branches or pull requests

3 participants