1
1
import { Schema as InternalSchema } from './schema-analyzer' ;
2
- import convertors from './schema-convertors' ;
3
- import { ExtendedJSONSchema , MongoDBJSONSchema , StandardJSONSchema } from './types' ;
2
+ import { convertors } from './schema-convertors' ;
3
+ import { ExpandedJSONSchema , MongoDBJSONSchema , StandardJSONSchema } from './types' ;
4
4
5
5
export interface SchemaAccessor {
6
6
getStandardJsonSchema : ( ) => Promise < StandardJSONSchema > ;
7
7
getMongoDBJsonSchema : ( ) => Promise < MongoDBJSONSchema > ;
8
- getExtendedJsonSchema : ( ) => Promise < ExtendedJSONSchema > ;
8
+ getExpandedJSONSchema : ( ) => Promise < ExpandedJSONSchema > ;
9
9
getInternalSchema : ( ) => Promise < InternalSchema > ;
10
10
}
11
11
@@ -23,13 +23,13 @@ export class InternalSchemaBasedAccessor implements SchemaAccessor {
23
23
private internalSchema : InternalSchema ;
24
24
private standardJSONSchema ?: StandardJSONSchema ;
25
25
private mongodbJSONSchema ?: MongoDBJSONSchema ;
26
- private extendedJSONSchema ?: ExtendedJSONSchema ;
26
+ private ExpandedJSONSchema ?: ExpandedJSONSchema ;
27
27
28
28
constructor ( internalSchema : InternalSchema ) {
29
29
this . internalSchema = internalSchema ;
30
30
}
31
31
32
- async getInternalSchema ( options ?: Options ) : Promise < InternalSchema > {
32
+ async getInternalSchema ( ) : Promise < InternalSchema > {
33
33
return this . internalSchema ;
34
34
}
35
35
@@ -41,7 +41,7 @@ export class InternalSchemaBasedAccessor implements SchemaAccessor {
41
41
return this . mongodbJSONSchema ??= await convertors . internalSchemaToMongoDB ( this . internalSchema , options ) ;
42
42
}
43
43
44
- async getExtendedJsonSchema ( options : Options = { } ) : Promise < ExtendedJSONSchema > {
45
- return this . extendedJSONSchema ??= await convertors . internalSchemaToExtended ( this . internalSchema , options ) ;
44
+ async getExpandedJSONSchema ( options : Options = { } ) : Promise < ExpandedJSONSchema > {
45
+ return this . ExpandedJSONSchema ??= await convertors . internalSchemaToExpanded ( this . internalSchema , options ) ;
46
46
}
47
47
}
0 commit comments