You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a query parameter is of type enum and has a default value, the swagger parameter for default should be appropriately set and required should be set to true.
Here is an example below.
what's happening
(GET"/all/" request
:description"Return a list of articles.":return [(dissoc t/Article :is_html:text)]
:responsesdefault-responses:query-params [{sort :- (describe (s/enum:published_at:last_processed_at) "The sort type. Defaults to published_at.") "published_at"}]
(return (domain/get-all-articles db (org request) :days1)))
The sort parameter above can be either published_at or last_processed_at where it defaults to the former.
I would expect the select box in the UI to start off with the published_at pre-selected and not allow a nil option.
I would expect the json output to have required set to true and a default value set to published_at.
Thanks for your time!
The text was updated successfully, but these errors were encountered:
If a query parameter is of type enum and has a default value, the swagger parameter for
default
should be appropriately set andrequired
should be set to true.Here is an example below.
what's happening
The sort parameter above can be either
published_at
orlast_processed_at
where it defaults to the former.The JSON output for the route above is:
And the UI renders like this:
expectation
I would expect the select box in the UI to start off with the
published_at
pre-selected and not allow a nil option.I would expect the json output to have
required
set to true and adefault
value set topublished_at
.Thanks for your time!
The text was updated successfully, but these errors were encountered: