Private beta, by invitation. It may change without warning. While the beta lasts, some paid features are free. See pricing

trumlyspec GitHub
Try trumly

Conformance cases /

reserved-definition-kinds

Tests one part of the structure checks.

Our implementation passes this case when its check --json output for the input below equals the expected output.

Input

nodes/a.md
---
id: a
type: svc
plane: p
---
nodes/link-type-needs.md
---
id: link-type-needs
type: link-type
fields:
  name: needs
---
nodes/p.md
---
id: p
type: plane
fields:
  order: 1
---
nodes/pack-x.md
---
id: pack-x
type: pack
fields:
  name: x
  version: '1.0.0'
---
nodes/r.md
---
id: r
type: rule
fields:
  statement: s
  severity: error
  check: {require_fields: [owner]}
---
nodes/type-svc.md
---
id: type-svc
type: type
fields:
  name: svc
---

Expected output

0 ghosts · 0 load errors · 6 nodes · 1 results

expected.json
{
 "ghosts": [],
 "load_errors": [],
 "nodes": [
  {
   "body": "",
   "fields": {},
   "id": "a",
   "links": [],
   "parent": null,
   "plane": "p",
   "title": "a",
   "type": "svc"
  },
  {
   "body": "",
   "fields": {
    "name": "needs"
   },
   "id": "link-type-needs",
   "links": [],
   "parent": null,
   "plane": null,
   "title": "link-type-needs",
   "type": "link-type"
  },
  {
   "body": "",
   "fields": {
    "order": 1
   },
   "id": "p",
   "links": [],
   "parent": null,
   "plane": null,
   "title": "p",
   "type": "plane"
  },
  {
   "body": "",
   "fields": {
    "name": "x",
    "version": "1.0.0"
   },
   "id": "pack-x",
   "links": [],
   "parent": null,
   "plane": null,
   "title": "pack-x",
   "type": "pack"
  },
  {
   "body": "",
   "fields": {
    "check": {
     "require_fields": [
      "owner"
     ]
    },
    "severity": "error",
    "statement": "s"
   },
   "id": "r",
   "links": [],
   "parent": null,
   "plane": null,
   "title": "r",
   "type": "rule"
  },
  {
   "body": "",
   "fields": {
    "name": "svc"
   },
   "id": "type-svc",
   "links": [],
   "parent": null,
   "plane": null,
   "title": "type-svc",
   "type": "type"
  }
 ],
 "results": [
  {
   "node": "a",
   "rule": "r",
   "severity": "error",
   "status": "fail"
  }
 ],
 "structure": {
  "errors": [],
  "warnings": [
   {
    "kind": "namespace_mismatch",
    "node": "pack-x",
    "ref": null
   }
  ]
 }
}