Example

Remote Dependencies

Reusable imported type libraries.

Import reusable type libraries through a dependency alias.

What it shows

  • $dependencies declares an alias named core.
  • $imports loads core:money and core:datetime.
  • The local Payment fields use the imported Money and Date types.

Use aliases when common semantic types live outside the local spec.

Specs

spec.yml
$dependencies:
  core: 'https://raw.githubusercontent.com/texomy/patterns/main/core/v1/'

$imports: [ 'core:money', 'core:datetime' ]

Payment:
  $fields:
    money: Money
    date: Date
  $patterns: '#{money} due on #{date}'
Try it liveOpen Remote Dependencies in StudioTweak the spec, paste your own input, and see the parse tree update in real time.

Or browse other examples →