Category : jsonschema

The entire JSON file is rather large so I’ve only taken out the subsection I’ve had an issue with. { "diagrams": { "5f759d15cd046720c28531dd": { "_id": "5f759d15cd046720c28531dd", "offsetX": 320, "offsetY": 42, "zoom": 80, "modified": 1604279356, "nodes": { "5f9f5c3ccd046720c28531e4": { "nodeID": "5f9f5c3ccd046720c28531e4", "type": "start", "coords": [ 360, 120 ], "data": { "name": "Start", "color": "standard", "ports": [ ..

Read more

Considering the below definition { type: ‘object’, properties: { conditional: { title: ‘Device Status’, $ref: ‘#/definitions/deviceStatus’, }, }, definitions: { deviceStatus: { title: ‘Device Status’, type: ‘object’, properties: { deviceStatus: { type: ‘string’, title: ‘Device Status’, default: ‘admin-status’, enum: [‘oper-status’, ‘admin-status’], enumNames: [‘Operational Status’, ‘Administrative Status’], }, }, required: [‘deviceStatus’], dependencies: { deviceStatus: { oneOf: ..

Read more

this is my route: fastify.route({ method: "GET", url: "/foo/:foo_id", schema: { params: { foo_id: { type: "string" }, }, response: { 200: { oneOf: [ { type: "string" }, { type: "number" }, ], }, }, }, handler: fooHandler, }) when I try to start the server I get this error message: { "code":"FST_ERR_SCH_SERIALIZATION_BUILD", "message":"Failed ..

Read more