File tree Expand file tree Collapse file tree 4 files changed +21
-24
lines changed
Expand file tree Collapse file tree 4 files changed +21
-24
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const resourcesPath = currentEnv == environment.prod ? path.dist : path.src
2727
2828// System config loading
2929var properties = require ( './config/app-config.json' ) ;
30- var loideUrl = properties . loide_url ;
30+ var loideUrl = properties . loide_url ;
3131var httpPort = properties . port . http ;
3232var httpsPortP = properties . port . https ;
3333var key = properties . path . key ;
@@ -38,7 +38,8 @@ var maxAge = properties.max_age;
3838var servicesConfig = require ( './config/services.json' ) ;
3939
4040// This function validates the JSON schemas
41- var Ajv = require ( 'ajv' ) ;
41+ var Ajv = require ( 'ajv' ) ;
42+ var formats = require ( 'ajv-formats' ) ;
4243validateJsonSchemas ( ) ;
4344
4445var pckg = require ( './package.json' ) ;
@@ -185,11 +186,13 @@ function validateSchema(jsonPath, schemaPath) {
185186 var schema = require ( schemaPath ) ;
186187
187188 // Config
188- var ajv = new Ajv ( {
189- allErrors : true ,
190- jsonPointers : true
189+ var ajv = new Ajv . default ( {
190+ allErrors : true
191191 } ) ;
192192
193+ // Adding format support
194+ formats ( ajv ) ;
195+
193196 // Compiling the schema
194197 var compiledSchema = ajv . compile ( schema ) ;
195198 var validated = false ;
Original file line number Diff line number Diff line change 11{
22 "$schema" : " http://json-schema.org/draft-07/schema#" ,
33 "$id" : " app-config-schema.json" ,
4- "self" : {
5- "vendor" : " unical" ,
6- "name" : " app-config" ,
7- "format" : " jsonschema" ,
8- "version" : " 1-0-0"
9- },
4+ "title" : " Configurations" ,
5+ "description" : " LoIDE configurations" ,
106 "type" : " object" ,
117 "properties" : {
128 "loide_url" : {
139 "title" : " LoIDE URL" ,
1410 "description" : " This is the URL where the application can be reached" ,
15- "type" : " string" ,
16- "minimum" : 0
11+ "type" : " string"
1712 },
1813 "max_age" : {
1914 "title" : " HSTS max age" ,
Original file line number Diff line number Diff line change 11{
22 "$schema" : " http://json-schema.org/draft-07/schema#" ,
33 "$id" : " services-schema.json" ,
4- "self" : {
5- "vendor" : " unical" ,
6- "name" : " services" ,
7- "format" : " jsonschema" ,
8- "version" : " 1-0-0"
9- },
4+ "title" : " Services" ,
5+ "description" : " Services tha LoIDE runs" ,
6+ "type" : " object" ,
107 "properties" : {
118 "languages" : {
129 "title" : " Supported languages." ,
5451 "path" : {
5552 "title" : " Syntax-Highlighter path." ,
5653 "description" : " This property indicates the syntax-highlighter file path." ,
57- "type" : " string"
54+ "type" : " string" ,
55+ "format" : " uri-reference"
5856 }
5957 },
6058 "required" : [
181179 "title" : " Executor path." ,
182180 "description" : " This property indicates the executor path relative to its URL." ,
183181 "type" : " string" ,
184- "_comment " : " Add the pattern to match with the 'path'. "
182+ "format " : " uri-reference "
185183 },
186184 "port" : {
187185 "title" : " Connection port number." ,
Original file line number Diff line number Diff line change 11{
22 "name" : " loide" ,
3- "version" : " 2.10.1 " ,
3+ "version" : " 2.11.0 " ,
44 "description" : " Web-based IDE for Logic Programming" ,
55 "main" : " app.js" ,
66 "scripts" : {
4444 "url" : " https://github.com/DeMaCS-UNICAL/LoIDE/issues"
4545 },
4646 "dependencies" : {
47- "ajv" : " ^6.12.4" ,
47+ "ajv" : " ^8.0.5" ,
48+ "ajv-formats" : " ^2.0.2" ,
4849 "express" : " ^4.17.1" ,
4950 "express-force-ssl" : " ^0.3.2" ,
5051 "helmet" : " ^3.21.1" ,
5152 "json-pointer" : " ^0.6.0" ,
52- "pug" : " ^3.0.0 " ,
53+ "pug" : " ^3.0.1 " ,
5354 "socket.io" : " ^2.3.0" ,
5455 "websocket" : " ^1.0.32"
5556 },
You can’t perform that action at this time.
0 commit comments