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

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

Merged
merged 8 commits into from Nov 23, 2014

Conversation

lbruand
Copy link
Contributor

@lbruand 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
Copy link
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:

def integrationDependencies(sv: String) = Seq(
dispatch % "test",
scalaCompiler(sv),
specs2(sv) % "test",
cxfFrontendJaxws % "test",
cxfTransportsHttp % "test",
cxfTrapsportsHttpJetty % "test"
)

…ase class because they don't have a copy method
@lbruand
Copy link
Contributor Author

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
Copy link
Owner

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

@lbruand
Copy link
Contributor Author

lbruand commented Nov 16, 2014

related to : use Seq instead of varargs #201

@lbruand
Copy link
Contributor Author

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

@lbruand
Copy link
Contributor Author

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
Copy link
Owner

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

@lbruand
Copy link
Contributor Author

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 added a commit that referenced this pull request Nov 23, 2014
Generate Lenses for all generated classes in the XSD.
@eed3si9n eed3si9n merged commit 01c855d into eed3si9n:master Nov 23, 2014
@eed3si9n
Copy link
Owner

Merged. Thanks for your contribution.

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