-
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.
feat: JSON clients can add/edit/remove Operations Location
- Loading branch information
Showing
7 changed files
with
244 additions
and
54 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
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
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,14 +1,40 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "jmri-json-engine-client-message", | ||
"title": "jmri-json-location-client-message", | ||
"type": "object", | ||
"description": "Schema data object in message from client to JMRI for type \"engine\"", | ||
"description": "Schema data object in message from client to JMRI for type \"location\"", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Operations id of the engine being requested" | ||
"description": "Operations id of the location being requested; required except when PUTing a location" | ||
}, | ||
"userName": { | ||
"type": "string", | ||
"description": "Operations name of the location being requested; required if PUTing a location" | ||
}, | ||
"comment": { | ||
"type": "string", | ||
"description": "Freeform comment concerning location" | ||
}, | ||
"reporter": { | ||
"type": [ | ||
"string", | ||
"null" | ||
], | ||
"description": "The system name of the reporter for this location" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": ["name"] | ||
"anyOf": [ | ||
{ | ||
"required": [ | ||
"name" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"userName" | ||
] | ||
} | ||
] | ||
} |
52 changes: 14 additions & 38 deletions
52
java/src/jmri/server/json/operations/location-server.json
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,58 +1,34 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "jmri-json-engine-server-message", | ||
"title": "jmri-json-location-server-message", | ||
"type": "object", | ||
"description": "Data portion of message from JMRI to client for type \"engine\"", | ||
"description": "Data portion of message from JMRI to client for type \"location\"", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Operations id for engine" | ||
"description": "Operations id for location" | ||
}, | ||
"number": { | ||
"userName": { | ||
"type": "string", | ||
"description": "The engine number" | ||
}, | ||
"road": { | ||
"type": "string", | ||
"description": "The engine owning railroad" | ||
"description": "Operations name for location" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"description": "The engine type" | ||
"type": "array", | ||
"description": "The types of rolling stock accepted at location" | ||
}, | ||
"length": { | ||
"type": "int", | ||
"description": "Current engine length for available siding calculations" | ||
}, | ||
"color": { | ||
"type": "string", | ||
"description": "The color of the engine" | ||
}, | ||
"owner": { | ||
"type": "string", | ||
"description": "The engine owner" | ||
"type": "integer", | ||
"description": "Current location length for available siding calculations" | ||
}, | ||
"comment": { | ||
"type": "string", | ||
"description": "Freeform comment concerning engine" | ||
"description": "Freeform comment concerning location" | ||
}, | ||
"location": { | ||
"type": "string", | ||
"description": "The current location of the engine" | ||
}, | ||
"destination": { | ||
"type": "string", | ||
"description": "the current destination of the engine" | ||
}, | ||
"model": { | ||
"type": "string", | ||
"description": "The model of engine" | ||
}, | ||
"consist": { | ||
"type": "string", | ||
"description": "The name of the consist the engine is in" | ||
"reporter": { | ||
"type": ["string", "null"], | ||
"description": "The system name of the reporter for this location" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": ["id", "number", "road", "type", "length", "owner", "comment", "model", "consist"] | ||
"required": ["name", "userName", "comment", "reporter", "type"] | ||
} |
Oops, something went wrong.