Skip to content

Commit cc486a2

Browse files
authored
Updated validation for Account.Name (#164)
It cannot contain non-printable characters. the max length in the production database is 142, so the 256 is fine.
1 parent 6ea8c57 commit cc486a2

6 files changed

Lines changed: 21 additions & 22 deletions

File tree

gen/go/qdrant/cloud/account/v1/account.pb.go

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/openapiv2/qdrant/cloud/account/v1/account.swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@
604604
},
605605
"name": {
606606
"type": "string",
607-
"description": "The name of the account.\nName can only contain letters, numbers, underscores, spaces and dashes."
607+
"description": "The name of the account.\nName can only contain printable characters."
608608
},
609609
"externalOwnerId": {
610610
"type": "string",
@@ -685,7 +685,7 @@
685685
},
686686
"name": {
687687
"type": "string",
688-
"description": "The name of the account.\nName can only contain letters, numbers, underscores, spaces and dashes."
688+
"description": "The name of the account.\nName can only contain printable characters."
689689
},
690690
"externalOwnerId": {
691691
"type": "string",

gen/python/qdrant/cloud/account/v1/account_pb2.py

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/typescript/qdrant/cloud/account/v1/account_pb.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ export declare type Account = Message<"qdrant.cloud.account.v1.Account"> & {
688688

689689
/**
690690
* The name of the account.
691-
* Name can only contain letters, numbers, underscores, spaces and dashes.
691+
* Name can only contain printable characters.
692692
*
693693
* @generated from field: string name = 5;
694694
*/

gen/typescript/qdrant/cloud/account/v1/account_pb.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

proto/qdrant/cloud/account/v1/account.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,11 @@ message Account {
435435
expression: "!has(this.created_at) || (has(this.last_modified_at) && this.last_modified_at >= this.created_at)"
436436
};
437437
// The name of the account.
438-
// Name can only contain letters, numbers, underscores, spaces and dashes.
438+
// Name can only contain printable characters.
439439
string name = 5 [(buf.validate.field).string = {
440440
max_len: 256
441441
min_len: 4
442-
pattern: "^[\\w\\s-]+$"
442+
pattern: "^([^\\x00-\\x1F\\x7F])*$"
443443
}];
444444
// The external identifier of the owner of the account.
445445
string external_owner_id = 6 [(buf.validate.field).string = {min_len: 1}];

0 commit comments

Comments
 (0)