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

Improvements on DTO Typescript generator #2637

Merged
merged 4 commits into from
Oct 4, 2016
Merged

Improvements on DTO Typescript generator #2637

merged 4 commits into from
Oct 4, 2016

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented Sep 28, 2016

What does this PR do?

  • Add integration tests that test the TypeScript generated DTOs
  • Add toJson() method on DTO
  • Add support of constructor with empty object (like new MyDTOImpl().withName("hello"))
  • Integration tests can be disabled with -DskipIntegrationTests flag

What issues does this PR fix or reference?

add serialization/ export of DTOs to JSON format + lot of tests

New behavior

Allow to generate DTOs in TypeScript format for Serialization and Unserialization

PR type

  • Minor change = no change to existing features or docs

Minor change checklist

  • Tests provided / updated
  • Tests passed

Change-Id: I3bcc2de6bb549ef8e29a266270ebcf0735e696d1
Signed-off-by: Florent BENOIT fbenoit@codenvy.com

@benoitf benoitf added this to the 5.0.0-M5 milestone Sep 28, 2016
@benoitf benoitf self-assigned this Sep 28, 2016
@benoitf benoitf added kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. sprint/current labels Sep 28, 2016
@codenvy-ci
Copy link

Build # 552 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/552/ to view the results.

@TylerJewell
Copy link

@benoitf @ashumilova - if Anna is ok with this change, then lets merge and add into M5.

@benoitf
Copy link
Contributor Author

benoitf commented Oct 3, 2016

@vparfonov ?

- Add toJson() method on DTO
- Add support of constructor with empty object (like new MyDTOImpl().withName("hello"))
- Integration tests can be disabled with -DskipIntegrationTests flag

Change-Id: I3bcc2de6bb549ef8e29a266270ebcf0735e696d1
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
@skabashnyuk
Copy link
Contributor

Do you need docker to run compiler?

@benoitf
Copy link
Contributor Author

benoitf commented Oct 4, 2016

@skabashnyuk I tried using nashorn or rhino but it was not working
but this is only for tests that can be skipped

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Oct 4, 2016

Can you clarify. Docker used only for tests of this DTO Typescript generator module only?
You don't need it for DTO typescript generation. Yes?

@benoitf
Copy link
Contributor Author

benoitf commented Oct 4, 2016

@skabashnyuk
DTO plugin is converting Java DTO into TypeScript DTO (no docker at all : pure java)
Unit test check some basic conversion (no docker at all, but limited testing..) (can be skipped with -DskipTests=true )
Integration tests are using docker to compile TypeScript DTO and use them in order to check these objects are really working. (docker required). can be skipped with -DskipIntegrationTests=true (unit tests are still launched) or -DskipTests=true )

@codenvy-ci
Copy link

Build # 599 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/599/ to view the results.

@bmicklea bmicklea added status/pending-merge and removed status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Oct 4, 2016
@codenvy-ci
Copy link

Build # 605 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/605/ to view the results.

Change-Id: I36cf731bcfe7cd35f3159424cab1d090a22277cf
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
Change-Id: Ica589c63a8bc2c86117ee83d0acf6e646fbd25fb
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
@codenvy-ci
Copy link

Build # 614 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/614/ to view the results.

@benoitf benoitf merged commit 180c950 into master Oct 4, 2016
@benoitf benoitf deleted the dto-enhancement branch October 4, 2016 20:23
@bmicklea bmicklea mentioned this pull request Oct 8, 2016
56 tasks
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
- Add integration tests that test the TypeScript generated DTOs
- Add toJson() method on DTO
- Add support of constructor with empty object (like new MyDTOImpl().withName("hello"))
- Integration tests can be disabled with -DskipIntegrationTests flag

Change-Id: I3bcc2de6bb549ef8e29a266270ebcf0735e696d1
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants