- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
19 lines
474 B
JavaScript
19 lines
474 B
JavaScript
'use strict';
|
|
|
|
module.exports = function defFunc(ajv) {
|
|
defFunc.definition = {
|
|
type: 'object',
|
|
macro: function (schema, parentSchema) {
|
|
if (!schema) return true;
|
|
var properties = Object.keys(parentSchema.properties);
|
|
if (properties.length == 0) return true;
|
|
return {required: properties};
|
|
},
|
|
metaSchema: {type: 'boolean'},
|
|
dependencies: ['properties']
|
|
};
|
|
|
|
ajv.addKeyword('allRequired', defFunc.definition);
|
|
return ajv;
|
|
};
|