generated from coulomb/repo-seed
Add validation indexes and generated views
This commit is contained in:
@@ -14,7 +14,9 @@ from .service import (
|
||||
list_artifacts,
|
||||
list_models,
|
||||
list_standards,
|
||||
list_views,
|
||||
profile_inspect,
|
||||
read_view,
|
||||
validate_canon,
|
||||
)
|
||||
|
||||
@@ -86,6 +88,11 @@ def _route(
|
||||
if path == "/graph":
|
||||
graph_format = _first(query, "format") or "json"
|
||||
return HTTPStatus.OK, artifact_graph(root, output_format=graph_format)
|
||||
if path == "/views":
|
||||
return HTTPStatus.OK, list_views(root)
|
||||
if path.startswith("/views/"):
|
||||
name = path.removeprefix("/views/").strip("/")
|
||||
return HTTPStatus.OK, read_view(name, root)
|
||||
if path.startswith("/profiles/") and path.endswith("/inspect"):
|
||||
profile = path.removeprefix("/profiles/").removesuffix("/inspect").strip("/")
|
||||
return HTTPStatus.OK, profile_inspect(profile, root)
|
||||
|
||||
Reference in New Issue
Block a user