1,7 yes its hard - but thats what library authors are born for -- to do the hard stuff for us mortals to abuse š
2. "return Object" -- yes pointelss. Im refering more to return "class X" or "interface X", (and accept class X)
3. The schema modules Ive been using are 'com.kjetland:mbknor-jackson-jsonschema_2.12:1.0.34' , 'com.dr:ktjsonschema:1.0.2' YMMV.
--> I have a gradle plugin that given an annotated class or interface will generate json schema from it and leave it as 'source' in your build tree
I do not know if this is compatible with openAPI version-wise or otherwise, but it works reasonably well -- not perfedt but decent (on kotlin code )
4. I would disagree -- There are certianly a section for examples -- which is awesome --- but I disagree its 'example driven' -- e.g. in codegen or as a consumer of openapi, the example's role is only that of plain text, it does not take part in any of the type, structure, or formal specs, not validated against them, nor used in any way except in specialized documentation generators. -- not to say they are not useful, but I disagree that its 'driven' by example. Maybe some implementation may choose to do so similar to how examplatron uses 'examples' to derive XML schema -- but its not in OpenAPI in any form I am aware.
5. Yes some form of allowed openapi schema are not easly represented in kotlin or java -- but if your codebase is kotlin or java maybe you dont use those much ?
6. Constant -- with some aspects, inconsistent with others - not saying its bad -- just that consistency is context dependent.
7. Ya , hard. thats why I dont do it (yet)) -- but you !!! -- you da man - you can do this before breakfast š -- does encouragement help?
IMHO most difficult is integration cleanly with http4k existing 'isms' but the lense thing comes close -- say if you restricted any one method to a single lens of class/interface --then you got it.