https://kotlinlang.org logo
Title
m

Mikael Ståldal

05/23/2023, 2:54 PM
It seems like
http4k-contract
generates a
servers
section like this if you don't specify any servers:
"servers": [
    {
      "url": "/",
      "description": null
    }
  ]
It would make more sense to not generate any
servers
section in this case.
d

dave

05/23/2023, 3:08 PM
from the open api docs:
An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.
m

Mikael Ståldal

05/23/2023, 3:09 PM
Right, then it is valid if the
"description": null
is removed.
d

dave

05/23/2023, 3:09 PM
that's valid anyway
the problem is that the renderer for the API docs always includes nulls (to cope with other bits of the spec)