Skip to content

Decouple core OCPI validation from NestJS dependencies #4

Description

@juherr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions