Merge remote-tracking branch 'origin/master' into feature/update-static-handler-docs

This commit is contained in:
Miikka Koskinen 2021-04-09 14:49:56 +03:00
commit d0e83fed41
7 changed files with 20 additions and 13 deletions

View file

@ -17,7 +17,7 @@ We use [Break Versioning][breakver]. The version numbers follow a `<major>.<mino
* updated deps:
```clj
[metosin/malli "0.3.0_SNAPSHOT"] is available but we use "0.2.1"
[metosin/malli "0.3.0"] is available but we use "0.2.1"
[metosin/schema-tools "0.12.3"] is available but we use "0.12.2"
[ring/ring-core "1.9.1"] is available but we use "1.9.0"
[metosin/schema-tools "0.12.3"] is available but we use "0.12.2"

View file

@ -132,7 +132,7 @@ Routes are just data, so it's easy to create them programmatically:
### Explicit path-parameter syntax
Router options `:syntax` allows the path-parameter syntax to be explicitely defined. It takes a keyword or set of keywords as a value. Valid values are `:colon` and `:bracket`. Default value is `#{:colon :bracket}`.
Router options `:syntax` allows the path-parameter syntax to be explicitly defined. It takes a keyword or set of keywords as a value. Valid values are `:colon` and `:bracket`. Default value is `#{:colon :bracket}`.
With defaults:

View file

@ -85,9 +85,10 @@ As routes are defined as plain data, it's easy to merge multiple route trees int
["/ping" ::ping]
["/db" ::db]])
(r/router
[admin-routes
user-routes])
(def router
(r/router
[admin-routes
user-routes]))
```
Merged route tree:
@ -109,6 +110,6 @@ When router is created, the following steps are done:
* route arguments are expanded (via `:expand` option)
* routes are coerced (via `:coerce` options)
* route tree is compiled (via `:compile` options)
* [route conflicts](advanced/route_conflicts.md) are resolved (via `:conflicts` options)
* [route conflicts](route_conflicts.md) are resolved (via `:conflicts` options)
* optionally, route data is validated (via `:validate` options)
* [router implementation](../advanced/different_routers.md) is automatically selected (or forced via `:router` options) and created

View file

@ -49,11 +49,13 @@ Failing coercion:
Using `create` with options to create the coercion instead of `coercion`:
```clj
(require '[malli.util :as mu])
(reitit.coercion.malli/create
{:transformers {:body {:default default-transformer-provider
:formats {"application/json" json-transformer-provider}}
:string {:default string-transformer-provider}
:response {:default default-transformer-provider}}
{:transformers {:body {:default reitit.coercion.malli/default-transformer-provider
:formats {"application/json" reitit.coercion.malli/json-transformer-provider}}
:string {:default reitit.coercion.malli/string-transformer-provider}
:response {:default reitit.coercion.malli/default-transformer-provider}}
;; set of keys to include in error messages
:error-keys #{:type :coercion :in :schema :value :errors :humanized #_:transformed}
;; schema identity function (default: close all map schemas)

View file

@ -18,13 +18,17 @@
The documentation lives under `doc` and it is hosted on [cljdoc](https://cljdoc.org). See their
documentation for [library authors](https://github.com/cljdoc/cljdoc/blob/master/doc/userguide/for-library-authors.adoc)
## To bump up version:
## Making a release
We use [Break Versioning][breakver]. Remember our promise: patch-level bumps never include breaking changes!
[breakver]: https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md
```bash
# Check that you're using Java 8! Making the release with a newer Java version
# means that it is broken when used with Java 8.
java -version
# new version
./scripts/set-version "1.0.0"
./scripts/lein-modules install

View file

@ -12,7 +12,7 @@
| :root | optional resource root, defaults to `\"swagger-ui\"`
| :url | path to swagger endpoint, defaults to `/swagger.json`
| :path | optional path to mount the handler to. Works only if mounted outside of a router.
| :config | parameters passed to swaggger-ui as-is.
| :config | parameters passed to swagger-ui as-is.
See https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md
for all available :config options.

View file

@ -33,7 +33,7 @@
[metosin/muuntaja "0.6.8"]
[metosin/jsonista "0.3.1"]
[metosin/sieppari "0.0.0-alpha13"]
[metosin/malli "0.3.0-SNAPSHOT"]
[metosin/malli "0.3.0"]
;; https://clojureverse.org/t/depending-on-the-right-versions-of-jackson-libraries/5111
[com.fasterxml.jackson.core/jackson-core "2.12.1"]