added limit 1 to arrays treated as a single value in schemas

This commit is contained in:
2026-07-16 13:43:08 -04:00
parent 1fedf5253c
commit c4bf6bde58
47 changed files with 616 additions and 586 deletions

View File

@ -227,8 +227,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "1",
"count": "0"
"count": "0",
"limit": "1"
},
"details": {
"path": "",
@ -268,8 +268,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "1",
"count": "0"
"count": "0",
"limit": "1"
},
"details": {
"path": "",
@ -347,8 +347,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "1",
"count": "0"
"count": "0",
"limit": "1"
},
"details": {
"path": "",
@ -373,8 +373,8 @@
{
"code": "MULTIPLE_OF_VIOLATED",
"values": {
"multiple_of": "2",
"value": "3"
"value": "3",
"multiple_of": "2"
},
"details": {
"path": "0",
@ -384,8 +384,8 @@
{
"code": "MULTIPLE_OF_VIOLATED",
"values": {
"multiple_of": "2",
"value": "9"
"value": "9",
"multiple_of": "2"
},
"details": {
"path": "2",
@ -432,8 +432,8 @@
{
"code": "MULTIPLE_OF_VIOLATED",
"values": {
"multiple_of": "2",
"value": "1"
"value": "1",
"multiple_of": "2"
},
"details": {
"path": "0",

View File

@ -62,8 +62,8 @@
"code": "EDGE_MISSING",
"values": {
"parent_type": "org",
"property_name": "missing_users",
"child_type": "user"
"child_type": "user",
"property_name": "missing_users"
},
"details": {
"path": "full.org/missing_users",
@ -151,8 +151,8 @@
{
"code": "EDGE_MISSING",
"values": {
"child_type": "child",
"parent_type": "parent",
"child_type": "child",
"property_name": "children"
},
"details": {
@ -470,8 +470,8 @@
{
"code": "DATABASE_TYPE_PARSE_FAILED",
"values": {
"reason": "invalid type: sequence, expected a string",
"type": "failure"
"type": "failure",
"reason": "invalid type: sequence, expected a string"
},
"details": {
"context": "failure"

View File

@ -227,8 +227,8 @@
{
"code": "DEPENDENCY_MISSING",
"values": {
"required_property": "bar",
"property_name": "quux"
"property_name": "quux",
"required_property": "bar"
},
"details": {
"path": "",
@ -386,8 +386,8 @@
{
"code": "DEPENDENCY_MISSING",
"values": {
"required_property": "foo'bar",
"property_name": "foo\"bar"
"property_name": "foo\"bar",
"required_property": "foo'bar"
},
"details": {
"path": "",
@ -829,8 +829,8 @@
{
"code": "MIN_PROPERTIES_VIOLATED",
"values": {
"limit": "4",
"count": "2"
"count": "2",
"limit": "4"
},
"details": {
"path": "",

View File

@ -34,8 +34,8 @@
{
"code": "EXCLUSIVE_MAXIMUM_VIOLATED",
"values": {
"limit": "3",
"value": "3"
"value": "3",
"limit": "3"
},
"details": {
"path": "",

View File

@ -34,8 +34,8 @@
{
"code": "EXCLUSIVE_MINIMUM_VIOLATED",
"values": {
"limit": "1.1",
"value": "1.1"
"value": "1.1",
"limit": "1.1"
},
"details": {
"path": "",

View File

@ -211,13 +211,6 @@
"gender": {},
"gender.condition": {
"type": "condition",
"compiledPropertyNames": [
"kind",
"$eq",
"$ne",
"$of",
"$nof"
],
"properties": {
"$eq": {
"type": [
@ -231,15 +224,6 @@
"null"
]
},
"$nof": {
"type": [
"array",
"null"
],
"items": {
"type": "gender"
}
},
"$of": {
"type": [
"array",
@ -248,80 +232,32 @@
"items": {
"type": "gender"
}
},
"$nof": {
"type": [
"array",
"null"
],
"items": {
"type": "gender"
}
}
}
},
"compiledPropertyNames": [
"kind",
"$eq",
"$ne",
"$of",
"$nof"
]
},
"person": {},
"person.filter": {
"compiledPropertyNames": [
"first_name",
"age",
"billing_address",
"gender",
"birth_date",
"uuid_field",
"tags",
"ad_hoc",
"$and",
"$or"
],
"type": "filter",
"properties": {
"$and": {
"items": {
"compiledPropertyNames": [
"first_name",
"age",
"billing_address",
"gender",
"birth_date",
"uuid_field",
"tags",
"ad_hoc",
"$and",
"$or"
],
"type": "person.filter"
},
"first_name": {
"type": [
"array",
"null"
]
},
"$or": {
"items": {
"compiledPropertyNames": [
"first_name",
"age",
"billing_address",
"gender",
"birth_date",
"uuid_field",
"tags",
"ad_hoc",
"$and",
"$or"
],
"type": "person.filter"
},
"type": [
"array",
"null"
]
},
"ad_hoc": {
"compiledPropertyNames": [
"foo"
],
"properties": {
"foo": {
"type": [
"string.condition",
"null"
]
}
},
"type": [
"filter",
"string.condition",
"null"
]
},
@ -337,6 +273,12 @@
"null"
]
},
"gender": {
"type": [
"gender.condition",
"null"
]
},
"birth_date": {
"type": [
"date.condition",
@ -349,48 +291,48 @@
"null"
]
},
"first_name": {
"type": [
"string.condition",
"null"
]
},
"gender": {
"type": [
"gender.condition",
"null"
]
},
"tags": {
"type": [
"string.condition",
"null"
]
}
},
"type": "filter"
},
"address": {},
"address.filter": {
"type": "filter",
"compiledPropertyNames": [
"city",
"$and",
"$or"
],
"properties": {
},
"ad_hoc": {
"type": [
"filter",
"null"
],
"properties": {
"foo": {
"type": [
"string.condition",
"null"
]
}
},
"compiledPropertyNames": [
"foo"
]
},
"$and": {
"type": [
"array",
"null"
],
"items": {
"type": "person.filter",
"compiledPropertyNames": [
"city",
"first_name",
"age",
"billing_address",
"gender",
"birth_date",
"uuid_field",
"tags",
"ad_hoc",
"$and",
"$or"
],
"type": "address.filter"
]
}
},
"$or": {
@ -399,21 +341,79 @@
"null"
],
"items": {
"type": "person.filter",
"compiledPropertyNames": [
"city",
"first_name",
"age",
"billing_address",
"gender",
"birth_date",
"uuid_field",
"tags",
"ad_hoc",
"$and",
"$or"
],
"type": "address.filter"
]
}
},
}
},
"compiledPropertyNames": [
"first_name",
"age",
"billing_address",
"gender",
"birth_date",
"uuid_field",
"tags",
"ad_hoc",
"$and",
"$or"
]
},
"address": {},
"address.filter": {
"type": "filter",
"properties": {
"city": {
"type": [
"string.condition",
"null"
]
},
"$and": {
"type": [
"array",
"null"
],
"items": {
"type": "address.filter",
"compiledPropertyNames": [
"city",
"$and",
"$or"
]
}
},
"$or": {
"type": [
"array",
"null"
],
"items": {
"type": "address.filter",
"compiledPropertyNames": [
"city",
"$and",
"$or"
]
}
}
}
},
"compiledPropertyNames": [
"city",
"$and",
"$or"
]
},
"condition": {},
"filter": {},
@ -424,52 +424,7 @@
"search": {},
"search.filter": {
"type": "filter",
"compiledPropertyNames": [
"kind",
"name",
"filter",
"$and",
"$or"
],
"properties": {
"$and": {
"type": [
"array",
"null"
],
"items": {
"compiledPropertyNames": [
"kind",
"name",
"filter",
"$and",
"$or"
],
"type": "search.filter"
}
},
"$or": {
"type": [
"array",
"null"
],
"items": {
"compiledPropertyNames": [
"kind",
"name",
"filter",
"$and",
"$or"
],
"type": "search.filter"
}
},
"filter": {
"type": [
"$kind.filter",
"null"
]
},
"kind": {
"type": [
"string.condition",
@ -481,8 +436,53 @@
"string.condition",
"null"
]
},
"filter": {
"type": [
"$kind.filter",
"null"
]
},
"$and": {
"type": [
"array",
"null"
],
"items": {
"type": "search.filter",
"compiledPropertyNames": [
"kind",
"name",
"filter",
"$and",
"$or"
]
}
},
"$or": {
"type": [
"array",
"null"
],
"items": {
"type": "search.filter",
"compiledPropertyNames": [
"kind",
"name",
"filter",
"$and",
"$or"
]
}
}
}
},
"compiledPropertyNames": [
"kind",
"name",
"filter",
"$and",
"$or"
]
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -106,8 +106,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "1",
"count": "2"
"count": "2",
"limit": "1"
},
"details": {
"path": "",
@ -144,8 +144,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "1",
"count": "2"
"count": "2",
"limit": "1"
},
"details": {
"path": "",
@ -284,8 +284,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "3",
"count": "4"
"count": "4",
"limit": "3"
},
"details": {
"path": "",

View File

@ -52,8 +52,8 @@
{
"code": "MAX_ITEMS_VIOLATED",
"values": {
"limit": "2",
"count": "3"
"count": "3",
"limit": "2"
},
"details": {
"path": "",

View File

@ -43,8 +43,8 @@
{
"code": "MAX_LENGTH_VIOLATED",
"values": {
"limit": "2",
"count": "3"
"count": "3",
"limit": "2"
},
"details": {
"path": "",
@ -109,8 +109,8 @@
{
"code": "MAX_LENGTH_VIOLATED",
"values": {
"limit": "2",
"count": "3"
"count": "3",
"limit": "2"
},
"details": {
"path": "",

View File

@ -139,8 +139,8 @@
{
"code": "MAX_PROPERTIES_VIOLATED",
"values": {
"limit": "2",
"count": "3"
"count": "3",
"limit": "2"
},
"details": {
"path": "",
@ -190,8 +190,8 @@
{
"code": "MAX_PROPERTIES_VIOLATED",
"values": {
"limit": "0",
"count": "1"
"count": "1",
"limit": "0"
},
"details": {
"path": "",

View File

@ -118,8 +118,8 @@
{
"code": "MAXIMUM_VIOLATED",
"values": {
"limit": "300",
"value": "300.5"
"value": "300.5",
"limit": "300"
},
"details": {
"path": "",

View File

@ -239,8 +239,8 @@
{
"code": "DEPENDENCY_MISSING",
"values": {
"required_property": "base_dep",
"property_name": "trigger"
"property_name": "trigger",
"required_property": "base_dep"
},
"details": {
"path": "",

View File

@ -169,8 +169,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "2",
"count": "0"
"count": "0",
"limit": "2"
},
"details": {
"path": "",
@ -357,8 +357,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "2",
"count": "0"
"count": "0",
"limit": "2"
},
"details": {
"path": "",
@ -463,8 +463,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "3",
"count": "0"
"count": "0",
"limit": "3"
},
"details": {
"path": "",
@ -487,8 +487,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "3",
"count": "1"
"count": "1",
"limit": "3"
},
"details": {
"path": "",
@ -513,8 +513,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "1",
"count": "3"
"count": "3",
"limit": "1"
},
"details": {
"path": "",
@ -657,8 +657,8 @@
{
"code": "CONTAINS_VIOLATED",
"values": {
"limit": "1",
"count": "2"
"count": "2",
"limit": "1"
},
"details": {
"path": "",

View File

@ -108,8 +108,8 @@
{
"code": "MIN_ITEMS_VIOLATED",
"values": {
"limit": "1",
"count": "0"
"count": "0",
"limit": "1"
},
"details": {
"path": "",

View File

@ -43,8 +43,8 @@
{
"code": "MIN_LENGTH_VIOLATED",
"values": {
"limit": "2",
"count": "1"
"count": "1",
"limit": "2"
},
"details": {
"path": "",

View File

@ -43,8 +43,8 @@
{
"code": "MINIMUM_VIOLATED",
"values": {
"limit": "1.1",
"value": "0.6"
"value": "0.6",
"limit": "1.1"
},
"details": {
"path": "",
@ -127,8 +127,8 @@
{
"code": "MINIMUM_VIOLATED",
"values": {
"limit": "-2",
"value": "-2.0001"
"value": "-2.0001",
"limit": "-2"
},
"details": {
"path": "",
@ -149,8 +149,8 @@
{
"code": "MINIMUM_VIOLATED",
"values": {
"limit": "-2",
"value": "-3"
"value": "-3",
"limit": "-2"
},
"details": {
"path": "",

View File

@ -148,8 +148,8 @@
{
"code": "MULTIPLE_OF_VIOLATED",
"values": {
"multiple_of": "0.0001",
"value": "0.00751"
"value": "0.00751",
"multiple_of": "0.0001"
},
"details": {
"path": "",

View File

@ -156,8 +156,8 @@
{
"code": "MAXIMUM_VIOLATED",
"values": {
"limit": "50",
"value": "60"
"value": "60",
"limit": "50"
},
"details": {
"path": "max",

View File

@ -200,8 +200,8 @@
{
"code": "MINIMUM_VIOLATED",
"values": {
"limit": "10",
"value": "5"
"value": "5",
"limit": "10"
},
"details": {
"path": "entities/entity-beta/value",

View File

@ -34,8 +34,8 @@
{
"code": "PATTERN_VIOLATED",
"values": {
"value": "abc",
"pattern": "^a*$"
"pattern": "^a*$",
"value": "abc"
},
"details": {
"path": "",

View File

@ -148,8 +148,8 @@
{
"code": "NO_FAMILY_MATCH",
"values": {
"value": "alien",
"discriminator": "type"
"discriminator": "type",
"value": "alien"
},
"details": {
"path": "",
@ -284,8 +284,8 @@
{
"code": "NO_FAMILY_MATCH",
"values": {
"value": "bot",
"discriminator": "type"
"discriminator": "type",
"value": "bot"
},
"details": {
"path": "",
@ -591,8 +591,8 @@
{
"code": "NO_ONEOF_MATCH",
"values": {
"value": "alien",
"discriminator": "type"
"discriminator": "type",
"value": "alien"
},
"details": {
"path": "",
@ -931,8 +931,8 @@
{
"code": "NO_FAMILY_MATCH",
"values": {
"value": "unknown_panel",
"discriminator": "kind"
"discriminator": "kind",
"value": "unknown_panel"
},
"details": {
"path": "",

View File

@ -431,8 +431,8 @@
{
"code": "MAX_LENGTH_VIOLATED",
"values": {
"limit": "3",
"count": "6"
"count": "6",
"limit": "3"
},
"details": {
"path": "",

View File

@ -2670,7 +2670,8 @@
" WHERE",
" NOT entity_3.archived",
" AND attachment_4.kind = 'cover'",
" AND attachment_4.attachable_id = entity_1.id LIMIT 1",
" AND attachment_4.attachable_id = entity_1.id",
" LIMIT 1",
" ),",
" 'cover_attachments', (",
" SELECT COALESCE(jsonb_agg(jsonb_build_object(",

View File

@ -139,8 +139,8 @@
{
"code": "MAX_LENGTH_VIOLATED",
"values": {
"limit": "5",
"count": "26"
"count": "26",
"limit": "5"
},
"details": {
"path": "email",