Commit graph

330 commits

Author SHA1 Message Date
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
Juho Teperi
4a182588b4 Release 0.7.0-alpha5 2023-06-14 16:06:20 +03:00
Tommi Reiman
b1404ada6d top-level :request coercion & stuff 2023-05-28 16:49:08 +03:00
Tommi Reiman
93a4246682 allow default 2023-05-28 12:07:01 +03:00
Tommi Reiman
d17c97780e wrap :content schemas in :schema 2023-05-27 19:01:17 +03:00
Tommi Reiman
3e6c3f589f review comments 2023-05-22 20:23:47 +03:00
Tommi Reiman
ce06214014 welcome 2-phase schema compilation
1) use `:update-paths` to handle data in certain (loose) paths differently
  - accumulate schemas in all relevant routers into vector
  - we do not know the coercion here (ring/http have special handling of data, e.g. http-methods)

2) run coercion compiler for the model to merge the effective model
  - schema + malli = should work ok, spec = best effort

3) publish final schemas into compiled route data
2023-05-21 20:32:40 +03:00
Tommi Reiman
550ea6da58 path-update 2023-05-21 20:13:43 +03:00
Tommi Reiman
4d0e40f135 ctrl.* is such test 2023-05-21 18:15:44 +03:00
Tommi Reiman
d45dd151b7 document meta-merge 2023-05-21 18:11:42 +03:00
Tommi Reiman
b3383b0396 0.7.3-alpha4 2023-05-17 18:23:05 +03:00
Juho Teperi
0b6ed62738 Release 0.7.0-alpha3 2023-05-05 12:57:31 +03:00
Juho Teperi
5adc5ffba0 Compile reitit.Trie with Java 1.8 target 2023-05-05 12:56:02 +03:00
Juho Teperi
e204d4ff1b Release 0.7.0-alpha2 2023-05-04 15:20:31 +03:00
Tommi Reiman
3336880b01 0.7.0-alpha1 2023-05-03 10:25:01 +03:00
Joel Kaasinen
33f7b1ccd7 chore: upgrade lein-parent plugin 2023-04-13 09:23:08 +03:00
Joel Kaasinen
814c8b88e2 refactor: factor out -identity-coercer 2023-03-14 14:39:05 +02:00
Joel Kaasinen
8c87fef7b6 feat: warning when swagger encounters per-content-type coercions 2023-03-10 08:52:45 +02:00
Joel Kaasinen
50c1af9a5b feat: route data validation for per-content-type coercions 2023-03-08 14:39:52 +02:00
Joel Kaasinen
c3a3ca9f95 feat: change syntax for :request parameter coercion default schema
use :request :body instead of :request :content :default for symmetry
with :response
2023-03-06 10:54:24 +02:00
Joel Kaasinen
7842160656 Merge remote-tracking branch 'origin/master' into openapi 2023-03-03 14:43:23 +02:00
Joel Kaasinen
c8d679c6b3 feat: per-content-type request/response coercions
implemented on the reitit-core level so individual coercions don't
need changes

syntax:

{:parameters {:request {:content {"application/edn" [:map ...]}}}
 :responses {200 {:content {"application/edn" [:map ...]}}}}
2023-03-03 14:15:31 +02:00
Tommi Reiman
47f1ee0c84 0.6.0 2023-02-21 15:17:00 +02:00
Juho Teperi
2494f702d9 Read fragment string without decoding
Users can use Malli decoding to control decoding per schema.
2023-02-16 13:13:48 +02:00
Juho Teperi
83c31e35bc Revert "Revert "Merge pull request #554 from just-sultanov/add-support-for-fragment-parameters""
This reverts commit 4d1b00edfa.
2023-02-16 11:53:27 +02:00
Tommi Reiman
0648296315
Merge branch 'master' into feature/openapi 2023-01-22 14:29:22 +02:00
Tommi Reiman
8e1e7e62ca fix spec tests + format 2023-01-21 10:58:53 +02:00
Tommi Reiman
f27c2fc2aa clean 2023-01-21 10:56:42 +02:00
Tommi Reiman
98a4d9b447 :meta-merge-fn -> :meta-merge 2023-01-21 10:56:42 +02:00
Tommi Reiman
22fb9810a7
Merge pull request #552 from frwdrik/patch-1
Remove redundant s/and
2023-01-21 10:43:26 +02:00
Juho Teperi
4d1b00edfa Revert "Merge pull request #554 from just-sultanov/add-support-for-fragment-parameters"
This reverts commit c2c267f4d8, reversing
changes made to 8087522b82.
2023-01-18 18:38:47 +02:00
Tommi Reiman
c2c267f4d8
Merge pull request #554 from just-sultanov/add-support-for-fragment-parameters
Add support for fragment parameters in the reitit-frontend module
2023-01-09 17:33:24 +02:00
Tommi Reiman
26a581298a
Merge pull request #561 from pfeodrippe/meta-merge
add `:meta-merge-fn` option
2023-01-09 16:39:12 +02:00
Ben Sless
24f38e0dfa Unroll merge and hash-map coercion 2022-12-06 21:35:26 +02:00
Ben Sless
8398c98595 Add serialize-failed-result coercion option
False by default, if true will serialize the failed coercion result in
the error message
2022-12-06 21:34:13 +02:00
Toni Väisänen
c69b4cde3a Handle empty seq as empty string in query-string
example:

instead of

```clojure
(query-string {:nil nil
               :vec []
               :seq-empty '()})
;; => "nil=&&"
```

now

```clojure
(query-string {:nil nil
               :vec []
               :seq-empty '()})
;; => "nil=&vec=&seq-empty="
```
2022-10-12 13:24:07 +03:00
Enzzo Cavallo
c576b47634
OpenAPI V3 Support 2022-09-05 03:21:53 -03:00
Paulo Feodrippe
fc73d02e01 add :meta-merge-fn option 2022-08-11 07:55:15 -04:00
Ilshat Sultanov
25a051b003
Add support for fragment parameters in the reitit-frontend module
We have to process the fragment parameters due to the fact that the authorization server returns a callback in the following format:
`https://example.com/oauth/google/callback#access_token=foo&refresh_token=bar&provider_token=baz&token_type=bearer&expires_in=3600`

Links:
- https://www.rfc-editor.org/rfc/rfc6749#section-4.2
- https://www.rfc-editor.org/rfc/rfc6749#section-4.2.2
2022-06-15 23:38:51 +05:00
Fredrik Vaeng Røtnes
aeab5b96a6
Remove redundant s/and 2022-05-09 10:36:40 +00:00