-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixes #821: apply max-object-properties/max-doc-properties only on indexed Objects #844
Conversation
…dexable Objects
…perties than indexed ones
| `stargate.jsonapi.document.limits.max-object-properties` | `int` | `1000` | The maximum number of properties any single indexable object in a document can contain. | | ||
| `stargate.jsonapi.document.limits.max-document-properties` | `int` | `2000` | The maximum total number of properties all objects in a document can contain. | | ||
| `stargate.jsonapi.document.limits.max-number-length` | `int` | `100` | The maximum length (in characters) of a single number value in a document. | | ||
| `stargate.jsonapi.document.limits.max-string-length-in-bytes` | `int` | `8000` | The maximum length (in bytes) of a single indexable string value in a document. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding missing "indexable": was already changed to only validate indexable Strings.
@@ -282,11 +282,6 @@ private void validateObjectValue( | |||
validateDocDepth(limits, depth); | |||
|
|||
final int propCount = objectValue.size(); | |||
if (propCount > limits.maxObjectProperties()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from "full doc" validation to later "indexable only doc" validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @maheshrajamani ! |
What this PR does:
Changes validation of Document limits so that maximum Object property limits only consider indexed fields.
Which issue(s) this PR fixes:
Fixes #821
Checklist