@@ -5,7 +5,7 @@ import * as _ from 'lodash';
55import * as semver from 'semver' ;
66import * as express from 'express' ;
77import { normalizeUri } from 'jsonref' ;
8- import { Schema } from 'jsonpolice' ;
8+ import { Schema , DynamicSchema } from 'jsonpolice' ;
99import { Router , RouterOptions , RequestHandler , Request , Response , NextFunction } from 'express' ;
1010import { Eredita } from 'eredita' ;
1111import debug , { Logger } from './debug' ;
@@ -227,17 +227,17 @@ export class API implements Swagger {
227227 return this ;
228228 }
229229
230- registerSchema ( id : string , schema : Swagger . Schema | Schema ) {
230+ registerSchema ( id : string , schema : Swagger . Schema | DynamicSchema ) {
231231 if ( ! this [ __schemas ] ) {
232232 this [ __schemas ] = { } ;
233233 this . registerTag ( _ . cloneDeep ( __default_schema_tag ) ) ;
234234 this . registerOperation ( '/schemas/{id}' , 'get' , _ . cloneDeep ( __default_schema_operation ) ) ;
235235 }
236236
237237 let _schema : Swagger . FullSchema ;
238- if ( schema instanceof Schema ) {
238+ if ( schema instanceof DynamicSchema ) {
239239 _schema = { } ;
240- Schema . attach ( _schema , schema as Schema ) ;
240+ Schema . attach ( _schema , schema as DynamicSchema ) ;
241241 } else {
242242 _schema = schema as Swagger . FullSchema ;
243243 }
0 commit comments