Files
marqdo/ext/web/route.mq.md
T
cflmyandCursor 67bac1bf02 feat(web): Document/Endpoint/Resource artifact rewrite (ADR 0007)
Replace the monolithic compose_*/configure author surface with file-level
web|endpoint artifacts, split ext/{web,data,security,net}, and lock
no-degrade rules so the model cannot regress to God-object APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 11:06:38 +08:00

1.4 KiB


title: ext/web/route description: Declared Endpoint / Document route registration (ADR 0007). import cap:ext/web/_capability.mq.md import table:lib/table.mq.md

route

+ `app`
+ `path`
+ `method`="GET"
+ `page`=None
+ `fn`=""
+ `request`="json"
+ `response`="json"
+ `auth`=""

Declared route handle. Prefer web.route / Artifact type: endpoint discovery via web.serve.

cap.load out =

_type app path method page fn request response auth
route app path method page fn request response auth

out

use

+ `middleware`

Attach middleware table to this route (|header|value| or named capability rows).

cap.load > web_route_use route=self middleware=middleware

register

+ `app`=None

Register this declared route on an app handle.

cap.load a = app

  1. a == None a = app

_ = 1 page = page fn = fn

  1. page path = path > web_app_route app=a path=path page=page
  2. fn path = path method = method request = request response = response > web_app_invoke app=a path=path method=method fn=fn body=request return=response

> table.put in=None at="ok" value=False