Skip to content

Commit

Permalink
Rkey len (bluesky-social#1066)
Browse files Browse the repository at this point in the history
* set a lex limit on rkey length

* enforce in repo package

* rm checks in repo pkg

* lift constraint on update
  • Loading branch information
dholms authored May 18, 2023
1 parent 37af595 commit cf36b36
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lexicons/com/atproto/repo/applyWrites.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"required": ["action", "collection", "value"],
"properties": {
"collection": {"type": "string", "format": "nsid"},
"rkey": {"type": "string"},
"rkey": {"type": "string", "maxLength": 15},
"value": {"type": "unknown"}
}
},
Expand Down
3 changes: 2 additions & 1 deletion lexicons/com/atproto/repo/createRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"rkey": {
"type": "string",
"description": "The key of the record."
"description": "The key of the record.",
"maxLength": 15
},
"validate": {
"type": "boolean",
Expand Down
3 changes: 2 additions & 1 deletion lexicons/com/atproto/repo/putRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"rkey": {
"type": "string",
"description": "The key of the record."
"description": "The key of the record.",
"maxLength": 15
},
"validate": {
"type": "boolean",
Expand Down
3 changes: 3 additions & 0 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,7 @@ export const schemaDict = {
},
rkey: {
type: 'string',
maxLength: 15,
},
value: {
type: 'unknown',
Expand Down Expand Up @@ -1684,6 +1685,7 @@ export const schemaDict = {
rkey: {
type: 'string',
description: 'The key of the record.',
maxLength: 15,
},
validate: {
type: 'boolean',
Expand Down Expand Up @@ -2005,6 +2007,7 @@ export const schemaDict = {
rkey: {
type: 'string',
description: 'The key of the record.',
maxLength: 15,
},
validate: {
type: 'boolean',
Expand Down
3 changes: 3 additions & 0 deletions packages/pds/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,7 @@ export const schemaDict = {
},
rkey: {
type: 'string',
maxLength: 15,
},
value: {
type: 'unknown',
Expand Down Expand Up @@ -1684,6 +1685,7 @@ export const schemaDict = {
rkey: {
type: 'string',
description: 'The key of the record.',
maxLength: 15,
},
validate: {
type: 'boolean',
Expand Down Expand Up @@ -2005,6 +2007,7 @@ export const schemaDict = {
rkey: {
type: 'string',
description: 'The key of the record.',
maxLength: 15,
},
validate: {
type: 'boolean',
Expand Down

0 comments on commit cf36b36

Please sign in to comment.