@tsofist/schema-forge 2.4.2 → 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 +2 -1
- 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_]+$';
|
|
@@ -369,7 +370,7 @@ function addJSDocKeywords(engine) {
|
|
|
369
370
|
type: 'object',
|
|
370
371
|
additionalProperties: DBIndexSchema,
|
|
371
372
|
propertyNames: {
|
|
372
|
-
pattern:
|
|
373
|
+
pattern: NestedPropertyNamePattern,
|
|
373
374
|
},
|
|
374
375
|
},
|
|
375
376
|
},
|