Context
According to the documentation, the validation logic can be used manually without requiring NestJS.
However, the current package.json introduces a mandatory dependency on NestJS, which makes the package difficult to use in non-NestJS environments.
This creates a small gap between the documented usage and the actual dependency structure, and limits reuse of the validation logic in other contexts (plain Node.js, other frameworks, tooling, etc.).
Suggested improvement
To better reflect the documented intent and improve flexibility, it could be worth considering a split into two packages:
-
ocpi-types
- Framework-agnostic
- Contains OCPI types and validation logic
- No dependency on NestJS
-
ocpi-types-nestjs
- Optional NestJS integration layer
- Depends on
ocpi-types
- Provides NestJS-specific helpers
This separation would keep the current NestJS experience intact while making the core validation logic reusable and easier to adopt in other environments.
Context
According to the documentation, the validation logic can be used manually without requiring NestJS.
However, the current
package.jsonintroduces a mandatory dependency on NestJS, which makes the package difficult to use in non-NestJS environments.This creates a small gap between the documented usage and the actual dependency structure, and limits reuse of the validation logic in other contexts (plain Node.js, other frameworks, tooling, etc.).
Suggested improvement
To better reflect the documented intent and improve flexibility, it could be worth considering a split into two packages:
ocpi-typesocpi-types-nestjsocpi-typesThis separation would keep the current NestJS experience intact while making the core validation logic reusable and easier to adopt in other environments.