ocpp-standard-schema
Version:
Contains OCPP JSON schemas for validation purposes
24 lines (18 loc) • 789 B
Markdown
This package contains JSON schemas and typescript interfaces for said OCPP protocols
`npm install --save ocpp-standard-schema`
```
import {Ocpp15Schemas, Ocpp15Types ,Ocpp16Schemas, Ocpp16Types, Ocpp20Schemas, Ocpp20Types} from 'ocpp-standard-schema';
// Interfaces can beused as follows
const AuthorizeRequest: Ocpp16Types.AuthorizeRequest = {
idTag: 'testTag',
};
// Schemas can be used as follows
const AuthorizeRequestSchema = Ocpp16Schemas.AuthorizeRequest;
```
OCPP 2.0 contain type information for the underlying data types also. They are not exposed through the normal module structure but you can still find them
```
import {CustomDataType} from 'ocpp-standard-schema/build/src/ocpp-20-types/AuthorizeRequest'
```