Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate the configuration json #1658

Open
tttp opened this issue Nov 1, 2024 · 0 comments
Open

validate the configuration json #1658

tttp opened this issue Nov 1, 2024 · 0 comments

Comments

@tttp
Copy link
Member

tttp commented Nov 1, 2024

we have a few different jsons:

  1. campaign config
  2. widget config
  3. target configs (for mtt)
  4. snowflake config (technically part of campaign, but we might want to separate)

campaign and widget have a lot of overlap (journey, component, layout, portals, locales)

https://github.com/colinhacks/zod

seems to be a great one, to be used on the cli tools to validate before generating the widget, not part of the widget

ideally:

  1. validating/warning the schema
  2. as a documentation (zod can generate it)
  3. potentially automatically merge default values with the config used to generate the widget (and simplify the code so instead of having a lot config.component.bla.key ||defaultValue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant