Skip to content

Commit 8044abb

Browse files
fix: increase content type max fields to 100[ZEND-6191]
1 parent 5ce6c4a commit 8044abb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib/offline-api/validator/schema/content-type-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as Joi from 'joi'
22

3-
const MAX_FIELDS = 50
3+
const MAX_FIELDS = 100
44
const contentTypeSchema = Joi.object().keys({
55
name: Joi.string().required(),
66
description: Joi.string().allow(''),

test/unit/lib/offline-api/validation/payload-validation.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ describe('payload validation', function () {
3737
const lunch = migration.createContentType('lunch')
3838
lunch.name('A lunch')
3939

40-
for (let i = 0; i < 51; i++) {
40+
for (let i = 0; i < 101; i++) {
4141
lunch.createField(`menu${i}`).type('Symbol').name(`menu${i}`)
4242
}
4343
}, [])
4444
expect(errors).to.eql([
4545
[
4646
{
4747
type: 'InvalidPayload',
48-
message: 'Content type "lunch" cannot have more than 50 fields.'
48+
message: 'Content type "lunch" cannot have more than 100 fields.'
4949
}
5050
]
5151
])

0 commit comments

Comments
 (0)