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

WIP: Add class-transformer to transform results and support dates #42

Merged
merged 6 commits into from
Sep 12, 2019
Merged

WIP: Add class-transformer to transform results and support dates #42

merged 6 commits into from
Sep 12, 2019

Conversation

arkraft
Copy link
Contributor

@arkraft arkraft commented Sep 11, 2019

This MR adds https://github.com/typestack/class-transformer to transform the result types. Strings, which have the a format of date or date-time are now transformed to a Date instance.

The default option used for class-transformer is to ignore all additional parameters. So the transformed result Object only contains the parameters defined inside the DTO or generated model and additional parameters returned by the API are ignored.

There is an option to enable class-transformer which is false by default and therefore it does not break any existing usage.

@Manweill
Copy link
Owner

@arkraft
Can you provide a example.
And then, fixes checks.

@Manweill Manweill merged commit 082634c into Manweill:master Sep 12, 2019
@arkraft
Copy link
Contributor Author

arkraft commented Sep 12, 2019

I wanted to add examples and update the README. The WIP in the title actually stands for 'Work In Progress', There where a few things i still wanted to check out

@Manweill Manweill mentioned this pull request Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants