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

Add invalid Payload Generation Example #286

Merged
merged 5 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/pages/characteristics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ At least one of `samm-c:maxValue` or `samm-c:minValue` must be present in a Leng
|===

IMPORTANT: When using the `samm-c:minValue` parameter in Length Constraint, it is crucial to consider the following:
* Creating a Model with a <<set-characteristic>>/<<sorted-set-characteristic>> based on a finite Base Characteristic (<<boolean-characteristic>> or <<enumeration-characteristic>>)
Creating a Model with a <<set-characteristic>>/<<sorted-set-characteristic>> based on a finite Base Characteristic (<<boolean-characteristic>> or <<enumeration-characteristic>>)
and adding Length Constraint, the `samm-c:minValue` must not exceed the total number of elements in the Base Characteristic.
Models with such conditions are not recognized as invalid, but no valid payloads can exist for them.

Expand Down
3 changes: 3 additions & 0 deletions documentation/modules/ROOT/pages/payloads.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ or it can contain `right` key of `Error` with simple error text:
}
----

IMPORTANT: If the model is invalid, it might be impossible to build a JSON payload that corresponds to the model.
For example, if a Set of `xsd:boolean` values has a xref:characteristics.adoc#length-constraint[Length Constraint] of `samm-c:minValue` 3, no valid payload can be constructed.

[[limitations]]
== Limitations

Expand Down
Loading