-
Notifications
You must be signed in to change notification settings - Fork 306
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
Split data.json / 1 json per company #8
Comments
Great! Once separated in multiple files it is necessary to create a validator (maybe with json-schema) so we can test the pr and reject automatically in case of wrong data Do you think you can implement this feature: split + validator? Or separate into two issues? |
Yes seems fair to add some tests with this refactor, I'll take care of it 👍🏻 |
Validator seems a great idea for the format of the json file. The go generation already checks the structure of the json but not the format. |
This is the json-schema that replicates the current structure:
Example json:
@alessandromr I think it is appropriate to add to "type" values such as: B2C, D2C B2B etc.. |
I think it's best if we open another issue to discuss json schema as it probably also needs a template change @FabrizioCafolla @alessandromr . |
I also think it's a good idea to add the validator step inside the PR flow so we avoid to bring a non working status to main branch. aka merge only if it compiles. Probably needs another issue as well :) |
Closed with #16 |
I came here looking for the JSON schema... I was going to suggest adding a pre-commit hook to perform the schema validation, but it seems you guys are doing this with a small go program. What's the current approach? |
@brucellino as of right now we just run a GHA that checks and validates the json. No schema involved everything is pretty basic. We are also thinking about auto-generating PRs #327 |
Given the growing number of companies inside
data.json
I propose to split them following this logic:For each company there is a single json file located in a subfolder
companies
.This would improve contributing to the repo.
I can take care of this fix if you agree @alessandromr.
The text was updated successfully, but these errors were encountered: