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

Fix #521: allow hyphen in names, prevent empty String #522

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

tatu-at-datastax
Copy link
Contributor

What this PR does:

Improves property name validation wrt #521 so that:

  • Allow hyphen (-) in names and name segments
  • Empty names no longer allowed (shouldn't have been, oversight)

Which issue(s) this PR fixes:
Fixes #521

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@tatu-at-datastax tatu-at-datastax requested a review from a team as a code owner September 5, 2023 23:46
@tatu-at-datastax tatu-at-datastax self-assigned this Sep 5, 2023
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@tatu-at-datastax
Copy link
Contributor Author

@maheshrajamani Could you also review this when you get a chance?

Copy link
Contributor

@maheshrajamani maheshrajamani left a comment

Choose a reason for hiding this comment

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

@tatu-at-datastax Can you add insert and find (filter) IT for this case?

@tatu-at-datastax
Copy link
Contributor Author

@tatu-at-datastax Can you add insert and find (filter) IT for this case?

Yes that sounds reasonable.

@@ -67,22 +67,47 @@ public void insertDocument() {
.body("status.insertedIds[0]", is("doc3"))
.body("data", is(nullValue()))
.body("errors", is(nullValue()));
given()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Existing not change, just inlined JSON payloads for bit more compact code.

@tatu-at-datastax
Copy link
Contributor Author

@maheshrajamani Added insert and find test cases, will merge once CI passes.

@tatu-at-datastax tatu-at-datastax merged commit 7898369 into main Sep 11, 2023
3 checks passed
@tatu-at-datastax tatu-at-datastax deleted the tatu/521-allow-hyphen-in-names branch September 11, 2023 18:52
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.

JSON API should allow hyphens (-) in document property names (but should not allow empty String)
3 participants