Validate Game Data =============== Checks the game data for validity and produces a report. The exit code will be ``1`` if the report contains errors and the ``--output`` is set to ``err``. Otherwise, the exit code will be ``0``. - :ref:`CLI Installation ` - :ref:`Commands Reference ` - :doc:`Universal Parameters ` - :doc:`URL-based Input/Output ` --------------- Command --------------- .. code-block:: bash # local game data (windows) dotnet charon DATA DELETE --dataBase "c:\my app\gamedata.json" --schema Item --id "Sword" # remote game data dotnet charon DATA DELETE --dataBase "https://charon.live/view/data/My_Game/develop/" --schema Item --id "Sword" --credentials "" --------------- Parameters --------------- --dataBase Absolute or relative path to game data. Use quotation marks if your path contains spaces. .. code-block:: bash # local file --dataBase "c:\my app\gamedata.json" # remote server --dataBase "https://charon.live/view/data/My_Game/develop/" --credentials The API key used to access remote server in case of *--dataBase* being URL. --validationOptions List of validation checks and repairs to perform. .. code-block:: bash # repairs --validationOptions repair --validationOptions deduplicateIds --validationOptions repairRequiredWithDefaultValue --validationOptions eraseInvalidValue # checks (default) --validationOptions checkTranslation --validationOptions checkRequirements --validationOptions checkFormat --validationOptions checkUniqueness --validationOptions checkReferences --validationOptions checkSpecification --validationOptions checkConstraints --output Path to a validation report file. If the file exists, it will be overwritten. The directory must already exist. Alternatively, you can output to `Standard Error `_, `Standard Output `_, `/dev/null `_, or a :doc:`URL `. .. code-block:: bash # standart output --output out --output con # standart error --output err # null device (default) --output null # absolute path (windows) --output "c:\my app\document.json" # absolute path (unix) --output /user/data/document.json # relative path (universal) --output "./document.json" # remote location (HTTP) --output "http://example.com/document.json" # remote location with authentication (FTP) --output "ftp://user:password@example.com/document.json" --outputFormat Format of exported data. .. code-block:: bash # JSON (default) --outputFormat json # BSON --outputFormat bson # Message Pack --outputFormat msgpack # XML (removed in 2025.1.1) --outputFormat xml --outputFormattingOptions Additional options for specified format. This command supports :doc:`universal parameters `. ------------------ Output Data Schema ------------------ The report follow this pattern: .. code-block:: js { records: [ { id: "", schemaId: "", schemaName: "", errors: // could be null if no errors [ { path: "", message: "", code: "" }, // ... ] }, // ... ] } or `JSON schema `_: .. code-block:: json { "type": "object", "x-name": "ValidationReport", "additionalProperties": false, "properties": { "records": { "type": "array", "items": { "type": "object", "x-name": "ValidationRecord", "additionalProperties": false, "properties": { "id": { }, "schemaName": { "type": "string" }, "schemaId": { "type": "string" }, "errors": { "type": "array", "items": { "type": "object", "x-name": "ValidationError", "additionalProperties": true, "readOnly": true, "properties": { "path": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" } } } } } } }, "metadataHashCode": { "type": "integer", "format": "int32" } } }