lexicons: more string limits (#1994)
* limit external embed strings sizes * set a (very large) alt text length limit The motivation is to have *some* size limit on every string in post records, to maximize interoperation. For example, we currently have a CBOR library rejecting some records because of too-long strings. We don't want to limit the ability of folks to be very descriptive in alt text, specifically, so chose what seems to be a very large limit. If this is not large enough, based on feedback, we can bump it even higher. As context this is the largest string length limit in all of our lexicons. * make thumbnail URL fields format=uri This mostly results in checks against the string being empty, or unlimited size. * codegen: string limits * add changeset for string format lex updates
This commit is contained in:
parent
28609519a8
commit
ad0d976188
.changeset
lexicons/app/bsky/embed
packages
5
.changeset/odd-kids-warn.md
Normal file
5
.changeset/odd-kids-warn.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'@atproto/api': patch
|
||||
---
|
||||
|
||||
additional app.bsky.feed.post Lexicon string format limits
|
@ -18,8 +18,16 @@
|
||||
"required": ["uri", "title", "description"],
|
||||
"properties": {
|
||||
"uri": { "type": "string", "format": "uri" },
|
||||
"title": { "type": "string" },
|
||||
"description": { "type": "string" },
|
||||
"title": {
|
||||
"type": "string",
|
||||
"maxGraphemes": 300,
|
||||
"maxLength": 3000
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxGraphemes": 1000,
|
||||
"maxLength": 10000
|
||||
},
|
||||
"thumb": {
|
||||
"type": "blob",
|
||||
"accept": ["image/*"],
|
||||
@ -42,9 +50,17 @@
|
||||
"required": ["uri", "title", "description"],
|
||||
"properties": {
|
||||
"uri": { "type": "string", "format": "uri" },
|
||||
"title": { "type": "string" },
|
||||
"description": { "type": "string" },
|
||||
"thumb": { "type": "string" }
|
||||
"title": {
|
||||
"type": "string",
|
||||
"maxGraphemes": 300,
|
||||
"maxLength": 3000
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxGraphemes": 1000,
|
||||
"maxLength": 10000
|
||||
},
|
||||
"thumb": { "type": "string", "format": "uri" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,11 @@
|
||||
"accept": ["image/*"],
|
||||
"maxSize": 1000000
|
||||
},
|
||||
"alt": { "type": "string" },
|
||||
"alt": {
|
||||
"type": "string",
|
||||
"maxGraphemes": 5000,
|
||||
"maxLength": 50000
|
||||
},
|
||||
"aspectRatio": { "type": "ref", "ref": "#aspectRatio" }
|
||||
}
|
||||
},
|
||||
@ -51,9 +55,13 @@
|
||||
"type": "object",
|
||||
"required": ["thumb", "fullsize", "alt"],
|
||||
"properties": {
|
||||
"thumb": { "type": "string" },
|
||||
"fullsize": { "type": "string" },
|
||||
"alt": { "type": "string" },
|
||||
"thumb": { "type": "string", "format": "uri" },
|
||||
"fullsize": { "type": "string", "format": "uri" },
|
||||
"alt": {
|
||||
"type": "string",
|
||||
"maxGraphemes": 5000,
|
||||
"maxLength": 50000
|
||||
},
|
||||
"aspectRatio": { "type": "ref", "ref": "#aspectRatio" }
|
||||
}
|
||||
}
|
||||
|
@ -4744,9 +4744,13 @@ export const schemaDict = {
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
maxGraphemes: 300,
|
||||
maxLength: 3000,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
maxGraphemes: 1000,
|
||||
maxLength: 10000,
|
||||
},
|
||||
thumb: {
|
||||
type: 'blob',
|
||||
@ -4775,12 +4779,17 @@ export const schemaDict = {
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
maxGraphemes: 300,
|
||||
maxLength: 3000,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
maxGraphemes: 1000,
|
||||
maxLength: 10000,
|
||||
},
|
||||
thumb: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -4816,6 +4825,8 @@ export const schemaDict = {
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
maxGraphemes: 5000,
|
||||
maxLength: 50000,
|
||||
},
|
||||
aspectRatio: {
|
||||
type: 'ref',
|
||||
@ -4859,12 +4870,16 @@ export const schemaDict = {
|
||||
properties: {
|
||||
thumb: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
fullsize: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
maxGraphemes: 5000,
|
||||
maxLength: 50000,
|
||||
},
|
||||
aspectRatio: {
|
||||
type: 'ref',
|
||||
|
@ -4744,9 +4744,13 @@ export const schemaDict = {
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
maxGraphemes: 300,
|
||||
maxLength: 3000,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
maxGraphemes: 1000,
|
||||
maxLength: 10000,
|
||||
},
|
||||
thumb: {
|
||||
type: 'blob',
|
||||
@ -4775,12 +4779,17 @@ export const schemaDict = {
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
maxGraphemes: 300,
|
||||
maxLength: 3000,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
maxGraphemes: 1000,
|
||||
maxLength: 10000,
|
||||
},
|
||||
thumb: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -4816,6 +4825,8 @@ export const schemaDict = {
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
maxGraphemes: 5000,
|
||||
maxLength: 50000,
|
||||
},
|
||||
aspectRatio: {
|
||||
type: 'ref',
|
||||
@ -4859,12 +4870,16 @@ export const schemaDict = {
|
||||
properties: {
|
||||
thumb: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
fullsize: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
maxGraphemes: 5000,
|
||||
maxLength: 50000,
|
||||
},
|
||||
aspectRatio: {
|
||||
type: 'ref',
|
||||
|
@ -4744,9 +4744,13 @@ export const schemaDict = {
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
maxGraphemes: 300,
|
||||
maxLength: 3000,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
maxGraphemes: 1000,
|
||||
maxLength: 10000,
|
||||
},
|
||||
thumb: {
|
||||
type: 'blob',
|
||||
@ -4775,12 +4779,17 @@ export const schemaDict = {
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
maxGraphemes: 300,
|
||||
maxLength: 3000,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
maxGraphemes: 1000,
|
||||
maxLength: 10000,
|
||||
},
|
||||
thumb: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -4816,6 +4825,8 @@ export const schemaDict = {
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
maxGraphemes: 5000,
|
||||
maxLength: 50000,
|
||||
},
|
||||
aspectRatio: {
|
||||
type: 'ref',
|
||||
@ -4859,12 +4870,16 @@ export const schemaDict = {
|
||||
properties: {
|
||||
thumb: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
fullsize: {
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
maxGraphemes: 5000,
|
||||
maxLength: 50000,
|
||||
},
|
||||
aspectRatio: {
|
||||
type: 'ref',
|
||||
|
Loading…
x
Reference in New Issue
Block a user