Skip to content

Commit

Permalink
Update templates to show cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
kwkwan committed Oct 18, 2024
1 parent 152b504 commit c9a3309
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ gem "isodoc", git: "https://github.com/metanorma/isodoc"

gem "metanorma-plugin-lutaml", git: "https://github.com/metanorma/metanorma-plugin-lutaml"
gem "metanorma-standoc", git: "https://github.com/metanorma/metanorma-standoc"
gem "lutaml", git: "https://github.com/lutaml/lutaml", branch: "sorting-order-inheritance-alphabet"
gem "lutaml", git: "https://github.com/lutaml/lutaml"

# for local development
# gem "metanorma-plugin-lutaml", path: "~/src/metanorma/metanorma-plugin-lutaml"
Expand Down
10 changes: 5 additions & 5 deletions sources/liquid_templates/_klass_table.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
2+| {{ root.definition | html2adoc }}

h| 上位の型 2+| {{ upper_klass_name }}
h| ステレオタイプ 2+| << {{ stereotype }} >>
h| ステレオタイプ 2+| {{ stereotype }}

{% if root.inherited_props.size > 0 %}
3+h| 継承する属性
Expand All @@ -30,7 +30,7 @@ h| 属性名 h| 属性の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand All @@ -46,7 +46,7 @@ h| 属性名 h| 属性の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand All @@ -62,7 +62,7 @@ h| 関連役割名 h| 関連役割の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand All @@ -78,7 +78,7 @@ h| 関連役割名 h| 関連役割の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions sources/liquid_templates/_packages_class.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ h| 属性名 h| 属性の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand All @@ -53,7 +53,7 @@ h| 属性名 h| 属性の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand All @@ -69,7 +69,7 @@ h| 関連役割名 h| 関連役割の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand All @@ -85,7 +85,7 @@ h| 関連役割名 h| 関連役割の型及び多重度 h| 定義
({{ attr.gen_name }})
{%- endcapture -%}
| {{ name_col | newline_to_br }}
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality }}]
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
{%- endif -%}
{% endfor %}
Expand Down

0 comments on commit c9a3309

Please sign in to comment.