True, we could probably do this via an attribute on the schema (and supporting this attribute appropriately in the interpreter). Can you create an issue to add that?
Also I have one more questions about other difference:
Is there a way to configure Tapir Schema generation to mark arrays as “required”?
I want to explicitly say that I will always return "myCollection": [],.
In scala-jsonschema not setting default value for collection will end up with having it in schema required list:
case class Test(myCollection: Seq[String])
Then schema includes:
"required": [
"myCollection"
]
Adding default will remove that from required.
I’m not saying that this way of configuration is great in scala-jsonschema (I would say it’s rather surprising). But it’s possible.
Is there any way to add arrays as “required” in Tapir generated schema?