Buckets:
ktongue/docker_container / .cache /opencode /node_modules /@fastify /ajv-compiler /lib /serializer-compiler.js
| const AjvJTD = require('ajv/dist/jtd') | |
| const defaultAjvOptions = require('./default-ajv-options') | |
| class SerializerCompiler { | |
| constructor (_externalSchemas, options) { | |
| this.ajv = new AjvJTD(Object.assign({}, defaultAjvOptions, options)) | |
| /** | |
| * https://ajv.js.org/json-type-definition.html#ref-form | |
| * Unlike JSON Schema, JTD does not allow to reference: | |
| * - any schema fragment other than root level definitions member | |
| * - root of the schema - there is another way to define a self-recursive schema (see Example 2) | |
| * - another schema file (but you can still combine schemas from multiple files using JavaScript). | |
| * | |
| * So we ignore the externalSchemas parameter. | |
| */ | |
| } | |
| buildSerializerFunction ({ schema/*, method, url, httpStatus */ }) { | |
| return this.ajv.compileSerializer(schema) | |
| } | |
| } | |
| module.exports = SerializerCompiler | |
Xet Storage Details
- Size:
- 893 Bytes
- Xet hash:
- c6a70c74bc91feb864b9e8ce81811e4aae61d7d3343b3c511ac65683048bcb99
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.