Commit graph

370 commits

Author SHA1 Message Date
Joel Kaasinen
7fb9c27e46
feat: use request Content-Type or :muuntaja/content-type to coerce
Previously, `extract-response-format-default` was only looking at
(-> request :muuntaja/response :format). This led to wrong behaviour
when there were separate schemas for separate response content types
and an explicitly picked content-type for the response.
2025-10-29 10:54:10 +02:00
Joel Kaasinen
f4da07c222
Release 0.9.2
Some checks failed
testsuite / Clojure (Java 11) (push) Has been cancelled
testsuite / Clojure (Java 17) (push) Has been cancelled
testsuite / Clojure (Java 21) (push) Has been cancelled
testsuite / ClojureScript (push) Has been cancelled
testsuite / Lint cljdoc.edn (push) Has been cancelled
testsuite / Check cljdoc analysis (push) Has been cancelled
2025-10-28 14:57:54 +02:00
Joel Kaasinen
152c598858 Release 0.9.2-rc1 2025-10-24 15:52:47 +03:00
Joel Kaasinen
d2f44b8015 fix: match-by-name! should throw when match-by-name is PartialMatch
If a path param was nil, match-by-name (via impl/path-for) was
treating the parameter as missing, but match-by-name!
(via impl/throw-on-missing-path-params) was treating it as present.

That is:

(reitit/match-by-name router :page {:id "1"}) ;; => Match
(reitit/match-by-name router :page) ;; => PartialMatch
(reitit/match-by-name router :page {:id nil}) ;; => PartialMatch

(reitit/match-by-name! router :page {:id "1"}) ;; => Match
(reitit/match-by-name! router :page) ;; => ExceptionInfo: missing path-params for route /pages/:id -> #{:id}
(reitit/match-by-name! router :page {:id nil}) ;; => nil  !!!

fixes #758
2025-10-24 09:58:03 +03:00
Joel Kaasinen
05bc331397 feat: allow multimethods as :handlers in validation
fixes #749
2025-10-07 15:50:51 +03:00
Juho Teperi
210f20e714 Release 0.9.1 2025-05-27 14:04:31 +03:00
Joel Kaasinen
5025ca3a75 fix: response coercion for unlisted http statuses, when no default
fixes #742
2025-05-27 12:09:38 +03:00
Juho Teperi
b9cef492f8 Release 0.9.0 2025-05-23 10:47:21 +03:00
Joel Kaasinen
a8b4bc0d2d feat: rework & document response coercer defaulting rules 2025-04-28 10:01:09 +03:00
Joel Kaasinen
dd835e73a8 feat: allow :default response status code again
it is an old feature, but didn't have a test, so it was broken by #715

