{ "$schema" : "http://json-schema.org/draft-07/schema#", "$id" : "https://mateu.io/uidl/routes-schema.json", "version" : "3.0", "title" : "Mateu route registry", "description" : "JSON Schema for a mount's route file — a pure routing table binding each URL to a definition, a view model and its parameters. Routes are relative to the mount. GENERATED from RouteEntry by UidlSchemaGenerator — do not edit by hand.", "oneOf" : [ { "type" : "object", "properties" : { "type" : { "const" : "Routes" }, "basePath" : { "type" : "string", "description" : "The mount this file's routes belong to, for a route file that is not listed by a `type: UI` mount (a class-declared @UI(\"/shop\") mount): its routes are authored relative to it. Optional; default the root mount." }, "routes" : { "type" : "array", "items" : { "$ref" : "#/$defs/RouteEntry" } } }, "required" : [ "routes" ] }, { "type" : "array", "items" : { "$ref" : "#/$defs/RouteEntry" } } ], "$defs" : { "Access" : { "type" : "object", "properties" : { "roles" : { "type" : "array", "items" : { "type" : "string" } }, "groups" : { "type" : "array", "items" : { "type" : "string" } }, "scopes" : { "type" : "array", "items" : { "type" : "string" } }, "permissions" : { "type" : "array", "items" : { "type" : "string" } } } }, "RestDataSource" : { "type" : "object", "properties" : { "ref" : { "type" : "string" }, "url" : { "type" : "string" }, "method" : { "type" : "string" }, "headers" : { "type" : "object" }, "body" : { "type" : "string" }, "itemsPath" : { "type" : "string" }, "valuePath" : { "type" : "string" }, "labelPath" : { "type" : "string" }, "proxy" : { "type" : "boolean" }, "sample" : { } } }, "RouteEntry" : { "type" : "object", "properties" : { "route" : { "type" : "string" }, "definition" : { "type" : "string", "deprecated" : true, "description" : "Deprecated alias of `layout` — kept so existing routes.yaml files keep working. Prefer `layout`; if both are present, `layout` wins." }, "viewModel" : { "type" : "string" }, "fixedParams" : { "type" : "object" }, "defaultParams" : { "type" : "object" }, "parent" : { "type" : "string" }, "children" : { "type" : "array", "items" : { "$ref" : "#/$defs/RouteEntry" } }, "state" : { "type" : "object" }, "appState" : { "type" : "object" }, "data" : { "anyOf" : [ { "type" : "string", "description" : "The name of a sources.yaml entry." }, { "$ref" : "#/$defs/RestDataSource" } ] }, "appData" : { "anyOf" : [ { "type" : "string", "description" : "The name of a sources.yaml entry." }, { "$ref" : "#/$defs/RestDataSource" } ] }, "defaultChild" : { "type" : "string" }, "show" : { "type" : "string" }, "access" : { "$ref" : "#/$defs/Access" }, "layout" : { "type" : "string", "description" : "The UI definition (layout) this route renders — the canonical vocabulary of coherence-plan #5. May be omitted when the view model supplies its own tree. A definition shared by several routes lives in its own file and is named here." } } } } }