reitit

2024-06-12T06:53:30.298389Z

Hi all, I have this snippet for a file upload and all is working:

:parameters {:multipart [:map [:file reitit.ring.malli/temp-file-part]]}
But I could not figure out how to "document" the parameter" file", so that a "description" of it appears in the swagger-ui:

erwinrooijakkers 2024-06-17T09:50:04.907029Z

From the https://github.com/metosin/reitit/blob/4e85cb14c5125651a8c964b95c95bc31f63c7cf6/doc/ring/openapi.md?plain=1#L46C1-L55C26:

["/plus"
 {:post
  {:parameters
   {:body [:map
           [:x
            {:title "X parameter"
             :description "Description for X parameter"
             :json-schema/default 42}
            int?]
           [:y int?]]}}}]
So maybe pass a map as such? :parameters {:multipart [:map [:file {:description "<description>"} reitit.ring.malli/temp-file-part]]}

juhoteperi 2024-06-17T10:13:26.673989Z

Yes, I think correct answer is to attach the description property to the map schema key properties

👍 1