Skip to content

Support default values for AttributeDefinition. - #312

Merged
kqarryzada merged 2 commits into
masterfrom
DS-51800-AttrDef-deserializing
Aug 17, 2026
Merged

kqarryzada merged 2 commits into
masterfrom
DS-51800-AttrDef-deserializing

Conversation

@kqarryzada

Copy link
Copy Markdown
Collaborator

AttributeDefinitions previously contained several required fields. However, RFC 7643 Section 2.2 details default values for most fields defined on an AttributeDefinition. To prevent errors from being thrown when such fields are missing from a JSON, the class has been updated to support these default values.

This commit includes updated documentation, as well as an update to the toString() method. Previously, toString() manually printed each field value instead of printing the serialized JSON output of the object.

Reviewer: dougbulkley
Reviewer: vyhhuang

JiraIssue: DS-51800

Resolves #309

AttributeDefinitions previously contained several required fields.
However, RFC 7643 Section 2.2 details default values for most fields
defined on an AttributeDefinition. To prevent errors from being thrown
when such fields are missing from a JSON, the class has been updated to
support these default values.

This commit includes updated documentation, as well as an update to the
toString() method. Previously, toString() manually printed each field
value instead of printing the serialized JSON output of the object.

Reviewer: dougbulkley
Reviewer: vyhhuang

JiraIssue: DS-51800
@kqarryzada kqarryzada self-assigned this Aug 14, 2026

@vyhhuang vyhhuang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

Comment thread CHANGELOG.md Outdated
did not include the values of `id` and `meta`.

Updated `AttributeDefinition.java` to use default values for missing definitions as dictated by
RFC 7643 Section 2.2. For example, if `uniqueness` is missing from a JSON, the AttributeDefinition

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“missing from a JSON,” doesn’t make grammatical sense.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Doug, I've updated this.

@kqarryzada
kqarryzada merged commit 6234113 into master Aug 17, 2026
6 checks passed
@kqarryzada
kqarryzada deleted the DS-51800-AttrDef-deserializing branch August 17, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeDefinition.returned is required by the JSON deserializer despite RFC 7643 defining it as optional

3 participants