-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ReleaseDate is not validated as a date. #1725
Comments
Found this: tristanpenman/valijson#98 which says that Valijson doesn't support the "format" parts of the JSON schema specs because they are ill-defined. We may need to do this ourselves. |
I had similar findings. We may need to implement a semantic validation for the date format. |
Just saw that there was a link to this issue in one of the issues raised on the valijson repo. There is a PR that has just been merged which partially implements the format constraint. It covers the built in 'date', 'time' and 'date-time' formats. Hopefully this will be of some use to you. 🤞 |
That does look very useful, thanks for letting us know! Do you have an idea of when a release will be cut for Valijson with that support? Whenever that happens I can looking into updating it here. |
No problem. I've just cut a new release: https://github.com/tristanpenman/valijson/releases/tag/v0.7 |
If the ReleaseDate is validated, it should also be validated, if the date is in a valid range. Because there is no time zone component, I suggest 1 day offset in the future should be ignored. |
[Policy] Breaking Change |
@denelon - Real impact caused by this bug, where Repology unlisted WinGet due to a bad version making it into the winget-pkgs repo |
manifests/f/FeatherWallet/Feather/2.6.7/FeatherWallet.Feather.installer.yaml: ``` ReleaseDate: 2024-29-04 ```
Thanks for letting me know. We will prioritize this fix. |
Brief description of your issue
In schema v1.1, the
ReleaseDate
field was added, and it's using the proper JSON Schema syntax to signify it is a date. However,winget validate
does not check whether the value is a date, instead just verifying it is a string.I believe this is because Valijson has no support for date/datetime verification, at least that I could find in their repo.
Steps to reproduce
ReleaseDate
field (singleton and installer types both have the field, so you have options).winget validate <path to manifest folder>
.Here is an example:
Expected behavior
Actual behavior
Manifest validation succeeded
.Environment
The text was updated successfully, but these errors were encountered: