ocpp
                                
                                 ocpp copied to clipboard
                                
                                    ocpp copied to clipboard
                            
                            
                            
                        Allow to provide JSON schemas manually
The OCA doesn't allow to share the JSON schemas for OCPP 2.1 outside it's members. Thus this library can't include these schemas.
This commit introduces the SchemaValidator: a structure that loads schemas located at inprovide folder and validates payload against those schemas. The file names of the schema must follow the format '
The file names for the schemas of OCPP 1.6 and OCPP 2.0 have been adjusted to follow this pattern.
Users relying on ocpp.v16, ocpp.v20 or ocpp.v201 shouldn't be affected by introduction of SchemaValidator. These modules create a default instance of Validator to include the right set of schemas.
Users of ocpp.v21 can create a custom validator and pass it to the construct of ocpp.v21.ChargePoint. See also the two examples in examples/v21/.
Fixes: #453