-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: valid JSON schema for JSON time objects
- Loading branch information
Showing
2 changed files
with
18 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,23 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "jmri-json-reporter-server-message", | ||
"title": "jmri-json-time-server-message", | ||
"type": "object", | ||
"description": "Data portion of message from JMRI to client for type \"reporter\"", | ||
"description": "Data portion of message from JMRI to client for type \"time\"", | ||
"properties": { | ||
"name": { | ||
"time": { | ||
"type": "string", | ||
"description": "System name of the reporter" | ||
"description": "Reported time in ISO 8601 format" | ||
}, | ||
"userName": { | ||
"type": "string", | ||
"description": "User name of the reporter" | ||
}, | ||
"comment": { | ||
"type": "string", | ||
"description": "Comment for the reporter" | ||
}, | ||
"properties": { | ||
"type": "array", | ||
"description": "NamedBean properties of the reporter", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"key": { | ||
"type": "string", | ||
"description": "Key by which property is accessed" | ||
}, | ||
"value": { | ||
"type": ["string", "null"], | ||
"description": "String value of property or null" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": ["name", "value"] | ||
} | ||
"rate": { | ||
"type": "number", | ||
"description": "Fast clock rate" | ||
}, | ||
"state": { | ||
"type": "integer", | ||
"description": "The state of the reporter", | ||
"enum": [0, 2, 4, 8] | ||
"description": "The state of the fast clock", | ||
"enum": [0, 2, 4] | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": ["name", "userName", "comment", "properties", "state"] | ||
"required": ["time", "rate", "state"] | ||
} |