Juho Teperi
e2217887e3
Comments about differences to reitit.impl
2023-03-24 13:59:02 +02:00
Juho Teperi
48bbdba8ed
Implement navigate and set-query functions
2023-03-24 11:16:09 +02:00
Juho Teperi
f78116e346
Test fragment
2023-03-23 15:46:25 +02:00
Juho Teperi
a558365252
Cleanup
2023-03-23 15:41:48 +02:00
Juho Teperi
e3e93eaffb
Add some tests
2023-03-23 15:36:48 +02:00
Joel Kaasinen
d8e28e153b
fix: swagger multipart support
...
1. For spec we were including some extra stuff in the parameter
specification:
{:description "",
:in "formData",
:name "file",
:properties {"bytes" {:format "byte", :type "string"},
"content-type" {:type "string"},
"filename" {:type "string"}},
:required ["filename" "content-type" "bytes"],
:type "file"}
2. For malli the :type changed from "file" to "string" because of
openapi changes. Now openapi and swagger both get the right type.
3. Test for swagger multipart support
2023-03-17 14:54:46 +02:00
Joel Kaasinen
b5c9ee274d
feat: generate correct openapi for reitit.ring.malli
2023-03-16 09:57:02 +02:00
Joel Kaasinen
de2d810b7c
test: multiple parts in multipart-test
2023-03-15 17:48:03 +02:00
Joel Kaasinen
acbcec1ed9
feat: openapi3 multipart support for schema
2023-03-15 17:48:03 +02:00
Joel Kaasinen
1c65f533cf
feat: openapi3 multipart support for malli
2023-03-15 17:48:03 +02:00
Joel Kaasinen
f322597c04
feat: openapi3 multipart support for spec
2023-03-15 17:48:03 +02:00
Joel Kaasinen
d0ff64df57
test: simplify openapi_test.clj a bit more
2023-03-15 16:01:57 +02:00
Joel Kaasinen
66e7c9e1c8
test: nicer handling of missing :additionalProperties for spec
2023-03-15 13:19:01 +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
9ae3cd0824
fix: reitit.openapi route data validation
...
:kind set? would've worked, but there's no need to insist a set
also, turn on route data validation in openapi_test.clj
2023-03-08 14:39:52 +02:00
Joel Kaasinen
2cc6e33654
test: openapi operationId, tags and deprecated
2023-03-08 10:55:23 +02:00
Joel Kaasinen
16145dbdce
test: validate generated openapi specs in all tests
2023-03-07 09:13:38 +02:00
Joel Kaasinen
8e099febdd
test: validate generated openapi spec
2023-03-06 16:10:48 +02:00
Joel Kaasinen
4c990fb44f
feat: openapi default request/response schemas
...
use a default schema from :request/:response :body for all specified
:content-types
2023-03-06 10:58:03 +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
2d60702769
fix: per-content-type openapi w/ spec
2023-03-03 14:15:31 +02:00
Joel Kaasinen
b149c8c5af
test: rework openapi3 tests
...
- DRY out all-parameter-types-test and per-content-type-test
- Remove redundant assertions
- Run same test for malli/schema/spec
- Clean up commented-out code etc.
2023-03-03 14:15:31 +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
Joel Kaasinen
8f48cdc96c
test: enable openapi spec tests
2023-03-03 14:15:22 +02:00
Ilmo Raunio
310dcd0e99
Merge pull request #581 from metosin/add-support-for-fragment-parameters-2
...
Add reitit-frontend support for fragment string
2023-02-21 15:05:25 +02:00
Ilmo Raunio
e490f5df05
Merge pull request #584 from metosin/reloading-ring-handler
...
reloading-ring-handler
2023-02-21 14:42:33 +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
Joel Kaasinen
f03134e215
fix: malli openapi tests
...
malli.json-schema now outputs `:additionalProperties false`
2023-02-15 16:07:23 +02:00
bplubell
e175dc76c9
Fix incorrect ring-router doc references
...
It looks like documentation references to `ring-router` are left-overs
from early README examples - I couldn't find any code that ever used the
name. The Ring router named `reitit.ring/router`.
While it didn't take too long for me to realize why my `ring-router` was
not working, I had to look the examples to figure out the name of the
function was just `router` - which was confusing since the section
header stated `reitit-router`.
2023-01-31 15:51:31 -08:00
Tommi Reiman
d1bb44a88f
Merge branch 'master' into reloading-ring-handler
2023-01-22 14:30:06 +02:00
Tommi Reiman
0648296315
Merge branch 'master' into feature/openapi
2023-01-22 14:29:22 +02:00
Tommi Reiman
3fd20f2294
reloading-ring-handler
2023-01-22 14:15:08 +02:00
Tommi Reiman
8e1e7e62ca
fix spec tests + format
2023-01-21 10:58:53 +02:00
Tommi Reiman
d1e02fd0a1
Update dependencies
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
3ec5acc7a1
Merge pull request #582 from ilmoraunio/issue-565
...
Include query-string as part of location header in redirect-trailing-slash-handler
2023-01-21 10:51:20 +02:00
Ilmo Raunio
0870b20a05
Add query-string to redirect-trailing-slash-handler
2023-01-20 00:20:10 +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
42e988e518
Merge branch 'master' into support-operationid
2023-01-09 17:27:00 +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
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
Tommi Reiman
1ecfd1ae02
CHANGELOG, pass match too
2022-04-05 17:55:09 +03:00
Tommi Reiman
9e4b420fc8
on-coercion-error
2022-04-05 17:33:25 +03:00
Tommi Reiman
650ff3d6b3
.
2022-03-10 15:23:07 +02:00
Tommi Reiman
f9841363c5
faster impl, removes all intermediate steps + cleanup
2022-03-10 14:21:39 +02:00
Tommi Reiman
1e5fb601da
fix #538
2022-03-10 13:42:53 +02:00
Tommi Reiman
f3dee769fb
format-ns
2022-02-14 16:59:20 +02:00
Tommi Reiman
2aba5610c7
format
2022-02-14 16:58:10 +02:00
Tommi Reiman
d0f7126491
add support for malli-lite
2022-02-14 16:45:14 +02:00
Tommi Reiman
bdcb1eb5b1
clean-ns
2022-02-12 22:35:27 +02:00
Tommi Reiman
5d4c886d35
format
2022-02-12 22:34:26 +02:00
Miikka Koskinen
9160aa0f2b
Add a test for /{foo}.html style routes
...
Just like path `///` would not match `/{foo}/`, `/..html` does not match
`/{foo}.html`.
2021-10-06 20:42:09 +03:00
Tommi Reiman
38f2bd4812
Merge branch 'master' into fix-resource-handler-url-decoding
2021-08-03 13:33:39 +03:00
Tommi Reiman
5486174722
Merge pull request #501 from metosin/malli-fix
...
Fix malli encoding & update deps
2021-08-03 13:29:53 +03:00
Tommi Reiman
020c424b4e
dead code, CHANGELOG
2021-08-03 13:24:29 +03:00
Tommi Reiman
20b7cabed7
Fix Malli encoding,, #498
2021-08-03 08:46:51 +03:00
Dieter Komendera
056c70d269
Enrich request for pedestal/routing-interceptor default-queue
...
This ensures requests handled by the default queue also have
access to the router per the injected :reitit.core/router key
on the request.
2021-06-24 14:07:23 +02:00
Miikka Koskinen
1297cfd902
Handle URL-encoded paths in file and resource handlers
2021-04-30 14:38:18 +03:00
Miikka Koskinen
1b74373911
Use explicit :refers
2021-04-23 17:15:35 +03:00
Miikka Koskinen
1b583c1cc2
Remove operation-id uniqueness check
...
Let's leave that for other tools for now.
2021-04-23 17:02:17 +03:00
Miikka Koskinen
5824d9eeef
Make the not-found-handler fix backwards compatible
...
PR #471 aimed to fix issue #464 . However, the change was slightly
backwards-incompatible, since it made the file and resource handlers use
the default 404 handler when mounted outside of the router. The previous
behavior was to return nil in that case.
This patch restores the previous behavior and clarifies that `:path`
option can be used only when the file/resource handler is mounted
outside of a router.
2021-02-26 08:14:01 +02:00
Miikka Koskinen
88897a2264
Remove useless testing calls
2021-02-26 07:41:03 +02:00
Kari Marttila
902b33f004
Support not-found-handler with path in resource handler ( #464 )
2021-02-19 15:17:26 +02:00
Kimmo Koskinen
496e6b6fc7
Allow space as separator, fixes #411
...
Fixes https://github.com/metosin/reitit/issues/411
2021-01-29 15:02:35 +02:00
Timo Kramer
e095cd2efa
Support operationId in reitit-swagger
...
OpenAPI Specification allows the operationId to be added to the
"Operation Object" alongside e.g. summary and description. This
commit introduces the support of this element in the
reitit-swagger module and extends the tests. One test shows the
correct use of operationId where both are distinct and one
shows the failing of the swagger creation when the IDs are not
distinct.
- Spec: https://swagger.io/specification/#operation-object
- Adds the support for operationId
- Adds operationId in two places of the swagger test
- Adds a test that checks exception on duplicate IDs
- Closes #451
2020-11-25 18:38:35 +01:00
Tommi Reiman
f2f7d3a428
Merge pull request #438 from metosin/frontend-fixes
...
Frontend fixes
2020-10-19 10:42:45 +03:00
Tommi Reiman
9ce7e6593c
malli 0.2.0, update docs & tune
2020-10-18 20:22:01 +03:00
Kimmo Rantala
2ed5b48067
Fix resource handler path matching
...
File/resource handler checks that uri actually matches to path instead
of comparing just path length to uri length.
2020-10-15 23:33:20 +03:00
Juho Teperi
845240d330
Merge branch 'master' into frontend-fixes
2020-10-15 09:49:14 +03:00
Tommi Reiman
39ec264da8
Merge pull request #417 from Koura/issue-217-consume-form-params
...
Issue 217 consume form params
2020-09-30 12:25:52 +03:00
Juho Teperi
58f9871747
Test rfe start!
2020-09-26 16:51:19 +03:00
Tommi Reiman
fbff819909
update deps
2020-09-26 12:11:14 +03:00
tjalkane
ce635609c7
Omit swagger-data for muuntaja middleware/interceptor
...
Leave out swagger-data when `:form`, but no `:body` parameters, are
defined. If swagger-data is not omitted, order of parameters and
muuntaja middleware will matter.
2020-07-10 09:52:20 +03:00
tjalkane
6703a02baa
Publish Swagger :consumes for parameters-interceptor
...
Make parameters-interceptor automatically publish swagger data for
endpoints when :form, but not :body params, are present.
2020-07-08 10:18:57 +03:00
tjalkane
15df0c5005
Automatically publish Swagger :consumes for :form params
...
Make parameters-middleware publish swagger data for endpoints when
:form, but not :body params,
are present.
2020-07-08 10:07:43 +03:00
tjalkane
c1c3cd26b4
Remove duplicate require of schema.core
2020-06-26 00:25:09 +03:00
tjalkane
87d7e2e3c9
Fix: rename a test to make it run
...
The renamed test is redeclared later in the same namespace
causing the original one to not be run with `lein test`.
2020-06-26 00:16:06 +03:00
Tommi Reiman
681c994f7f
Test that middleware swagger injections work
2020-05-26 22:35:43 +03:00
Tommi Reiman
f2e0470ecd
Merge pull request #408 from metosin/PR
...
Better malli-coercion
2020-05-26 22:03:45 +03:00
Tommi Reiman
57da6fa5ad
optimized http-coercion
2020-05-26 21:32:26 +03:00
Tommi Reiman
e649ed22b9
New options for malli coercion
2020-05-26 08:09:35 +03:00
Tommi Reiman
f41006c8bb
just validation
2020-05-25 23:50:27 +03:00
Tommi Reiman
a2d8208600
Fix #407
2020-05-25 21:54:27 +03:00
piotr-yuxuan
3e8eaa48d7
Fix default description
...
https://github.com/metosin/reitit/issues/403
2020-05-19 23:42:56 +01:00
Tommi Reiman
920c9d7cfd
nil-punning on routes
2020-05-17 10:34:44 +03:00
Tommi Reiman
b1c8dbdaa4
Update sieppari, fix tests
2020-05-16 17:34:55 +03:00
Tommi Reiman
ddf56624b7
Update swagger test
2020-05-16 14:08:08 +03:00
Tommi Reiman
26dcbef5d1
Add tests for missing sieppari asyncs
2020-05-16 14:06:45 +03:00
Tommi Reiman
d36c47d7b1
:reitit.ring/default-options-endpoint & :reitit.http/default-options-endpoint
2020-05-12 21:21:39 +03:00
Tommi Reiman
fd0d7cc46c
Add create-file-handler, fixes #395
2020-05-12 21:05:12 +03:00
Tommi Reiman
b8b442b598
Fix #394
2020-05-12 21:05:12 +03:00
Tommi Reiman
79c430d298
Fix tests
2020-05-12 21:04:35 +03:00
Tommi Reiman
9e7df6ca03
Support expand on default-options-endpoint
2020-05-12 20:11:39 +03:00