Global Validation Classes
Create global and portable validation classes. It needs to validate
- The JSON schema of each section AND as a whole.
Each section should have function, accessible independently and return the proper JSON structure with ALL attributes set with default if not explicit in the GeoView config.
- The Layer Metadata fetching to return a valid layer GeoView config
LayerAPI on GeoView will use the class to inject the valid layer config and obtain a valid structure to create the layer. The structure is unilingual. On language modification, we reload the layers.
The GeoView config is bilingual but the config class give the structure in one language.
We should avoid error like this??? TO DISCUSS
logger.ts:374 15:53:27.730 - Invalid JSON string. String passed to the JSON parser: {
"map": {
"interaction": "dynamic",
"viewSettings": {
"zoom": 4,
"center": [-100, x],
"projection": 1111
}
} - JSON Parser error: Unexpected token 'x', ..."": [-100, x],
"... is not valid JSON - See text above.
Working on Esri dynamic and feature classes. Also extracting the main section of code for the validation. Created PR 2003 as a draft to get comments from the team.