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

Add runtime schema validation for things that can't be checked by JSONSchema #17

Open
3 of 6 tasks
aygold92 opened this issue Jun 6, 2019 · 3 comments
Open
3 of 6 tasks

Comments

@aygold92
Copy link
Contributor

aygold92 commented Jun 6, 2019

  • a property can't be readOnly and writeOnly.
  • a property can't be readOnly and createOnly.
  • an identifier must be either createOnly or readOnly (note: this one is debatable, but CFN does not currently support updating the physicalResourceId)
  • ensure that jsonPointers map to actual properties

Update (3/16/2020)

Please add more as we come across them

@tobywf
Copy link
Contributor

tobywf commented Aug 19, 2019

Please see RPDK resource_generator.py (permalink) for additional semantic validations that should be implemented:

  • strings: using format and pattern together may be nonsensical
  • integer/number: using minimum and exclusiveMinimum together may be nonsensical, same with maximum
  • integer/number: validate that minimum < maximum (minimum == maximum makes no sense either, and should use const instead), same for exclusive ones. added complication: perform this validation with minimum and exclusiveMaximum and vice versa.

@wbingli wbingli changed the title add runtime schema validation for things that can't be checked by JSONSchema Add runtime schema validation for things that can't be checked by JSONSchema Mar 17, 2020
@benkehoe
Copy link

While primaryIdentifier can be an array (of pointers), a pointer within that array should not point to an array (at least, that's not currently supported). This is not checked during registration but fails (opaquely) at runtime.

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

4 participants