Fork me on GitHub
#reitit
<
2023-01-28
>
ikitommi07:01:48

@geraldodev morning. only leaves are collected, route data in mid-path is accumulated to leaves. empty path fragment (`""`) is the way:

["/tipo-treinamento"
 ["" {:get ...
      :post ...}]
 ["/:id" {:post ...}]]
… there is an issue for change/fix this.

👍 2
geraldodev08:01:13

Middleware are collected on all nodes. methods/handlers are only collected on leaves. Correct ?

👍 2
ikitommi09:01:10

It's just data: middleware is defined in vector, and data in vectors accumulate. Handler is just value, last one wins.

👍 2
ikitommi09:01:41

e.g. defining new route data :roles as as set -> data is collected into set. Defining :role as a single value. Last (closest to the leaf) wins.

jasonjckn19:01:57

Is there a way to pass better example values in the swagger example payload

jasonjckn19:01:28

eg 1234 instead of 0 for a integer spec

jasonjckn20:01:26

or like s/map-of just results in ‘additionalProp123’

jasonjckn20:01:20

oh nvm, spec-tools.core/spec does it

👍 2