Skip to content

Add validation of config with schema #28

@matthyy

Description

@matthyy

Today's issue:
Today's package does not enable users to validate the config object resulting from loading env variables.

Suggestion solution:
A suggested solution would be to run validation against the config object. It would have an impact as the user would need to call the method load with an option object containing schema validation for Joi.

Internally, the load method could call that validation and throw an exception if any error occurs.

Opened questions:
Which validator should we handle : Joi and class-validator or both. In my opinion, given the overhead of doing both, it would worth doing both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions