Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Published contract schemas are immutable interoperability boundaries. A
catalog-listed starter type contains an inline snapshot of its starting schema
instead of inheriting that boundary. Once installed, the type belongs to the
collection: users can edit its fields and update the explicit contract mapping
without changing the published contract.
without changing the published contract. Packs authored with
`expand_local_refs: true` expand every non-recursive local JSON Schema reference
so nested fields remain directly editable. Recursive references remain explicit
because they cannot be finitely expanded.

The featured `mdbase.runtime.standard` pack supplies the durable runtime 0.2
standard library: ten ordinary record contracts and canonical implementing
Expand Down Expand Up @@ -51,6 +54,13 @@ npm run build
npm run verify
```

When authoring a starter from an existing inline schema, expand its local
references before adding it to a listed pack:

```sh
npm run expand:type -- types/example/1.md types/example/2.md
```

Verification checks the catalog schema, every resource digest, a transactional
dry run, a real install, idempotent reinstallation, and the declared contract
implementations.
Expand Down
225 changes: 225 additions & 0 deletions dist/artifacts/types/jscontact-card/3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
---
kind: mdbase.type
name: jscontact-card
version: 3
description: A fully expanded, editable Markdown-backed JSContact 2.0 core Card
match:
where:
/@type: Card
version: "2.0"
schema:
dialect: json-schema-2020-12
value:
$schema: https://json-schema.org/draft/2020-12/schema
title: JSContact Card 2.0 core profile
description: A local starting shape for an IETF JSContact 2.0 Card.
type: object
required:
- "@type"
- version
properties:
"@type":
const: Card
version:
const: "2.0"
uid:
type: string
minLength: 1
kind:
enum:
- individual
- group
- org
- location
- device
- application
name:
type: object
properties:
"@type":
const: Name
components:
type: array
minItems: 1
contains:
type: object
required:
- kind
properties:
kind:
not:
const: separator
items:
type: object
required:
- kind
- value
properties:
"@type":
const: NameComponent
kind:
enum:
- credential
- generation
- given
- given2
- separator
- surname
- surname2
- title
value:
type: string
additionalProperties: false
full:
type: string
minLength: 1
isOrdered:
type: boolean
defaultSeparator:
type: string
anyOf:
- required:
- components
- required:
- full
additionalProperties: false
emails:
type: object
propertyNames:
type: string
minLength: 1
additionalProperties:
type: object
required:
- address
properties:
"@type":
const: EmailAddress
address:
type: string
format: email
contexts:
type: object
additionalProperties:
const: true
pref:
type: integer
minimum: 1
label:
type: string
additionalProperties: false
phones:
type: object
propertyNames:
type: string
minLength: 1
additionalProperties:
type: object
required:
- number
properties:
"@type":
const: Phone
number:
type: string
minLength: 1
features:
type: object
additionalProperties:
const: true
contexts:
type: object
additionalProperties:
const: true
pref:
type: integer
minimum: 1
label:
type: string
additionalProperties: false
organizations:
type: object
propertyNames:
type: string
minLength: 1
additionalProperties:
type: object
properties:
"@type":
const: Organization
name:
type: string
minLength: 1
units:
type: array
minItems: 1
items:
type: object
required:
- name
properties:
"@type":
const: OrgUnit
name:
type: string
minLength: 1
additionalProperties: false
sortAs:
type: string
contexts:
type: object
additionalProperties:
const: true
anyOf:
- required:
- name
- required:
- units
additionalProperties: false
notes:
type: object
propertyNames:
type: string
minLength: 1
additionalProperties:
type: object
required:
- note
properties:
"@type":
const: Note
note:
type: string
created:
type: string
format: date-time
additionalProperties: false
additionalProperties: false
collection:
display:
name_field: /name/full
implements:
- contract: mdbase.jscontact.card
version: 2.0.0
fields:
/@type: /@type
version: version
uid: uid
kind: kind
name: name
emails: emails
phones: phones
organizations: organizations
notes: notes
---

# JSContact Card

This starter type begins as a fully expanded local copy of the JSContact core
profile. Nested fields are declared inline so the type editor can edit them
directly. Its fields belong to the collection and can be added, renamed, or
reshaped. Update the explicit contract mapping whenever a compatible field
moves.

The separately installed contract schema remains the portable boundary. Local
fields that are not mapped into that boundary remain collection-specific.
8 changes: 4 additions & 4 deletions dist/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@
"packs": [
{
"id": "mdbase.jscontact",
"version": "2.0.1",
"version": "2.0.2",
"name": "JSContact 2.0 starter",
"description": "The mdbase JSContact Card core contract and an editable Markdown implementation.",
"digest": "sha256:c277f278b20acbd0b182d88e2c3c018220c2808aa57f73fa2da1b413383ed21c",
"provision": "./packs/mdbase.jscontact/2.0.1.json",
"description": "The mdbase JSContact Card core contract and a fully expanded, editable Markdown implementation.",
"digest": "sha256:f6f5aa76850c10b83d42c0fffb7f76d3a67b531fb1de7bb5ae9a9b2c783687b0",
"provision": "./packs/mdbase.jscontact/2.0.2.json",
"provides": [
{
"id": "mdbase.jscontact.card",
Expand Down
Loading