https://kotlinlang.org logo
#http4k
Title
j

joscha.alisch

04/10/2018, 4:42 PM
Hi @dave, Ivan told me to post this question here, since apparently http4k-contract is your field of expertise 😉 From https://www.http4k.org/guide/modules/contracts/:
Self-describing: - a generated endpoint is provided which describes all of the Routes in that module. Implementations include OpenApi/Swagger documentation, including generation of [JSON schema] (http://json-schema.org/) models for messages.
Is the schema generation supposed to be working for lenses generated with
.auto<..>().toLens()
? If, yes it doesn’t seem to work for me. I get this:
Copy code
"parameters" : [ {
          "in" : "body",
          "name" : "body",
          "description" : null,
          "required" : true,
          "type" : "object"
        } ],
for
Copy code
…. meta {
	body = Body.auto<MyDataClass>().toLens()
} …