Generate Lenses for all generated classes in the XSD. #292

Merged
merged 8 commits into from Nov 23, 2014

Projects

None yet

2 participants

@lbruand
Contributor
lbruand commented Nov 12, 2014

We would like scalaxb to generate Lenses for all objects in the XSD.
This way, manipulating the XML graph is a lot more beautiful. (and you can use the completion to access the lens.)
We use scalaz Lenses.
This feature is optional.

@eed3si9n
Owner

Thanks for the contribution. This looks cool.
Do you mind adding usage code into the integration test? You can add dependency to Scalaz in integrationTest here: https://github.com/eed3si9n/scalaxb/blob/32b5a77b199280b7849e03e47258c26439cec17f/project/dependencies.scala#L37-L44

@lbruand lbruand working on test - still having a problem with repeated parameter in c…
…ase class because they don't have a copy method
cec34d6
@lbruand
Contributor
lbruand commented Nov 16, 2014

I am struggling a bit with the test because apparently case classes with repeated parameters don't have copy methods. Which makes it a lot harder to write Lenses.

@eed3si9n
Owner

The vararg thing is a bit of a cheesy feature, so I don't mind that being optional feature.

@lbruand
Contributor
lbruand commented Nov 16, 2014

related to : use Seq instead of varargs #201

@lbruand
Contributor
lbruand commented Nov 17, 2014

Hello,

I have added parametrization but one the test (Wsdl11Soap11Test) is failing but was failing before I started coding... Thanks!
Lucas

@eed3si9n

Instead of including a condition there, config.useVarArg or something should be added be part of val hasSequenceParam at line 268.

@lbruand
Contributor
lbruand commented Nov 21, 2014

Hi !
Sorry for taking so long to carry on. I hope this is what you were expecting. I hope this feature is interesting enough to get pulled.
Thanks anyway,
Lucas

@eed3si9n
Owner

LGTM. Do you want to add anything else before I merge?

@lbruand
Contributor
lbruand commented Nov 22, 2014

Nope, I cannot think of anything else...

Thanks
Le 21 nov. 2014 23:30, "eugene yokota" notifications@github.com a écrit :

LGTM. Do you want to add anything else before I merge?


Reply to this email directly or view it on GitHub
#292 (comment).

@eed3si9n eed3si9n merged commit 01c855d into eed3si9n:master Nov 23, 2014
@eed3si9n
Owner

Merged. Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment