lutaml-lml 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/lutaml/lml.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "lutaml/model"
4
4
 
5
+ # Root namespace for the LutaML libraries.
5
6
  module Lutaml
6
7
  class Error < StandardError; end
7
8
 
@@ -11,6 +12,10 @@ module Lutaml
11
12
  autoload :Formatter, "lutaml/lml/formatter"
12
13
  autoload :Layout, "lutaml/lml/layout"
13
14
 
15
+ # LML — the LutaML Model Language: parses the text DSL into domain
16
+ # documents, compiles model definitions into Serializable classes,
17
+ # and renders diagrams. See the entry-point contract under .parse /
18
+ # .parse_document below.
14
19
  module Lml
15
20
  class Error < Lutaml::Error; end
16
21
  class ParsingError < Error; end
@@ -20,15 +25,25 @@ module Lutaml
20
25
  ModelCompiler.new(namespace: namespace).compile(input)
21
26
  end
22
27
 
23
- # Full entry point: parse, then resolve view imports and enrich
24
- # association labels.
28
+ # Entry-point contract:
29
+ #
30
+ # parse — Pipeline (preprocess, parse, transform, build)
31
+ # followed by ViewResolution: view-import
32
+ # expansion, show/hide filtering, and
33
+ # association-label enrichment. Use for
34
+ # documents consumed as diagrams or views.
35
+ # parse_document — Pipeline only; the document keeps raw
36
+ # collections and unresolved imports. Use for
37
+ # machine processing (ModelCompiler, Validator)
38
+ # where view semantics do not apply.
39
+ #
40
+ # Both return a Lutaml::Lml::Document.
25
41
  def self.parse(input)
26
42
  source = Source.wrap(input)
27
43
  document = Pipeline.call(source)
28
44
  ViewResolution.call(document, source.base_dir)
29
45
  end
30
46
 
31
- # Parse only — no import resolution, no label enrichment.
32
47
  def self.parse_document(input)
33
48
  Pipeline.call(input)
34
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-lml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-08 00:00:00.000000000 Z
11
+ date: 2026-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -108,6 +108,8 @@ files:
108
108
  - lib/lutaml/lml/formatter/graphviz/html_builder.rb
109
109
  - lib/lutaml/lml/formatter/graphviz/node_formatter.rb
110
110
  - lib/lutaml/lml/formatter/graphviz/relationship_formatter.rb
111
+ - lib/lutaml/lml/formatter/svg_pdf.rb
112
+ - lib/lutaml/lml/formatter/svg_pdf/path_parser.rb
111
113
  - lib/lutaml/lml/grammar.rb
112
114
  - lib/lutaml/lml/grammar/lml.artifact.json
113
115
  - lib/lutaml/lml/grammar/lml.parg
@@ -122,6 +124,11 @@ files:
122
124
  - lib/lutaml/lml/layout/graph_viz_engine.rb
123
125
  - lib/lutaml/lml/literal_value.rb
124
126
  - lib/lutaml/lml/model_compiler.rb
127
+ - lib/lutaml/lml/model_compiler/enums.rb
128
+ - lib/lutaml/lml/model_compiler/hydration.rb
129
+ - lib/lutaml/lml/model_compiler/serialization_mappings.rb
130
+ - lib/lutaml/lml/model_compiler/string_formats.rb
131
+ - lib/lutaml/lml/model_compiler/validation.rb
125
132
  - lib/lutaml/lml/models/action.rb
126
133
  - lib/lutaml/lml/models/association.rb
127
134
  - lib/lutaml/lml/models/cardinality.rb