ontoref/reflection/schemas/api-catalog.ncl
Jesús Pérez 75892a8eea
Some checks failed
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
feat: browser-style panel nav, repo file routing, migration 0007
graph, search, api_catalog pages: back/forward history stack (PanelNav/dpNav).
  File artifact paths open in external tabs via card.repo (Gitea source URL) or
  card.docs (cargo docs for .rs) — openFile/openFileInPanel removed from all pages.
  Tera | safe required for URL values inside <script> blocks (auto-escape of slashes).

  card.ncl: repo field added.
  insert_brand_ctx: injects card_repo/card_docs into Tera context.
  #[onto_api] proc-macro: source_file = file!() emitted; ApiRouteEntry.source_file
  populated in primary catalog handler.

  migration 0007-card-repo-field: check card.ncl for repo field; skip if absent.
2026-03-29 08:32:50 +01:00

37 lines
980 B
Plaintext

let method_type = [| 'GET, 'POST, 'PUT, 'DELETE, 'PATCH |] in
let auth_type = [| 'None, 'Viewer, 'Bearer, 'Admin |] in
let actor_type = [| 'Developer, 'Agent, 'Ci, 'Admin |] in
let param_type = {
name | String,
kind | String,
constraint | String | default = "optional",
description | String | default = "",
} in
let route_type = {
method | method_type,
path | String,
description | String | default = "",
auth | auth_type | default = 'None,
actors | Array actor_type | default = [],
params | Array param_type | default = [],
tags | Array String | default = [],
feature | String | default = "",
source_file | String | default = "",
} in
let catalog_type = {
crate | String,
routes | Array route_type,
} in
{
Method = method_type,
Auth = auth_type,
Actor = actor_type,
Param = param_type,
Route = route_type,
Catalog = catalog_type,
}