remondis-it / pact-consumer-builder

Library for generating pact consumer expectations from java beans
Apache License 2.0
13 stars 6 forks source link

Support for Kotlin data classes #30

Open dAnjou opened 3 years ago

dAnjou commented 3 years ago

Hi,

really nice project, I would have expected such a feature to be part of pact-jvm actually :)

We're using Kotlin, do you think support for their data classes is doable?

Thanks

schuettec commented 3 years ago

Hi, sorry for the late response. Right, I would be nice to have this in pact-jvm :)

I don't know Kotlin's data classes. But from what I understood, the compiler generates compliant Java Bean classes from a data class right? If so, the classes would be compatible with this library.

If not: It would be a bit of work to get the Java Bean property introspector wrapped to support other types of conventions. Doable but.... meh :D PRs are welcome! :-P

zxspectrr commented 9 months ago

Hi, I just came this library today.

Kotlin classes are not compatible. type.getConstructor() throws NoSuchMethodException