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

Date validation improvements #138

Open
2 of 4 tasks
Maurier opened this issue Aug 30, 2024 · 0 comments
Open
2 of 4 tasks

Date validation improvements #138

Maurier opened this issue Aug 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request in progress

Comments

@Maurier
Copy link
Member

Maurier commented Aug 30, 2024

Revise our different schemas and make sure date validations are in place as follows:

  • The publication date MUST be greater than or equal to the creation date.
  • In the case where the publication date is a year, the year must be >= the year of the creation date.
  • Do not compare the publication date to the modification date because it is possible in some instances that a resource could be modified after publication.

Additional technical limitations:

  • $data reference syntax is not supported inside of anyOf schema definitions. This means that this type of validation is not possible for elements nested inside combinator schemas trying to access data outside.

https://ajv.js.org/guide/combining-schemas.html#data-reference

if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema)

@Maurier Maurier added the enhancement New feature or request label Aug 30, 2024
@Maurier Maurier self-assigned this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress
Projects
None yet
Development

No branches or pull requests

1 participant