@tsofist/schema-forge 2.4.1 → 2.4.3
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/lib/generator/types.d.ts +1 -1
- package/lib/validator.js +6 -2
- package/package.json +1 -1
package/lib/generator/types.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface SchemaForgeBaseOptions {
|
|
|
29
29
|
* Filter for definitions
|
|
30
30
|
* Important: dependencies will not be filtered
|
|
31
31
|
*/
|
|
32
|
-
definitionsFilter?: (name: string) => boolean;
|
|
32
|
+
readonly definitionsFilter?: (name: string) => boolean;
|
|
33
33
|
/**
|
|
34
34
|
* Create shared $ref definitions for all types
|
|
35
35
|
*
|
package/lib/validator.js
CHANGED
|
@@ -249,6 +249,7 @@ function createSchemaForgeValidator(engineOptions, useAdditionalFormats = false)
|
|
|
249
249
|
function addJSDocKeywords(engine) {
|
|
250
250
|
const InterfaceNamePattern = '^[A-Z][a-zA-Z0-9]+$';
|
|
251
251
|
const PropertyNamePattern = '^[a-z][a-zA-Z0-9]+$';
|
|
252
|
+
const NestedPropertyNamePattern = '^[a-z][a-zA-Z0-9.-]+$';
|
|
252
253
|
const MethodNamePattern = PropertyNamePattern;
|
|
253
254
|
const MemberNamePattern = `${InterfaceNamePattern.substring(0, InterfaceNamePattern.length - 1)}#${PropertyNamePattern.substring(1)}`;
|
|
254
255
|
const IXNamePattern = '^ix_[a-z][a-zA-Z0-9_]+$';
|
|
@@ -366,8 +367,11 @@ function addJSDocKeywords(engine) {
|
|
|
366
367
|
pattern: EntityNamePattern,
|
|
367
368
|
},
|
|
368
369
|
indexes: {
|
|
369
|
-
type: '
|
|
370
|
-
|
|
370
|
+
type: 'object',
|
|
371
|
+
additionalProperties: DBIndexSchema,
|
|
372
|
+
propertyNames: {
|
|
373
|
+
pattern: NestedPropertyNamePattern,
|
|
374
|
+
},
|
|
371
375
|
},
|
|
372
376
|
},
|
|
373
377
|
},
|