Commit graph

425 commits

Author SHA1 Message Date
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
Joel Kaasinen
659e96e780 test: handler can be a var 2024-03-15 09:18:54 +02:00
Martín Varela
ed280f9a33 feature: fetch openapi content types from muuntaja
(level 1 integration in #636)
2024-02-09 11:49:44 +02:00
Martín Varela
982ac3ec72 Fix: account for changed malli encoder behavior that was breaking ring-coercion-test 2024-02-09 11:37:34 +02:00
Martín Varela
f99a76886e Fix: fix swagger ring tests, malli keys are now strings, not keywords 2024-02-09 11:21:31 +02:00
Joel Kaasinen
b4c0936207 Merge remote-tracking branch 'origin/master' into fix-openapi-examples 2023-09-11 07:53:15 +03:00
Joel Kaasinen
7352358662 feat: rename openapi :content-types keyword, split for req & resp 2023-09-08 15:17:35 +03:00
Joel Kaasinen
f1d26791fc Merge branch 'master' into rework-pr-589 2023-08-30 08:29:06 +03:00
Joel Kaasinen
d5021e549a fix: pick up openapi examples from [:responses _ :content :default] 2023-08-28 13:48:23 +03:00
Joel Kaasinen
4d1d469686 test: test multiple examples using new syntax 2023-08-28 13:48:23 +03:00
Joel Kaasinen
6f111bce2e refactor: share -get-apidocs-openapi between malli, spec & schema 2023-08-28 09:24:10 +03:00
Tommi Reiman
adef7ad06e read openapi metadata into openapi description 2023-08-23 16:43:34 +03:00
Tommi Reiman
226ca889b6 openapi content tests 2023-08-18 17:17:56 +03:00
Tommi Reiman
0728154751 name the doseq-tests 2023-05-29 12:07:54 +03:00
Tommi Reiman
b1404ada6d top-level :request coercion & stuff 2023-05-28 16:49:08 +03:00
Tommi Reiman
1b5287724e format 2023-05-27 19:02:10 +03:00
Tommi Reiman
d17c97780e wrap :content schemas in :schema 2023-05-27 19:01:17 +03:00
Tommi Reiman
9f58bb22e3 kill ctrl 2023-05-22 20:28:20 +03:00
Tommi Reiman
9ac713f0e5 doesn't work properly with spec 2023-05-22 09:16:57 +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
3f265888a4 cleanup 2023-05-21 20:16:45 +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
Joel Kaasinen
1983a4bb64 test: openapi parameter descriptions via schema 2023-05-17 16:06:45 +03:00
Joel Kaasinen
c443adbfca test: openapi parameter descriptions via spec 2023-05-17 08:25:44 +03:00
Joel Kaasinen
b56c15b64c fix: openapi malli parameter descriptions
... should come from the parameter type, not from the parent :map
2023-05-17 08:19:44 +03:00
Joel Kaasinen
2e8e9265d9 test: document current openapi3 description behaviour
malli works weirdly, others don't
2023-05-17 08:19:26 +03:00
Wes Morgan
59812a350f
Update malli swagger test expectations for definitions
...which should only be at the top level now.
2023-05-09 10:33:54 -06:00
Juho Teperi
9f6565f097
Merge pull request #604 from metosin/fix-377-fragment-strings
Fix #377, navigate to routes with fragment string in frontend
2023-05-04 15:12:41 +03:00
Wes Morgan
937768651e
Add malli swagger test w/ definitions 2023-04-20 12:39:08 -06:00
Joel Kaasinen
ca9852a318 test: multiple named openapi examples 2023-04-19 10:49:23 +03:00
Joel Kaasinen
75ebeaf6cd test: test openapi examples support for malli, schema, spec 2023-04-18 15:04:14 +03:00
Wes Morgan
182524baac
Update swagger test expectations for latest malli changes 2023-04-17 11:35:28 -06:00
Joel Kaasinen
1a73ba952e test: openapi3 + malli + mutually recursive schemas 2023-04-17 08:45:24 +03:00
Juho Teperi
56e6dbe8d8 Fix #377, navigate to routes with fragment string in frontend 2023-03-24 14:42:13 +02:00
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