Skip to content

Commit ffaa3a7

Browse files
committed
Added "displayName" property support for <frame> layers.
1 parent 8959937 commit ffaa3a7

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

appendix/layers.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Refer to <<frames-common, Common Properties of Layers>> chapter for detailed des
88
|Property Name|Allowed Type / Value|DSL Version|Required|Default Value ^.^|Description
99

1010
|**description**|string|1|no||Human readable description of the layer.
11+
|**displayName**|string|7|no||Human readable name of the layer. May be used in the documentation.
1112
|**field**|<<fields-fields, field>> or <<intro-references, reference>> to it|1|yes (except for <<frames-payload, &lt;payload&gt; >>)||Wrapped field definition.
1213
|**name**|<<intro-names, name>> string|1|yes||Name of the layer.
1314
|===

frames/common.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Every layer is different, and defines its own properties and/or other aspects.
44
However, there are common properties, that are applicable to every layer.
55
They are summarized below.
66

7+
[[frames-layer-name]]
78
==== Name ====
89
Every layer must define it's <<intro-names, name>>, which is expected to be
910
used by a code generator when defining a relevant class. The name is defined
@@ -19,6 +20,7 @@ using **name** <<intro-properties, property>>.
1920
</schema>
2021
----
2122

23+
[[frames-layer-description]]
2224
==== Description ====
2325
It is possible to provide a description of the layer about what it is and
2426
how it is expected to be used. This description is only for documentation
@@ -41,6 +43,24 @@ generated class. The <<intro-properties, property>> is **description**.
4143
</schema>
4244
----
4345

46+
[[frames-layer-display-name]]
47+
==== Display Name ====
48+
When documenting a layer the value of **displayName** property can be used as more descriptive
49+
human readable name.
50+
[source,xml]
51+
----
52+
<?xml version="1.0" encoding="UTF-8"?>
53+
<schema >
54+
<frame name="ProtocolFrame">
55+
<id name="Id" displayName="Message ID">
56+
...
57+
</id>
58+
<payload name="Data" />
59+
</frame>
60+
</schema>
61+
----
62+
In case **displayName** is empty, the **name** <<intro-properties, property>> is expected be used instead.
63+
4464
==== Inner Field ====
4565
Every layer, except for <<frames-payload, &lt;payload&gt; >>, needs to specify
4666
its inner <<fields-fields, field>> it wraps. The field can be specified

frames/frames.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ human readable name.
6161
<schema >
6262
<frame name="Frame" displayName="Protocol Frame">
6363
...
64-
</ns>
64+
</frame>
6565
</schema>
6666
----
6767
In case **displayName** is empty, the **name** <<intro-properties, property>> is expected be used instead.

0 commit comments

Comments
 (0)