Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain preferredName and description better #304

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions documentation/modules/appendix/pages/best-practices.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ should be considered when naming elements such as Aspects, Properties or Entitie
`urn:samm:{example-ns}.myapplication:1.0.0#count`, so the context is already part of
`count`​'s identifier.

* The attributes `preferredName` and `description` are meant to provide a
human-readable name and
description, respectively, for example for the generation of documentation from the Aspect Model.
If you copy and paste the element's name to the `preferredName`, make sure to adjust it:
** Make the name upper case
** If the name consists of more than one word (i.e., camelCase), turn it into two words, e.g. the name
`machineTemperature` should become the preferredName `Machine Temperature`.
* The optional attributes `preferredName` and `description` provide a human-readable name and description, respectively (which will be used by the SDKs for generated documentation, OpenAPI generation, JavaScript code etc). Providing a meaningful `preferredName` and `description` helps users and developers to get more value from the Aspect. Make sure to
** Make the `preferredName` upper case (since it is often used in titles)
** Separate multiple words by space (unlike the name attribute which is a single word)

* If there is exactly one Property in an Aspect that has a
xref:ROOT:characteristics.adoc#collection-characteristic[Collection],
Expand Down
Loading