also add a test so we don't break it again
2025-04-11 10:30:52 +03:00
Juho Teperi
91fa60324f Use same javac options for reiti-core project.clj 2025-03-28 16:13:47 +02:00
Juho Teperi
6dd9cb1b7c Prepare release 0.8.0 2025-03-28 16:06:12 +02:00
Joel Kaasinen
d5d46d5b0b
Merge pull request #715 from filipesilva/coerce-response-int
fix: throw if response status is not int
2025-02-25 12:49:23 +02:00
Filipe Silva
f0fc440425 fix: throw if response status is not int
Fix #667
2025-02-25 10:12:47 +00:00
Juho Teperi
e5483cb1fc Release 0.8.0-alpha1 2025-01-31 14:06:05 +02:00
Juho Teperi
7ae118fbb5 Move query string coercion to coercion ns from core 2025-01-28 14:34:21 +02:00
Juho Teperi
dba8d159cc . 2025-01-22 14:05:26 +02:00
Juho Teperi
5829e1c656 Add reitit.frontend test case 2025-01-22 14:05:26 +02:00
Juho Teperi
1819fa5d75 Note 2025-01-22 14:05:26 +02:00
Juho Teperi
25dd0abcaf Use coercion to encode query-string values in match->path 2025-01-22 14:05:26 +02:00
Ben Sless
c96b22bc5f Add dispatch for every implementation of IPersistentMap
Closes #700
2024-09-13 20:25:51 +03:00
Tommi Reiman
d926ef7591 0.7.2 2024-08-30 18:05:18 +03:00
Ben Sless
4eab67a8db reduce-kv over treemap 2024-08-25 19:25:54 +03:00
Ben Sless
7dfc0e5fca Fix dynamism 2024-08-25 19:19:26 +03:00
Ben Sless
61783e4c81 Statically def transducer
Eliminates allocation and friendlier to JIT
2024-08-25 18:56:30 +03:00
Ben Sless
59642e51f1 Decrease code size and eliminate an allocation 2024-08-25 18:54:55 +03:00
Ben Sless
dcb7258caf Tailor keywordize implementation to concrete types
Even faster
2024-08-25 18:50:43 +03:00
Ben Sless
7ab6021630 Add faster keywordize-keys implementation for clj 2024-08-25 18:25:54 +03:00
Tommi Reiman
5589328a3c 0.7.1 2024-06-30 18:58:46 +03:00
Tommi Reiman
e8c3035254 . 2024-06-30 18:31:14 +03:00
Tommi Reiman
aec024a943 fix 2024-06-30 18:29:52 +03:00
Tommi Reiman
49e8d887da fixes #679 2024-06-30 17:55:47 +03:00
Tommi Reiman
ee67a746d4 reduce-kv 2024-06-30 17:55:23 +03:00
Tommi Reiman
2da94f733d don't merge records 2024-06-29 16:21:28 +03:00
Tommi Reiman
877c45af90 bump up version 2024-04-30 11:51:18 +03:00
Tommi Reiman
2be0dbbb2a 0.7.0-alpha8 2024-04-30 11:12:39 +03:00
Joel Kaasinen
c67a748915
Merge pull request #585 from djblue/var-handler
Allow var handlers
2024-03-15 10:35:22 +02:00
Joel Kaasinen
5d30a73bad feat: reitit.core/Expand for Vars 2024-03-15 09:21:51 +02:00
Juho Teperi
15e0c95cb6 0.7.0-alpha7 2023-10-03 13:34:36 +03:00
Juho Teperi
d4a85c40e6 Revert group id change
Per discussions in Slack, changing the group id causes too much problems
2023-10-03 13:06:23 +03:00
Tommi Reiman
6a39dcd6ec 0.7.0-alpha6 2023-09-11 15:03:31 +03:00
Joel Kaasinen
ccc2b5636e move all libs metosin/reitit => fi.metosin/reitit
metosin/ is a clojars legacy group, and new modules like
fi.metosin/openapi can't be created under it. Let's move everything
under fi.metosin
2023-09-11 11:04:36 +03:00
Joel Kaasinen
85ebb343ed refactor: remove dead code 2023-08-28 13:48:28 +03:00
Joel Kaasinen
8af89c05cb refactor: get rid of reitit.coercion/get-apidocs 2023-08-28 10:06:14 +03:00
Joel Kaasinen
233ac19914 refactor: remove dead code 2023-08-28 10:03:07 +03:00
Joel Kaasinen
ee298ec362 refactor: Coercion.-get-model-apidocs, use it for malli openapi 2023-08-28 08:42:54 +03:00
Tommi Reiman
b0c810a981
Merge pull request #628 from metosin/openapi-parameters
Openapi parameters
2023-08-24 09:25:46 +03:00
Tommi Reiman
05cbed815f review comment fixes 2023-08-24 08:38:18 +03:00
Tommi Reiman
adef7ad06e read openapi metadata into openapi description 2023-08-23 16:43:34 +03:00
Tommi Reiman
d8e9819e0a fix responses & request 2023-08-18 16:47:20 +03:00