-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds schema for validating the mapping files
Signed-off-by: MarzellT <[email protected]>
- Loading branch information
Showing
12 changed files
with
114 additions
and
38 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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copy all schema files (yaml) to the install directory | ||
# and add a compile definition to it so the path can be used in code. | ||
|
||
set("${PROJECT_NAME}_${MODULE_NAME}_MAPPING_SCHEMA_DIR" "${CMAKE_INSTALL_PREFIX}/etc/everest/ocpp-configuration/mapping_schemas") | ||
|
||
install(DIRECTORY "." | ||
DESTINATION "${${PROJECT_NAME}_${MODULE_NAME}_MAPPING_SCHEMA_DIR}" | ||
FILES_MATCHING PATTERN "*.yaml") | ||
|
||
target_compile_definitions(${MODULE_NAME} PRIVATE MAPPING_SCHEMA_INSTALL_DIRECTORY="${${PROJECT_NAME}_${MODULE_NAME}_MAPPING_SCHEMA_DIR}") |
52 changes: 52 additions & 0 deletions
52
modules/OCPPConfiguration/mapping_schemas/mapping_schema.yaml
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
description: Json schema for OCPP to Everest configuration mapping | ||
type: array | ||
items: | ||
type: object | ||
required: | ||
- ocpp_definition | ||
- everest_definition | ||
properties: | ||
ocpp_definition: | ||
type: object | ||
required: | ||
- variable | ||
properties: | ||
component: | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
name: | ||
type: string | ||
instance: | ||
type: string | ||
evse: | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: integer | ||
connector_id: | ||
type: integer | ||
variable: | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
name: | ||
type: string | ||
instance: | ||
type: string | ||
everest_definition: | ||
type: object | ||
required: | ||
- module_id | ||
- config_param | ||
properties: | ||
module_id: | ||
type: string | ||
config_param: | ||
type: string | ||
additionalProperties: false |