This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-30
Channels
- # admin-announcements (1)
- # adventofcode (2)
- # announcements (2)
- # babashka (60)
- # beginners (48)
- # cherry (1)
- # cider (16)
- # clj-kondo (4)
- # clojure (53)
- # clojure-belgium (3)
- # clojure-europe (20)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-poland (4)
- # clojure-uk (6)
- # clojuredesign-podcast (19)
- # clojurescript (39)
- # community-development (12)
- # cursive (4)
- # datalevin (7)
- # datomic (23)
- # honeysql (14)
- # hyperfiddle (3)
- # instaparse (3)
- # lsp (3)
- # malli (10)
- # off-topic (34)
- # overtone (8)
- # polylith (2)
- # re-frame (9)
- # reitit (3)
- # releases (1)
- # squint (16)
- # timbre (7)
- # wasm (2)
- # xtdb (8)
Hi everyone, I'm using reitit with openapi specification and I would like to know how can we set a schema to be used across different endpoints? When I try to add my malli schema to components I get an error from muuntaja
:openapi {:info {:title "My API" :version "0.0.1"}
:servers [{:url ""}]
:components {:securitySchemes {"auth" {:type :apiKey
:in :header
:name "x-authorization"}}
:schemas {"my-schema" c/my-malli-schema-in-another-file}}}
and the error is
{
"cause1": "com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class malli.core$_or_schema$reify$reify__14536 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: clojure.lang.PersistentArrayMap[":components"]->clojure.lang.PersistentArrayMap[":schemas"]->clojure.lang.PersistentArrayMap["facilities"])",
"cause0": "clojure.lang.ExceptionInfo: Malformed application/json in :muuntaja/encode {:type :muuntaja/encode, :format "application/json"}",
"message": "clojure.lang.ExceptionInfo: Malformed application/json in :muuntaja/encode {:type :muuntaja/encode, :format "application/json"}",
"url": "/glms/openapi.json",
"status": "500"