https://kotlinlang.org logo
Title
d

dave

03/08/2021, 3:48 PM
I'd recommend you can write a small test class which you can run to generate the contract JSON. As a general rule, we also keep the JSON in Git so that we know when it changes (and we have an approval test to manually approve the changes before it gets committed)
e

Elizabeth Thomas

03/08/2021, 3:51 PM
Is there an example to generate the contract JSON?
I mean in http4k-example repo?
d

dave

03/08/2021, 3:52 PM
well you need to build a version of the application in order to then sent a request to
which you'd have in your build anyway probably
e

Elizabeth Thomas

03/08/2021, 3:53 PM
Sorry, I am not following - so in this example https://www.http4k.org/guide/modules/contracts/, is there an attribute which I can write as a JSON?
d

dave

03/08/2021, 3:55 PM
e

Elizabeth Thomas

03/08/2021, 3:56 PM
Ah, Gotcha - thanks, I will follow this.