This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-04
Channels
- # aatree (5)
- # admin-announcements (37)
- # alda (1)
- # announcements (4)
- # architecture (1)
- # aws (3)
- # beginners (82)
- # boot (230)
- # braid-chat (14)
- # cider (48)
- # cljs-dev (8)
- # cljsrn (31)
- # clojars (47)
- # clojure (72)
- # clojure-austin (2)
- # clojure-russia (396)
- # clojurescript (72)
- # community-development (3)
- # component (6)
- # core-async (6)
- # cursive (26)
- # datomic (42)
- # emacs (6)
- # events (35)
- # hoplon (57)
- # immutant (3)
- # jobs (2)
- # jobs-discuss (10)
- # ldnclj (16)
- # luminus (2)
- # off-topic (50)
- # om (181)
- # parinfer (285)
- # proton (68)
- # re-frame (19)
- # reagent (2)
- # ring-swagger (23)
- # yada (36)
@jefmsmit you can't share the plumbing destructuring syntax as data, but you can either: a) use :query [params schema]
which is effective a let-statement on query-params, have to destucture from params yourself or b) use :query-params
at context
, which effects all its child routes. Valid only if all childs accept same params.
but you can define the schema for one field and reuse that over multiple :query-params
. There is no default-handling in schema itself currently, but planning to add that to our schema-tools.
https://github.com/metosin/schema-tools/issues/25, pull requests welcome!
Hi guys, sorry about the noise but I'm struggling trying to get json-schema having prismatic/schema
I'm trying to follow these instructions https://github.com/metosin/ring-swagger#schema-to-swagger-json-schema-conversion
with this simple schema
(s/defschema User {:id s/Str,
:name s/Str
:address {:street s/Str
:city (s/enum :tre :hki)}})
(json-schema/convert User {})
=> {:$ref "#/definitions/User"}
my final reason to have json-schema is for giving to the FE javascript guys for his side validation
and I thought that I could generate this data having prismatic/schemas
BTW: thanks for your work
hi. we seem to be missing a good public api for the schema->json schema conversion :O
swagger spec doesn’t allow deeply nested schemas, so everything will be flattened a one-level deep scehema objects.
fing = find ?
yes, there isn’t a single function to do that, logic to do that is currently coupled in the swagger2 namespace (extract sub-schemas + create definitions of subschemas + create models).
I'll open an issue maybe others (with more knowledge than me ) can help or have experience with this topic
sorry but really lost in this area
Have a good day @ikitommi !
thanks for reporting, we definetely need that, just have to push more stuff from swagger2 to json-schema. Shoudn’t be a big thing.
@tangrammer: you too!
@tangrammer: that works, if you are in a hurry 😉