Commit graph

45 commits

Author SHA1 Message Date
Juho Teperi
25dd0abcaf Use coercion to encode query-string values in match->path 2025-01-22 14:05:26 +02:00
Joel Kaasinen
25aee5ed22 Merge remote-tracking branch 'origin/master' into fix-openapi-example 2023-08-28 13:01:58 +03:00
Joel Kaasinen
e4c75c7354 fix: dissoc unsupported [:responses nnn :content] for swagger
otherwise swagger generation crashes when it tries to serialize
something like `{:content {"foo/bar" any?}}`

also fix examples/ring-malli-swagger
2023-08-28 11:18:00 +03:00
Joel Kaasinen
233ac19914 refactor: remove dead code 2023-08-28 10:03:07 +03:00
Joel Kaasinen
051452231a refactor: -get-model-apidocs for schema & spec
not used yet tho
2023-08-28 09:02:11 +03:00
Tommi Reiman
05cbed815f review comment fixes 2023-08-24 08:38:18 +03:00
Tommi Reiman
226ca889b6 openapi content tests 2023-08-18 17:17:56 +03:00
Tommi Reiman
d8e9819e0a fix responses & request 2023-08-18 16:47:20 +03:00
Tommi Reiman
b1404ada6d top-level :request coercion & stuff 2023-05-28 16:49:08 +03:00
Tommi Reiman
d17c97780e wrap :content schemas in :schema 2023-05-27 19:01:17 +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
Joel Kaasinen
f322597c04 feat: openapi3 multipart support for spec 2023-03-15 17:48:03 +02:00
Joel Kaasinen
bcd12d9f31 refactor: push openapi/openapi-spec call inside merge
to make reitit.coercion.spec match reitit.coercion.schema
2023-03-15 13:38:34 +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
2d60702769 fix: per-content-type openapi w/ spec 2023-03-03 14:15:31 +02:00
Enzzo Cavallo
c576b47634
OpenAPI V3 Support 2022-09-05 03:21:53 -03:00
Tommi Reiman
f3dee769fb format-ns 2022-02-14 16:59:20 +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
Tommi Reiman
3c61824f1d malli coercion + strip extra keys by default with spec 2019-12-28 00:51:41 +02:00
Kevin van Rooijen
a9cacd78ce Properly access ::s/problems key in coercion-spec 2019-05-20 17:30:17 +02:00
Tommi Reiman
549d2a0f97 Adhere spec-tools 0.9.0 changes 2019-03-03 20:54:47 +02:00
Tommi Reiman
778a8b97b9 Review small fixes 2019-02-28 12:12:28 +02:00
Tommi Reiman
950fef88d2 Use exception/fail! in all creation-time exceptions
... to be companioned with a slick error printer
2019-02-28 12:12:28 +02:00
Heikki Hämäläinen
24c146a702 Add support for vector based specs in Swagger generation
This allows data specs to be in vectors as well as maps. Before the change data spec [{:foo string?}] would throw exception when generating Swagger.
2018-11-21 14:23:33 +02:00
Tommi Reiman
37cb99a13e Expose spec problems to error handlers 2018-11-17 20:50:04 +02:00
Tommi Reiman
17c27eb732 Remove generated names from Data-Specs 2018-10-21 20:36:53 +03:00
Tommi Reiman
cb14cf017a Update to spec-tools 0.8.0-SNAPSHOT 2018-10-21 20:06:28 +03:00
Tommi Reiman
e879df54da case 2018-08-02 16:12:32 +03:00
Tommi Reiman
3af1bd2083 Allow empty response :body for Swagger 2018-06-24 19:20:22 +03:00
Tommi Reiman
8f7bb94c94 Support ds/maybe in spec-coercion 2018-06-14 13:40:17 +03:00
Tommi Reiman
13c02ac51c no-op-transformer 2018-05-14 08:31:49 +03:00
Tommi Reiman
027d46508b Update deps 2018-05-14 08:20:29 +03:00
Tommi Reiman
3cc9fedcbf Fixed based on Miikka’s comments 2018-03-18 11:21:49 +02:00
Tommi Reiman
9a2a8a1f16 Tests for swagger 2018-03-17 14:19:23 +02:00
Tommi Reiman
b43c8cfed9 Swagger WIP 2018-03-17 10:53:19 +02:00
Tommi Reiman
e1fbe4460f Update deps 2018-02-19 07:43:42 +02:00
Tommi Reiman
c50d95ec3e . 2018-02-11 21:44:47 +02:00
Tommi Reiman
2dc3636064 Coercion is a reified Protocol, not a Record 2017-12-14 09:16:10 +02:00
Tommi Reiman
b9f032a5ce Cleanup Coercion 2017-12-09 22:49:32 +02:00
Tommi Reiman
b210a98f83 polish Coercion protocol
* compile => compile-model
* mae-open => open-model
2017-12-03 17:29:06 +02:00
Tommi Reiman
becd30386d Works with ClojureScript! 2017-11-27 08:00:27 +02:00
Tommi Reiman
4d772c62e1 Polish implementations 2017-11-26 21:51:21 +02:00
Tommi Reiman
f93a452209 Re-package & re-module 2017-10-29 09:31:28 +02:00