(parent, options)
| 39 | |
| 40 | class SchemaController { |
| 41 | constructor (parent, options) { |
| 42 | this.opts = options || parent?.opts |
| 43 | this.addedSchemas = false |
| 44 | |
| 45 | this.compilersFactory = this.opts.compilersFactory |
| 46 | |
| 47 | if (parent) { |
| 48 | this.schemaBucket = this.opts.bucket(parent.getSchemas()) |
| 49 | this.validatorCompiler = parent.getValidatorCompiler() |
| 50 | this.serializerCompiler = parent.getSerializerCompiler() |
| 51 | this.isCustomValidatorCompiler = parent.isCustomValidatorCompiler |
| 52 | this.isCustomSerializerCompiler = parent.isCustomSerializerCompiler |
| 53 | this.parent = parent |
| 54 | } else { |
| 55 | this.schemaBucket = this.opts.bucket() |
| 56 | this.isCustomValidatorCompiler = this.opts.isCustomValidatorCompiler || false |
| 57 | this.isCustomSerializerCompiler = this.opts.isCustomSerializerCompiler || false |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | // Bucket interface |
| 62 | add (schema) { |
nothing calls this directly
no test coverage detected