Fork me on GitHub
#reitit
<
2022-01-28
>
DenisMc17:01:32

Hi, I’m trying to figure out how to define default values that will appear in my swagger-ui for the various parameters that I have in my requests. Let’s say in my route definition I have a root /foo with a :get request, and I currently have a single path parameter defined like so:

:parameters {:path {:foo-id string?}}
And let’s say that I want the default value in the swagger-ui for this field to be “my-foo”, rather than the “string” that comes up by default. Where would I define this?

Hukka17:01:03

Not sure, but if you use malli as the coercion system, https://github.com/metosin/malli#swagger2 might work here too

Hukka17:01:40

I'm afraid I haven't checked how reitit swagger generation works together with spec or schema

DenisMc18:01:11

Thanks for the pointer, I'll check out malli - I'm not wedded to spec 👍

Pablo21:01:53

Hello everyone, Is there a middleware to easily manage HTTP range requests?