Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing schema - properties are optional by default according to spec.

  • Loading branch information...
commit e93ac5e831fa8956c0815f9f17a21b36d68cc1c4 1 parent ff3fc22
@jarib authored
View
9 lib/har/schemas/browserType
@@ -5,14 +5,15 @@
"optional": true,
"properties": {
"name": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"version": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
15 lib/har/schemas/cacheEntryType
@@ -4,21 +4,22 @@
"description": "Info about cache entry.",
"properties": {
"expires": {
- "type": "string",
- "optional": "true"
+ "type": "string"
},
"lastAccess": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"eTag": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"hitCount": {
- "type": "integer"
+ "type": "integer",
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
3  lib/har/schemas/cacheType
@@ -9,8 +9,7 @@
"$ref": "cacheEntryType"
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
18 lib/har/schemas/contentType
@@ -3,26 +3,24 @@
"description": "Response content",
"properties": {
"size": {
- "type": "integer"
+ "type": "integer",
+ "required": true
},
"compression": {
- "type": "integer",
- "optional": true
+ "type": "integer"
},
"mimeType": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"text": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"encoding": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
24 lib/har/schemas/cookieType
@@ -3,34 +3,30 @@
"description": "Cookie description.",
"properties": {
"name": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"value": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"path": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"domain": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"expires": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"httpOnly": {
- "type": "boolean",
- "optional": true
+ "type": "boolean"
},
"secure": {
- "type": "boolean",
- "optional": true
+ "type": "boolean"
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
9 lib/har/schemas/creatorType
@@ -4,14 +4,15 @@
"type": "object",
"properties": {
"name": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"version": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
30 lib/har/schemas/entryType
@@ -4,41 +4,43 @@
"optional": true,
"properties": {
"pageref": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"startedDateTime": {
"type": "string",
"format": "date-time",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))",
+ "required": true
},
"time": {
"type": "integer",
- "min": 0
+ "min": 0,
+ "required": true
},
"request": {
- "$ref": "requestType"
+ "$ref": "requestType",
+ "required": true
},
"response": {
- "$ref": "responseType"
+ "$ref": "responseType",
+ "required": true
},
"cache": {
- "$ref": "cacheType"
+ "$ref": "cacheType",
+ "required": true
},
"timings": {
- "$ref": "timingsType"
+ "$ref": "timingsType",
+ "required": true
},
"serverIPAddress": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"connection": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
16 lib/har/schemas/logType
@@ -7,17 +7,19 @@
"type": "object",
"properties": {
"version": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"creator": {
- "$ref": "creatorType"
+ "$ref": "creatorType",
+ "required": true
},
"browser": {
- "$ref": "browserType"
+ "$ref": "browserType",
+ "required": true
},
"pages": {
"type": "array",
- "optional": true,
"items": {
"$ref": "pageType"
}
@@ -26,11 +28,11 @@
"type": "array",
"items": {
"$ref": "entryType"
- }
+ },
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
5 lib/har/schemas/pageTimingsType
@@ -4,17 +4,14 @@
"properties": {
"onContentLoad": {
"type": "number",
- "optional": true,
"min": -1
},
"onLoad": {
"type": "number",
- "optional": true,
"min": -1
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
15 lib/har/schemas/pageType
@@ -6,21 +6,24 @@
"startedDateTime": {
"type": "string",
"format": "date-time",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))",
+ "required": true
},
"id": {
"type": "string",
- "unique": true
+ "unique": true,
+ "required": true
},
"title": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"pageTimings": {
- "$ref": "pageTimingsType"
+ "$ref": "pageTimingsType",
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
25 lib/har/schemas/postDataType
@@ -4,40 +4,35 @@
"optional": true,
"properties": {
"mimeType": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"text": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"params": {
"type": "array",
- "optional": true,
"properties": {
"name": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"value": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"fileName": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"contentType": {
- "type": "string",
- "optional": true
+ "type": "string"
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
9 lib/har/schemas/recordType
@@ -3,14 +3,15 @@
"description": "Helper name-value pair structure.",
"properties": {
"name": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"value": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
27 lib/har/schemas/requestType
@@ -3,44 +3,51 @@
"description": "Monitored request",
"properties": {
"method": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"url": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"httpVersion": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"cookies": {
"type": "array",
"items": {
"$ref": "cookieType"
- }
+ },
+ "required": true
},
"headers": {
"type": "array",
"items": {
"$ref": "recordType"
- }
+ },
+ "required": true
},
"queryString": {
"type": "array",
"items": {
"$ref": "recordType"
- }
+ },
+ "required": true
},
"postData": {
"$ref": "postDataType"
},
"headersSize": {
- "type": "integer"
+ "type": "integer",
+ "required": true
},
"bodySize": {
- "type": "integer"
+ "type": "integer",
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
30 lib/har/schemas/responseType
@@ -3,41 +3,49 @@
"description": "Monitored Response.",
"properties": {
"status": {
- "type": "integer"
+ "type": "integer",
+ "required": true
},
"statusText": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"httpVersion": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"cookies": {
"type": "array",
"items": {
"$ref": "cookieType"
- }
+ },
+ "required": true
},
"headers": {
"type": "array",
"items": {
"$ref": "recordType"
- }
+ },
+ "required": true
},
"content": {
- "$ref": "contentType"
+ "$ref": "contentType",
+ "required": true
},
"redirectURL": {
- "type": "string"
+ "type": "string",
+ "required": true
},
"headersSize": {
- "type": "integer"
+ "type": "integer",
+ "required": true
},
"bodySize": {
- "type": "integer"
+ "type": "integer",
+ "required": true
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
22 lib/har/schemas/timingsType
@@ -4,36 +4,40 @@
"properties": {
"dns": {
"type": "integer",
- "min": -1
+ "min": -1,
+ "required": true
},
"connect": {
"type": "integer",
- "min": -1
+ "min": -1,
+ "required": true
},
"blocked": {
"type": "integer",
- "min": -1
+ "min": -1,
+ "required": true
},
"send": {
"type": "integer",
- "min": -1
+ "min": -1,
+ "required": true
},
"wait": {
"type": "integer",
- "min": -1
+ "min": -1,
+ "required": true
},
"receive": {
"type": "integer",
- "min": -1
+ "min": -1,
+ "required": true
},
"ssl": {
"type": "integer",
- "optional": true,
"min": -1
},
"comment": {
- "type": "string",
- "optional": true
+ "type": "string"
}
}
}
View
177 schema.json
@@ -7,12 +7,12 @@
"log": {
"type": "object",
"properties": {
- "version": {"type": "string"},
- "creator": {"$ref": "creatorType"},
- "browser": {"$ref": "browserType"},
- "pages": {"type": "array", "optional": true, "items": {"$ref": "pageType"}},
- "entries": {"type": "array", "items": {"$ref": "entryType"}},
- "comment": {"type": "string", "optional": true}
+ "version": {"type": "string", "required": true},
+ "creator": {"$ref": "creatorType", "required": true},
+ "browser": {"$ref": "browserType", "required": true},
+ "pages": {"type": "array", "items": {"$ref": "pageType"}},
+ "entries": {"type": "array", "items": {"$ref": "entryType"}, "required": true},
+ "comment": {"type": "string"}
}
}
}
@@ -22,9 +22,9 @@
"description": "Name and version info of the log creator app.",
"type": "object",
"properties": {
- "name": {"type": "string"},
- "version": {"type": "string"},
- "comment": {"type": "string", "optional": true}
+ "name": {"type": "string", "required": true},
+ "version": {"type": "string", "required": true},
+ "comment": {"type": "string"}
}
},
"browserType": {
@@ -33,9 +33,9 @@
"type": "object",
"optional": true,
"properties": {
- "name": {"type": "string"},
- "version": {"type": "string"},
- "comment": {"type": "string", "optional": true}
+ "name": {"type": "string", "required": true},
+ "version": {"type": "string", "required": true},
+ "comment": {"type": "string"}
}
},
"pageType": {
@@ -43,20 +43,20 @@
"description": "Exported web page",
"optional": true,
"properties": {
- "startedDateTime": {"type": "string", "format": "date-time", "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},
- "id": {"type": "string", "unique": true},
- "title": {"type": "string"},
- "pageTimings": {"$ref": "pageTimingsType"},
- "comment": {"type": "string", "optional": true}
+ "startedDateTime": {"type": "string", "format": "date-time", "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))", "required": true},
+ "id": {"type": "string", "unique": true, "required": true},
+ "title": {"type": "string", "required": true},
+ "pageTimings": {"$ref": "pageTimingsType", "required": true},
+ "comment": {"type": "string"}
}
},
"pageTimingsType": {
"id": "pageTimingsType",
"description": "Timing info about page load",
"properties": {
- "onContentLoad": {"type": "number", "optional": true, "min": -1},
- "onLoad": {"type": "number", "optional": true, "min": -1},
- "comment": {"type": "string", "optional": true}
+ "onContentLoad": {"type": "number", "min": -1},
+ "onLoad": {"type": "number", "min": -1},
+ "comment": {"type": "string"}
}
},
"entryType": {
@@ -64,71 +64,71 @@
"description": "Request and Response related info",
"optional": true,
"properties": {
- "pageref": {"type": "string", "optional": true},
- "startedDateTime": {"type": "string", "format": "date-time", "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},
- "time": {"type": "integer", "min": 0},
- "request" : {"$ref": "requestType"},
- "response" : {"$ref": "responseType"},
- "cache" : {"$ref": "cacheType"},
- "timings" : {"$ref": "timingsType"},
- "serverIPAddress" : {"type": "string", "optional": true},
- "connection" : {"type": "string", "optional": true},
- "comment": {"type": "string", "optional": true}
+ "pageref": {"type": "string"},
+ "startedDateTime": {"type": "string", "format": "date-time", "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))", "required": true},
+ "time": {"type": "integer", "min": 0, "required": true},
+ "request" : {"$ref": "requestType", "required": true},
+ "response" : {"$ref": "responseType", "required": true},
+ "cache" : {"$ref": "cacheType", "required": true},
+ "timings" : {"$ref": "timingsType", "required": true},
+ "serverIPAddress" : {"type": "string"},
+ "connection" : {"type": "string"},
+ "comment": {"type": "string"}
}
},
"requestType": {
"id": "requestType",
"description": "Monitored request",
"properties": {
- "method": {"type": "string"},
- "url": {"type": "string"},
- "httpVersion": {"type" : "string"},
- "cookies" : {"type": "array", "items": {"$ref": "cookieType"}},
- "headers" : {"type": "array", "items": {"$ref": "recordType"}},
- "queryString" : {"type": "array", "items": {"$ref": "recordType"}},
+ "method": {"type": "string", "required": true},
+ "url": {"type": "string", "required": true},
+ "httpVersion": {"type" : "string", "required": true},
+ "cookies" : {"type": "array", "items": {"$ref": "cookieType"}, "required": true},
+ "headers" : {"type": "array", "items": {"$ref": "recordType"}, "required": true},
+ "queryString" : {"type": "array", "items": {"$ref": "recordType"}, "required": true},
"postData" : {"$ref": "postDataType"},
- "headersSize" : {"type": "integer"},
- "bodySize" : {"type": "integer"},
- "comment": {"type": "string", "optional": true}
+ "headersSize" : {"type": "integer", "required": true},
+ "bodySize" : {"type": "integer", "required": true},
+ "comment": {"type": "string"}
}
},
"recordType": {
"id": "recordType",
"description": "Helper name-value pair structure.",
"properties": {
- "name": {"type": "string"},
- "value": {"type": "string"},
- "comment": {"type": "string", "optional": true}
+ "name": {"type": "string", "required": true},
+ "value": {"type": "string", "required": true},
+ "comment": {"type": "string"}
}
},
"responseType": {
"id": "responseType",
"description": "Monitored Response.",
"properties": {
- "status": {"type": "integer"},
- "statusText": {"type": "string"},
- "httpVersion": {"type": "string"},
- "cookies" : {"type": "array", "items": {"$ref": "cookieType"}},
- "headers" : {"type": "array", "items": {"$ref": "recordType"}},
- "content" : {"$ref": "contentType"},
- "redirectURL" : {"type": "string"},
- "headersSize" : {"type": "integer"},
- "bodySize" : {"type": "integer"},
- "comment": {"type": "string", "optional": true}
+ "status": {"type": "integer", "required": true},
+ "statusText": {"type": "string", "required": true},
+ "httpVersion": {"type": "string", "required": true},
+ "cookies" : {"type": "array", "items": {"$ref": "cookieType"}, "required": true},
+ "headers" : {"type": "array", "items": {"$ref": "recordType"}, "required": true},
+ "content" : {"$ref": "contentType", "required": true},
+ "redirectURL" : {"type": "string", "required": true},
+ "headersSize" : {"type": "integer", "required": true},
+ "bodySize" : {"type": "integer", "required": true},
+ "comment": {"type": "string"}
}
},
"cookieType": {
"id": "cookieType",
"description": "Cookie description.",
"properties": {
- "name": {"type": "string"},
- "value": {"type": "string"},
- "path": {"type": "string", "optional": true},
- "domain" : {"type": "string", "optional": true},
- "expires" : {"type": "string", "optional": true},
- "httpOnly" : {"type": "boolean", "optional": true},
- "secure" : {"type": "boolean", "optional": true},
- "comment": {"type": "string", "optional": true}
+ "name": {"type": "string", "required": true},
+ "value": {"type": "string", "required": true},
+ "path": {"type": "string"},
+ "domain" : {"type": "string"},
+ "expires" : {"type": "string"},
+ "httpOnly" : {"type": "boolean"},
+ "secure" : {"type": "boolean"},
+ "comment": {"type": "string"}
}
},
"postDataType": {
@@ -136,32 +136,31 @@
"description": "Posted data info.",
"optional": true,
"properties": {
- "mimeType": {"type": "string"},
- "text": {"type": "string", "optional": true},
+ "mimeType": {"type": "string", "required": true},
+ "text": {"type": "string"},
"params": {
"type": "array",
- "optional": true,
"properties": {
- "name": {"type": "string"},
- "value": {"type": "string", "optional": true},
- "fileName": {"type": "string", "optional": true},
- "contentType": {"type": "string", "optional": true},
- "comment": {"type": "string", "optional": true}
+ "name": {"type": "string", "required": true},
+ "value": {"type": "string"},
+ "fileName": {"type": "string"},
+ "contentType": {"type": "string"},
+ "comment": {"type": "string"}
}
},
- "comment": {"type": "string", "optional": true}
+ "comment": {"type": "string"}
}
},
"contentType": {
"id": "contentType",
"description": "Response content",
"properties": {
- "size": {"type": "integer"},
- "compression": {"type": "integer", "optional": true},
- "mimeType": {"type": "string"},
- "text": {"type": "string", "optional": true},
- "encoding": {"type": "string", "optional": true},
- "comment": {"type": "string", "optional": true}
+ "size": {"type": "integer", "required": true},
+ "compression": {"type": "integer"},
+ "mimeType": {"type": "string", "required": true},
+ "text": {"type": "string"},
+ "encoding": {"type": "string"},
+ "comment": {"type": "string"}
}
},
"cacheType": {
@@ -170,7 +169,7 @@
"properties": {
"beforeRequest": {"$ref": "cacheEntryType"},
"afterRequest": {"$ref": "cacheEntryType"},
- "comment": {"type": "string", "optional": true}
+ "comment": {"type": "string"}
}
},
"cacheEntryType": {
@@ -178,25 +177,25 @@
"optional": true,
"description": "Info about cache entry.",
"properties": {
- "expires": {"type": "string", "optional": "true"},
- "lastAccess": {"type": "string"},
- "eTag": {"type": "string"},
- "hitCount": {"type": "integer"},
- "comment": {"type": "string", "optional": true}
+ "expires": {"type": "string"},
+ "lastAccess": {"type": "string", "required": true},
+ "eTag": {"type": "string", "required": true},
+ "hitCount": {"type": "integer", "required": true},
+ "comment": {"type": "string"}
}
},
"timingsType": {
"id": "timingsType",
"description": "Info about request-response timing.",
"properties": {
- "dns": {"type": "integer", "min": -1},
- "connect": {"type": "integer", "min": -1},
- "blocked": {"type": "integer", "min": -1},
- "send": {"type": "integer", "min": -1},
- "wait": {"type": "integer", "min": -1},
- "receive": {"type": "integer", "min": -1},
- "ssl": {"type": "integer", "optional": true, "min": -1},
- "comment": {"type": "string", "optional": true}
+ "dns": {"type": "integer", "min": -1, "required": true},
+ "connect": {"type": "integer", "min": -1, "required": true},
+ "blocked": {"type": "integer", "min": -1, "required": true},
+ "send": {"type": "integer", "min": -1, "required": true},
+ "wait": {"type": "integer", "min": -1, "required": true},
+ "receive": {"type": "integer", "min": -1, "required": true},
+ "ssl": {"type": "integer", "min": -1},
+ "comment": {"type": "string"}
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.