Skip to content

Add schema validation #142

@AlexSkrypnyk

Description

@AlexSkrypnyk

Is your feature request related to a problem? Please describe.
Newer versions of Ahoy may bring new config options, but there is no validation currently in place. This means that some of the options that affect how other existing options work, would be ignored.

In my specific case, 2.2 had the optional added to import, which changed how import operates: it no longer treated the specified file as required if optional was set to true. On the older versions, the optional was not considerd as a part of schema and simply ignored. This lead to Ahoy erroring that my optional file is not available, which confused the user thinking that there is something with the .ahoy.yml file having an error. Had there be a validation of config schema, Ahoy would issue a warning that the newer schema in .ahoy.yml with optional is not valid, which would prompt the user to look into updating Ahoy.

Describe the solution you'd like
It would be great to validate the config schema and issue a warning to user that they are either using an incorrect schema or should upgrade Ahoy.

Additional context
#1551 ahoy throws error after running starter script

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions