@azteam/express 1.2.243 → 1.2.245
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/validate.js +4 -6
package/package.json
CHANGED
package/src/validate.js
CHANGED
|
@@ -99,8 +99,10 @@ export const schemaVersion = (optional = false) => ({
|
|
|
99
99
|
max: 300,
|
|
100
100
|
optional,
|
|
101
101
|
});
|
|
102
|
-
export const schemaArray = (optional = false) => ({
|
|
102
|
+
export const schemaArray = (items, optional = false) => ({
|
|
103
103
|
type: 'array',
|
|
104
|
+
items,
|
|
105
|
+
default: [],
|
|
104
106
|
optional,
|
|
105
107
|
});
|
|
106
108
|
export const schemaJSON = (optional = false) => ({
|
|
@@ -128,7 +130,6 @@ export const schemaEnum = (values, optional = false) => ({
|
|
|
128
130
|
});
|
|
129
131
|
|
|
130
132
|
/* rules */
|
|
131
|
-
|
|
132
133
|
export const rulesId = {
|
|
133
134
|
id: schemaId(),
|
|
134
135
|
};
|
|
@@ -136,10 +137,7 @@ export const rulesSlug = {
|
|
|
136
137
|
slug: schemaSlug(),
|
|
137
138
|
};
|
|
138
139
|
export const rulesPlatformType = {
|
|
139
|
-
type:
|
|
140
|
-
type: 'enum',
|
|
141
|
-
values: ['web', 'app'],
|
|
142
|
-
},
|
|
140
|
+
type: schemaEnum(['web', 'app']),
|
|
143
141
|
};
|
|
144
142
|
export const rulesMetadata = {
|
|
145
143
|
metadata_disable: schemaBoolean(true),
|