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

Improve documentation of Value-Only #401

Open
BirgitBoss opened this issue Apr 11, 2024 · 3 comments
Open

Improve documentation of Value-Only #401

BirgitBoss opened this issue Apr 11, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@BirgitBoss
Copy link
Collaborator

BirgitBoss commented Apr 11, 2024

Is your feature request related to a problem? Please describe.

The existing rules are hard to understand. Many readers requested a more easy to understand documentation of the Value-Only serialialiation.

Additionally, Examples shall be updated to not come from Submodel but provide Value-only for every element since the API (IDTA-01002) allows $value calls not only for submodels.

see also
admin-shell-io/aas-specs-api#270
admin-shell-io/aas-specs-api#269
admin-shell-io/aas-specs-api#268

@BirgitBoss BirgitBoss added this to the V3.1 milestone Apr 11, 2024
BirgitBoss added a commit that referenced this issue Apr 11, 2024
- substitutes Value-Only examples
- bugfix annotations: in Schema and examples
- bugfix deprecated links OMP==>ESMF
BirgitBoss added a commit that referenced this issue Apr 11, 2024
add table similar to metadata which attributes shall be displayed
BirgitBoss added a commit that referenced this issue Apr 11, 2024
BirgitBoss added a commit that referenced this issue Apr 11, 2024
change example from Families to ProductionClassifciation from SMT Technical Data
@BirgitBoss BirgitBoss added the documentation Improvements or additions to documentation label Apr 12, 2024
@BirgitBoss
Copy link
Collaborator Author

BirgitBoss commented Apr 12, 2024

@mjacoby listed the remaining remaining problems in
#403 (review). Added: links to other issues if existing + additional open item.

  • (1) 2^53-1 is again missing the 5
  • (2) JSON schema again contains validation for Operations which are defined not to have a valueOnly serialization
  • (3) Do not change Value-Only type for Range: stay with number #407 Range is again limited to number
  • (4) There are no rules defined how to serialize elements other than Submodel, i.e. serialization of all other types is only given by a single example. This means serialization is seriously underdefined and unclear.
  • (5) The section about limitation of numbers in JSON to 2^53-1 is still lacking any substantial reasoning. There is no such limitation in JSON itself, only in the implementations in different programming languages - and they might even be different to each other. So why this limitation?
  • (6) Handling of non-existent values is not addressed at all, i.e. what is the valueOnly Serialization of a property that has no value? What about SubmodelElementCollection without elements or Submodel without any elements?
  • (7) Missing serialization rules for auxiliary classes (i.e. classes that are not subclass of SubmodelElement but still part of the serialization) like Reference
  • (8) Rules for serialization in section Rules for Value-Only Serialization are inconsistent/overlapping, e.g.,
    The definition of SubmodelElementCollection says

SubmodelElementCollection is serialized as named JSON object with ${SubmodelElementCollection/idShort} as the name of the containing JSON property. The elements contained within the struct are serialized according to their respective type with ${SubmodelElement/idShort} as the name of the containing JSON property.

while the definition of Property says

Property is serialized as ${Property/idShort}: ${Property/value} where ${Property/value} is the JSON serialization of the respective property’s value in accordance with the data type to value mapping (see table after this section).

If you apply these rules recursively like required by another rule, you end up with something containing the idShort of the property twice.

  • (9) Check cardinalities in rules and Value-Only schema

    • "annoations" in AnnotatedRelationshipElements are not required
    • Blob/value is not required
    • EntityValue: statements are not required, entityType is not required any longer
  • (10) ValueOnly: do not mention types omitted  #371 ValueOnly: do not mention types omitted

@BirgitBoss
Copy link
Collaborator Author

BirgitBoss commented Apr 12, 2024

For (3) I created a new issue: #407 since I am not convinced to allow "all types" makes any sense for Range.

@mjacoby If you want to request to remove the section about limitation of numbers in JSON, topic (5) please raise an additional issue for this.

BirgitBoss added a commit that referenced this issue Apr 12, 2024
Rules for Value-Only for non-Submodel elements
@BirgitBoss
Copy link
Collaborator Author

BirgitBoss commented Apr 12, 2024

#403 covers (1) and (2) + adding examples and a table similar to metadata fields table

#408 covers (4), (8) and (9)

(5) ist still open, see #401 (comment)

The other topics are still open.

BirgitBoss added a commit that referenced this issue Apr 18, 2024
* contributes to #401:
- substitutes Value-Only examples
- bugfix annotations: in Schema and examples
- bugfix deprecated links OMP==>ESMF

* contributes to #401
add table similar to metadata which attributes shall be displayed

* #401 add Submodel Example

* #401 add chapter for Value-Only example of a complete Submodel
change example from Families to ProductionClassifciation from SMT Technical Data

* #403 (review) (1) 2^53-1 is again missing the 5

* Remove OperationResultValueOnly OperationResultValueOnly from schema
#403 (review) (2)

* Update ChangeLog accordingly
BirgitBoss added a commit that referenced this issue May 5, 2024
* #401 #401 (comment) Topic (4)
Rules for Value-Only for non-Submodel elements

* some more improvements for serialization rules +
update schema (optional elements are not required)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant