lutaml 0.9.25 → 0.9.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lutaml/version.rb +1 -1
- data/lib/lutaml/xmi/liquid_drops/diagram_drop.rb +8 -0
- data/lib/lutaml/xmi/parsers/xml.rb +15 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63135b601a74ae7525807e9b57974a2db686e49f6e6992918e7d209bdbf27460
|
4
|
+
data.tar.gz: 529878c2d79c6f35130ef8c34eb5223d16c46a10f96cf470e43c8563457491a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e70e2318f24f4a6c6beccdd8c6db99f8674ab92b7763a398ffc3b2617b6a44b2ef2b431fa039d5cabe58719d7660c96f2bde96c3dc8ecfc9fd904de7ac025cc9
|
7
|
+
data.tar.gz: 61f20ab2448dfaf836a698b1596ec0685f3d90380bcf2829e08ebda2f7b39dffddb9b0913609ccb682df77a66d2ada3f69e90071556a422a973eda5784942732
|
data/lib/lutaml/version.rb
CHANGED
@@ -154,7 +154,7 @@ module Lutaml
|
|
154
154
|
absolute_path = "#{absolute_path}::#{model.name}"
|
155
155
|
end
|
156
156
|
|
157
|
-
packages.map do |package|
|
157
|
+
packages.map do |package| # rubocop:disable Metrics/BlockLength
|
158
158
|
h = {
|
159
159
|
xmi_id: package.id,
|
160
160
|
name: get_package_name(package),
|
@@ -166,7 +166,10 @@ module Lutaml
|
|
166
166
|
),
|
167
167
|
enums: serialize_model_enums(package),
|
168
168
|
data_types: serialize_model_data_types(package),
|
169
|
-
diagrams: serialize_model_diagrams(
|
169
|
+
diagrams: serialize_model_diagrams(
|
170
|
+
package.id,
|
171
|
+
with_package: with_gen,
|
172
|
+
),
|
170
173
|
packages: serialize_model_packages(
|
171
174
|
package,
|
172
175
|
with_gen: with_gen,
|
@@ -508,17 +511,25 @@ module Lutaml
|
|
508
511
|
# @param node_id [String]
|
509
512
|
# @return [Array<Hash>]
|
510
513
|
# @note xpath %(//diagrams/diagram/model[@package="#{node['xmi:id']}"])
|
511
|
-
def serialize_model_diagrams(node_id)
|
514
|
+
def serialize_model_diagrams(node_id, with_package: false) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
512
515
|
diagrams = @xmi_root_model.extension.diagrams.diagram.select do |d|
|
513
516
|
d.model.package == node_id
|
514
517
|
end
|
515
518
|
|
516
519
|
diagrams.map do |diagram|
|
517
|
-
{
|
520
|
+
h = {
|
518
521
|
xmi_id: diagram.id,
|
519
522
|
name: diagram.properties.name,
|
520
523
|
definition: diagram.properties.documentation,
|
521
524
|
}
|
525
|
+
|
526
|
+
if with_package
|
527
|
+
package_id = diagram.model.package
|
528
|
+
h[:package_id] = package_id
|
529
|
+
h[:package_name] = find_packaged_element_by_id(package_id)&.name
|
530
|
+
end
|
531
|
+
|
532
|
+
h
|
522
533
|
end
|
523
534
|
end
|
524
535
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: expressir
|
@@ -411,7 +411,7 @@ metadata:
|
|
411
411
|
source_code_uri: https://github.com/lutaml/lutaml
|
412
412
|
changelog_uri: https://github.com/lutaml/lutaml/releases
|
413
413
|
rubygems_mfa_required: 'true'
|
414
|
-
post_install_message:
|
414
|
+
post_install_message:
|
415
415
|
rdoc_options: []
|
416
416
|
require_paths:
|
417
417
|
- lib
|
@@ -427,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
427
427
|
version: '0'
|
428
428
|
requirements: []
|
429
429
|
rubygems_version: 3.3.27
|
430
|
-
signing_key:
|
430
|
+
signing_key:
|
431
431
|
specification_version: 4
|
432
432
|
summary: 'LutaML: data models in textual form'
|
433
433
|
test_files: []
|