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

[ Feat ] Validate whisky.json #39

Merged
merged 6 commits into from
Aug 9, 2023

Conversation

gpibarra
Copy link
Contributor

@gpibarra gpibarra commented Aug 9, 2023

I was modifying the whisky.json file and by mistake generated an invalid json file (a trailing comma).
When running whisky update, the error was not clear enough, because doing json_decode() did not check if the file was well formed and returned null
From there, I decided to also implement the validation of all json properties to avoid future errors.

PS: need to do the build.

app/FileJson.php Show resolved Hide resolved
app/FileJson.php Show resolved Hide resolved
app/FileJson.php Outdated Show resolved Hide resolved
@ProjektGopher
Copy link
Owner

This looks super promising! I'm excited to look through it properly when I'm sitting at a computer after I get my kid down for the night

@ProjektGopher ProjektGopher changed the title validate whisky.json with jsonSchema [ Feat ] Validate whisky.json Aug 9, 2023
app/FileJson.php Show resolved Hide resolved
app/Whisky.php Show resolved Hide resolved
@ProjektGopher ProjektGopher merged commit fa93dd7 into ProjektGopher:main Aug 9, 2023
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

Successfully merging this pull request may close these issues.

3 participants