Question: I'm searching for a way to generate documentation out of my defined schema. Is there a good way to achieve this?

Asked By
jerger
Asked At
2017-11-08 08:09:47

Found 7 possible answers.

User Answered At Possible Answer
ikitommi 2017-11-08 16:07:27 does https://github.com/metosin/schema-viz help?
jerger 2017-11-08 17:34:54 Nice tool :slightly_smiling_face: But I'm looking for a way to add some additional information to keywords. Intednded doc may look like:
ikitommi 2017-11-08 18:17:22 You can add meta-data to maps, s/defschema already adds :name and :ns . Same applies to all Schema Records. there are some tools in metosin/schema-tools for attaching docs, contribute also to generates swagger-docs etc.
jerger 2017-11-08 18:33:51 How can I attach documentation to lets say (optional-key :netcat-test) ? Schematools I know. If I'm right there are map-walkes, utils for sub-schema selection - but regarding documentation I found nothing ?!
riptidebeach 2017-12-16 19:39:38 so, I’m new to schema (came to it via compojure-api), and I’m curious about the stability of functions marked as experimental in the docs my use case is for data that needs to satisfy one of two schemas (though that number could grow in the future) so I’m curious if something like “cond-pre” is recommended, or if I should maybe be using “conditional” instead? I reached for “either”, followed its recommendation to “cond-pre”, and saw the experimental notation there
ikitommi 2018-02-19 19:59:48 500k downloads later, schema-tools hits 0.10.0 , with new ClojureScript coercion helpers: https://github.com/metosin/schema-tools . Plan is to move all the swagger-stuff here too, to get it working with ClojureScript too.
lee.justin.m 2018-03-14 01:28:34 i just started using schema with my cljs project. query: when i use schema/defn and something fails, the exception kind of looks like it was meant to be printed on a console. I.e, I get something like "Input to notebook-order-received does not match schema: ↵↵  [nil (named (not (sequential? {})) notebooks)]  ↵↵" And there is a lot of structured data in the exception. Is there a better way of inspecting the error other than looking in chrome’s console and drilling down with the mouse? Specifically, I’d love to know what in the hell I actually passed to the function instead of knowing what it was supposed to be.

Related Questions