| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 00:40:01 GMT
X-Served-By: cache-dfw-kdfw8210132-DFW, cache-bom-vanm7210036-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768610401.491591,VS0,VE328
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
yesod-raml: RAML style route definitions for Yesod
yesod-raml: RAML style route definitions for Yesod
Downloads
- yesod-raml-0.2.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.2.0 |
|---|---|
| Change log | ChangeLog.md |
| Dependencies | aeson, base (>=4 && <5), bytestring, containers, data-default, network-uri, regex-posix, template-haskell, text, th-lift, unordered-containers, vector, yaml, yesod-core [details] |
| License | MIT |
| Author | Junji Hashimoto |
| Maintainer | junji.hashimoto@gmail.com |
| Uploaded | by junjihashimoto at 2015-11-06T14:05:30Z |
| Category | Web, Yesod |
| Bug tracker | https://github.com/junjihashimoto/yesod-raml/issues |
| Source repo | head: git clone https://github.com/junjihashimoto/yesod-raml.git |
| Distributions | |
| Reverse Dependencies | 2 direct, 0 indirect [details] |
| Downloads | 3736 total (20 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2015-11-14 [all 2 reports] |
Readme for yesod-raml-0.2.0
[back to package description]Yesod-Raml:
Yesod-Raml makes routes definition from RAML File.
RAML style routes definition is inspired by sbt-play-raml.
Usage
Use parseRamlRoutes or parseRamlRoutesFile in instead of parseRoutes or parseRoutesFile.
Write RAML with handler-tag for Yesod Handler.
handler-tag is not a tag of RAML spec but original one.
You can use description-tag with handler: <<handler-name>> instead of handler-tag.
Bracket variable(PathPiece) like {hogehoge} is capitalized.
The variable becomes #Hogehoge.
because variable(PathPiece) of yesod-routes is data-type like String or Text.
Examples are below.
type Userid = String
mkYesod "App" [parseRamlRoutes|
#%RAML 0.8
title: Hoge API
baseUri: 'https://hoge/api/{version}'
version: v1
protocols: [ HTTPS ]
/user:
/{userid}:
# handler tag is used.
handler: HogeR
get:
description: Get user list
/del:
# handler is written in description-tag
description: |
handler: Hoge2R
post:
description: Delete user
|]
This is the same as following codes.
As you can see, {userid} becomes #Userid.
type Userid = String
mkYesod "App" [parseRoutes|
/api/v1/user/#Userid HogeR GET
/api/v1/user/#Userid/del Hoge2R POST
|]