From 21a967145f414760e2596e96e179f55b13673924 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Wed, 11 Sep 2024 11:24:09 +0300 Subject: [PATCH] doc: link to name_based_routing.md from route_data.md --- doc/basics/route_data.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/basics/route_data.md b/doc/basics/route_data.md index c5df80ddf..701c9ec0c 100644 --- a/doc/basics/route_data.md +++ b/doc/basics/route_data.md @@ -9,9 +9,10 @@ Route data is the key feature of reitit. Routes can have any map-like data attac :handler identity}}]] ``` -Besides map-like data, raw routes can have any non-sequential route argument after the path. This argument is expanded by `Router` (via `:expand` option) into route data at router creation time. +Besides map-like data, raw routes can have any non-sequential route argument after the path. This argument is expanded by `Router` (via `:expand` option) into route data at router creation time. -By default, Keywords are expanded into `:name` and functions into `:handler` keys. +By default, Keywords are expanded into `:name` (see [Name-based Routing](./name_based_routing.md)) +and functions into `:handler` keys. ```clj (require '[reitit.core :as r]) @@ -117,7 +118,7 @@ Accumulated route data: ["/api-docs" ::api-docs]] ["/api/ping" ::ping] ["/api/pong" ::pong]])) - + (r/routes router) ; [["/swagger.json" {:no-doc true, :name ::swagger}] ; ["/api-docs" {:no-doc true, :name ::api-docs}]