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

alightgoesout

05/04/2022, 12:42 PM
I am trying to use contract routes to export an OpenApi specification, but I have a problem with a composite query lens. I have made a
PagedQuery
object that contains a page number and a page size. I read it from the query parameters using a composite lens (
Query.composite { … }
) but the output in the open api file is incorrect:
Copy code
"parameters" : [ {
  "in" : "package.PagedQuery",
  "name" : "package.PagedQuery",
  "required" : true,
  "schema" : {
    "$ref" : "#/components/schemas/object1955914966"
  }
}
…
  "object1955914966" : {
    "type" : "object",
    "required" : [ ],
    "properties" : { }
  },
Is there a way to make composite lenses work for query parameters documentation, or is the only solution to have one lens per actual parameter?